/* Palimpso: styles for narrow windows, touch screens, phones (15-phone.js) and tablets; loads after css/app.css.
   Phones: (max-width:600px) or a touch screen 500 px tall or less; tablets: class "tablet" on <html>. */
@media (max-width:600px), (max-width:760px) and (pointer:fine), (max-height:500px) and (pointer:coarse){
  html:not(.popdoc) #app{grid-template-rows:38px 42px minmax(0,1fr)}
  html:not(.popdoc) .brand{border-right:0;padding-right:0}
  html:not(.popdoc) .brand span.bt{display:none}
  html:not(.popdoc) #panelsBtn{display:inline-flex}
  html:not(.popdoc) #main{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
  html:not(.popdoc) #toolbar{order:2;flex-direction:row;border-right:0;border-top:1px solid var(--line);padding:4px 8px calc(4px + env(safe-area-inset-bottom,0px));overflow-x:auto;gap:8px}
  html:not(.popdoc) #tools{flex-direction:row}
  html:not(.popdoc) .tsep{width:1px;height:22px;margin:0 3px}
  html:not(.popdoc) .colors{flex-direction:row;margin:0;padding:0}
  html:not(.popdoc) #panels{position:fixed;z-index:40;right:0;top:calc(80px + env(safe-area-inset-top,0px));bottom:0;width:min(310px,88vw);transform:translateX(102%);transition:transform .2s ease;box-shadow:-20px 0 40px rgba(0,0,0,.5)}
  html:not(.popdoc) #panels.open{transform:none}
  html:not(.popdoc) #dockBar,html:not(.popdoc) .ph-undock{display:none!important}
  html:not(.popdoc) .panel h3{cursor:default}
  html:not(.popdoc) #hint,html:not(.popdoc) #posInfo,html:not(.popdoc) .opt-note{display:none}
  html:not(.popdoc) .frow{grid-template-columns:90px minmax(0,1fr) auto}
  html:not(.popdoc) .keys{grid-template-columns:1fr}
  html:not(.popdoc) .fxgrid{grid-template-columns:1fr}
}
/* the Esc button (15-touch.js): only while Esc would do something */
.tesc{position:absolute;z-index:6;left:12px;top:12px;width:54px;height:54px;padding:0;display:grid;place-items:center;border-radius:50%;border:1.5px solid var(--line-2);background:color-mix(in srgb,var(--panel) 80%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 8px 22px rgba(0,0,0,.4);touch-action:manipulation;opacity:0;transform:scale(.8);pointer-events:none;transition:opacity .15s,transform .15s}
.tesc.rul{left:32px;top:32px}
.tesc.on{opacity:1;transform:none;pointer-events:auto}
.tesc[hidden]{display:none}
.tesc span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--raise);border:1px solid var(--line-2);font:600 11px/1 system-ui,sans-serif;color:var(--muted);letter-spacing:.02em}
.tesc:active span{background:var(--accent);border-color:var(--accent-text);color:var(--accent-ink)}
.tdone{left:74px}.tdone.rul{left:94px}
.tdone span svg{width:16px;height:16px}
.tdone.on span{background:var(--accent);border-color:var(--accent-text);color:var(--accent-ink)}
/* how to use the tool with a finger (15-touch.js) */
.thint{position:absolute;z-index:7;left:50%;bottom:16px;transform:translateX(-50%);width:min(440px,calc(100% - 24px));display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:center;padding:10px 10px 10px 14px;border-radius:14px;border:1px solid var(--line-2);background:color-mix(in srgb,var(--panel-2) 94%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 12px 30px rgba(0,0,0,.45)}
.thint[hidden]{display:none}
.thint.ph{left:80px;right:10px;width:auto;transform:none;bottom:62px}
.thint b{grid-column:1;font-size:12px;color:var(--accent-text);font-weight:650}
.thint span{grid-column:1;font-size:13.5px;line-height:1.4;color:var(--text)}
.thint button{grid-column:2;grid-row:1/3;border:1px solid var(--line-2);background:var(--raise);color:var(--text);border-radius:10px;height:36px;padding:0 12px;font:600 13px inherit}
.btn.thelp{min-width:30px;padding:0 8px;font-weight:700;border-radius:15px}
/* the guide, About and Support inside the app (16-help.js) */
#pageSheet{position:fixed;inset:0;z-index:90;display:flex;flex-direction:column;background:var(--ground);padding:env(safe-area-inset-top,0px) 0 0}
#pageSheet[hidden]{display:none}
#pageSheet .pg-head{flex:none;display:flex;align-items:center;gap:10px;height:52px;padding:0 10px 0 16px;background:var(--panel);border-bottom:1px solid var(--line)}
#pageSheet .pg-head b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
#pageSheet .pg-head .btn{height:36px;padding:0 16px;border-radius:10px}
#pageSheet iframe{flex:1;width:100%;border:0;background:#131316}
/* bigger controls on touch screens: panels and dialogs */
@media (pointer:coarse){
  .panel select,.panel input[type=text],.panel input[type=number],.panel input[type=search],.mbody select,.mbody input[type=text],.mbody input[type=number],.mbody input.num{min-height:36px}
  .panel input[type=checkbox],.mbody input[type=checkbox],.panel input[type=radio],.mbody input[type=radio]{width:22px;height:22px}
  .panel input[type=color],.mbody input[type=color]{min-height:34px;min-width:44px}
  .panel .btn,.mbody .btn{min-height:38px}
  .panel .seg button,.mbody .seg button{min-height:38px}
  .layer .eye,.locks button{width:36px;height:36px}
  .lfoot .ib,.navz .ib,.tlfoot .ib,.panel .ib{min-width:40px;min-height:38px}
  .lfoot{gap:0}.lfoot .ib{flex:1 1 0;min-width:0;max-width:52px} /* the panel's button row shares its width rather than running off the side */
  .cpair2 .cmini{width:24px;height:24px}.cpair2 .cmini.swap{left:31px;top:-6px}.cpair2 .cmini.reset{left:-6px;top:28px}
  .ce-view{width:34px;height:34px}
  .ce-tabs button{min-height:36px}
  .ce-row input,.ce-code input{min-height:34px}
  .swatches{grid-template-columns:repeat(auto-fill,minmax(32px,1fr))}.swatches button{width:auto;height:auto;min-height:32px}
  .hsrc{width:30px;height:30px}
  .act .twisty{width:32px;height:36px}
  .tgl button,.tgl input{min-height:36px}
  .ce-sh{min-height:42px}
  #ctxMenu .mi{padding:10px 12px;min-height:44px}
  .mbody label.check,.panel label.check{min-height:36px;display:flex;align-items:center;gap:8px}
  .anchor{grid-template-columns:repeat(3,38px)}.anchor button{width:38px;height:38px}
  .bgsw button{min-width:34px;min-height:34px}
  .fxrow{min-height:42px}.fxrow input[type=checkbox]{width:22px;height:22px}
}
/* saving on iPhone and iPad (15-touch.js) */
#shareSheet{position:fixed;z-index:85;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px));max-width:480px;margin:0 auto;display:grid;gap:4px;padding:16px;border-radius:18px;border:1px solid var(--line-2);background:var(--panel-2);box-shadow:0 -14px 44px rgba(0,0,0,.55)}
#shareSheet[hidden]{display:none}
#shareSheet b{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#shareSheet span{color:var(--muted);font-size:13px}
#shareSheet .ss-btns{display:grid;gap:8px;margin-top:12px}#shareSheet .btn{min-height:46px;justify-content:center;font-size:15px}
.lgrip{display:none}
@media (pointer:coarse){.layer .lgrip{display:grid;place-items:center;width:34px;height:38px;margin-left:auto;flex:none;color:var(--faint);touch-action:none}.layer .lgrip svg{width:16px;height:16px}.layer.lifting{opacity:.55}}
/* the touch layout's parts, on phones and tablets (class touchui, set in 00-core.js / the head script) */
.lrail,.tsc,.qs{display:none}
  html.touchui:not(.popdoc) #sheetTabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;padding:0 10px 8px;flex:none;border-bottom:1px solid var(--line)}
  html.touchui:not(.popdoc) #sheetTabs::-webkit-scrollbar{display:none}
  html.touchui:not(.popdoc) #sheetTabs button{flex:none;height:34px;padding:0 12px;border:1px solid var(--line);border-radius:17px;background:var(--ground);color:var(--muted);font-weight:600;font-size:13px}
  html.touchui:not(.popdoc) #sheetTabs button.on{color:var(--accent-ink);background:var(--accent);border-color:var(--accent-text)}
  html.touchui:not(.popdoc) #panels.one #dock .pstack:not(.onehost),html.touchui:not(.popdoc) #panels.one #dock .psplit,html.touchui:not(.popdoc) #panels.one .pstack.onehost>.ptabs{display:none!important}
  html.touchui:not(.popdoc) #panels.one #dock .pstack.onehost{flex:1 1 auto!important;height:auto!important;min-height:0;border:0}
  html.touchui:not(.popdoc) #panels.one .pstack.onehost>.panel:not(.oneon){display:none!important}
  html.touchui:not(.popdoc) #panels.one .pstack.onehost>.panel.oneon{display:flex!important;flex:1 1 auto;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding-bottom:12px}
  html.touchui:not(.popdoc) .lrail{position:absolute;z-index:5;top:10px;right:8px;display:flex;flex-direction:column;align-items:center;gap:6px;width:58px;max-height:calc(100% - 150px);padding:6px 0;border:1px solid var(--line-2);border-radius:14px;background:color-mix(in srgb,var(--panel) 88%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 10px 28px rgba(0,0,0,.4)}
  html.touchui:not(.popdoc) .lrail[hidden]{display:none}
  html.touchui:not(.popdoc) .lrail.fold{width:auto;padding:3px}
  html.touchui:not(.popdoc) .lrail>button{width:44px;height:34px;border:0;border-radius:9px;background:none;color:var(--muted);display:grid;place-items:center;flex:none}
  html.touchui:not(.popdoc) .lrail .lr-fold{display:flex;gap:3px;align-items:center;justify-content:center;font-size:11px;font-weight:600}
  html.touchui:not(.popdoc) .lrail svg{width:18px;height:18px}
  html.touchui:not(.popdoc) .lr-list{display:flex;flex-direction:column;gap:6px;overflow-y:auto;scrollbar-width:none;min-height:0;padding:2px 6px}
  html.touchui:not(.popdoc) .lr-list::-webkit-scrollbar{display:none}
  html.touchui:not(.popdoc) .lr-th{position:relative;width:44px;height:44px;flex:none;padding:0;border:1px solid var(--line-2);border-radius:8px;overflow:hidden;color:var(--muted);display:grid;place-items:center;background:repeating-conic-gradient(#3a3a40 0 25%,#2a2a2f 0 50%) 0 0/10px 10px}
  html.touchui:not(.popdoc) .lr-th canvas{width:100%;height:100%;display:block}
  html.touchui:not(.popdoc) .lr-th svg{width:22px;height:22px}
  html.touchui:not(.popdoc) .lr-th:has(svg){background:var(--raise)}
  html.touchui:not(.popdoc) .lr-th.on{border-color:var(--accent-text);box-shadow:0 0 0 2px var(--accent)}
  html.touchui:not(.popdoc) .lr-th.off>*{opacity:.35}
  html.touchui:not(.popdoc) .lr-badge{position:absolute;right:2px;bottom:2px;font:700 9px/1 system-ui;color:#fff;background:rgba(0,0,0,.6);border-radius:3px;padding:2px 3px;font-style:normal}
  html.touchui:not(.popdoc) .tsc{position:absolute;z-index:5;left:12px;bottom:68px;width:58px;height:58px;display:grid;place-items:center;border-radius:50%;touch-action:none;-webkit-user-select:none;user-select:none;background:color-mix(in srgb,var(--panel) 80%,transparent);border:1.5px solid var(--line-2);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 8px 22px rgba(0,0,0,.4)}
  html.touchui:not(.popdoc) .tsc[hidden]{display:none}
  html.touchui:not(.popdoc) .tsc i{width:30px;height:30px;border-radius:50%;background:var(--raise);border:1px solid var(--line-2);grid-area:1/1}
  html.touchui:not(.popdoc) .tsc b{grid-area:1/1;font-size:14px;color:var(--muted);pointer-events:none}
  html.touchui:not(.popdoc) .tsc[data-m=on] i,html.touchui:not(.popdoc) .tsc[data-m=lock] i{background:var(--accent);border-color:var(--accent-text)}
  html.touchui:not(.popdoc) .tsc[data-m=on] b,html.touchui:not(.popdoc) .tsc[data-m=lock] b{color:var(--accent-ink)}
  html.touchui:not(.popdoc) .tsc[data-m=on]{border-style:dashed;border-color:var(--accent-text)}
  html.touchui:not(.popdoc) .tsc[data-m=alt]{border:3px solid var(--accent);background:var(--accent-soft)}
  html.touchui:not(.popdoc) .tsc[data-m=alt] b{color:var(--accent-text)}
  html.touchui:not(.popdoc) .qs{position:absolute;z-index:5;left:10px;top:50%;transform:translateY(-62%);display:flex;flex-direction:column;gap:14px}
  html.touchui:not(.popdoc) .qs[hidden]{display:none}
  html.touchui:not(.popdoc) .qsl{position:relative;width:34px;height:128px;border-radius:17px;overflow:hidden;touch-action:none;background:color-mix(in srgb,var(--panel) 82%,transparent);border:1px solid var(--line-2);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 8px 22px rgba(0,0,0,.35)}
  html.touchui:not(.popdoc) .qsl i{position:absolute;left:0;right:0;bottom:0;background:color-mix(in srgb,var(--accent) 55%,transparent);pointer-events:none}
  html.touchui:not(.popdoc) .qsl b{position:absolute;left:0;right:0;top:6px;text-align:center;font:600 10px/1 system-ui;color:var(--text);pointer-events:none;text-shadow:0 1px 2px rgba(0,0,0,.6)}
  @media (max-height:700px){html.touchui:not(.popdoc) .qsl{height:96px}html.touchui:not(.popdoc) .qs{gap:10px}}
  html.touchui:not(.popdoc) .qsring{position:fixed;left:50%;top:45%;transform:translate(-50%,-50%);border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #000,inset 0 0 0 1px #000;pointer-events:none;z-index:9}
  html.touchui:not(.popdoc) .qsring[hidden]{display:none}
/* tablets (class tablet): tools down the left, menus and options at the top, panels in a drawer from the right, dialogs
   on the right, layer thumbnails, the round shortcut and the size sliders */
html.tablet:not(.popdoc) #main,html.tablet:not(.popdoc) #main.dock-collapsed{grid-template-columns:var(--tbw,54px) minmax(0,1fr)!important}
html.tablet:not(.popdoc) #rail{display:none!important}
html.tablet:not(.popdoc) #panels{position:fixed;z-index:40;top:var(--uitop,74px);right:0;bottom:0;width:min(360px,46vw);transform:translateX(104%);transition:transform .2s ease;border-left:1px solid var(--line-2);border-radius:14px 0 0 0;box-shadow:-18px 0 40px rgba(0,0,0,.5);padding-right:env(safe-area-inset-right,0px)}
html.tablet:not(.popdoc) #panels.open{transform:none}
html.tablet:not(.popdoc) #dockBar,html.tablet:not(.popdoc) .ph-undock{display:none!important}
html.tablet:not(.popdoc) #main.dock-collapsed #dock{display:flex!important}
html.tablet:not(.popdoc) #dock{overflow-y:auto}
html.tablet:not(.popdoc) #sheetTabs{padding-top:10px}
html.tablet:not(.popdoc) #panelsBtn{display:inline-flex!important;align-items:center;gap:6px}
html.tablet:not(.popdoc) #panelsBtn svg{display:inline-block;width:17px;height:17px}
html.tablet:not(.popdoc) #panelsBtn[aria-expanded=true]{color:var(--accent-text);border-color:var(--accent-text)}
html.tablet:not(.popdoc) :is(#phUndo,#phRedo,#phExport){display:inline-grid;place-items:center;width:40px;height:32px;border:0;border-radius:7px;background:none;color:var(--text);padding:0}
html.tablet:not(.popdoc) :is(#phUndo,#phRedo,#phExport) svg{width:18px;height:18px}
html.tablet:not(.popdoc) :is(#phUndo,#phRedo).dim{opacity:.35}
html.tablet:not(.popdoc) .touchbar{display:none!important}
html.tablet:not(.popdoc) #app{grid-template-rows:calc(44px + env(safe-area-inset-top,0px)) 46px minmax(0,1fr)}
html.tablet:not(.popdoc) #menubar{padding:env(safe-area-inset-top,0px) calc(6px + env(safe-area-inset-right,0px)) 0 calc(6px + env(safe-area-inset-left,0px))}
html.tablet:not(.popdoc) .brand .bt{display:none}
html.tablet:not(.popdoc) #menus{overflow-x:auto;scrollbar-width:none;flex:0 1 auto;min-width:0}
html.tablet:not(.popdoc) #menus::-webkit-scrollbar{display:none}
html.tablet:not(.popdoc) #menus>*{flex:none;padding:0 9px;height:38px;font-size:14px}
html.tablet:not(.popdoc) #cmdBtn span,html.tablet:not(.popdoc) #cmdBtn kbd{display:none}
html.tablet:not(.popdoc) #cmdBtn{width:40px;padding:0;justify-content:center}
html.tablet:not(.popdoc) #optbar{min-height:46px}
html.tablet:not(.popdoc) .qs{left:30px}
html.tablet:not(.popdoc) .tsc{left:30px}
html.tablet:not(.popdoc) .lrail{top:30px}
html.tablet:not(.popdoc) .tsc{bottom:20px}
html.tablet:not(.popdoc) .lrail{max-height:calc(100% - 40px)}
html.tablet:not(.popdoc) #modalWrap:not(.spot){place-items:stretch end;padding:0;background:transparent}
html.tablet:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm){width:min(420px,46vw)!important;max-height:none;height:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:16px 0 0 16px;border-width:0 0 0 1px;transform:none!important;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) 0;box-shadow:-14px 0 40px rgba(0,0,0,.55)}
html.tablet:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm) h2{cursor:default;touch-action:auto;flex:none;padding:14px 16px 10px;font-size:15px}
html.tablet:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm) .mbody{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:12px 16px}
html.tablet:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm) .mfoot{flex:none;padding:10px 12px;border-top:1px solid var(--line);flex-wrap:nowrap}
html.tablet:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm) .mfoot .btn{flex:1 1 0;min-height:44px;justify-content:center;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.tablet:not(.popdoc) body:has(#modalWrap:not([hidden]):not(.spot)) :is(.lrail,.tsc,.tesc,.thint,.qs){visibility:hidden}
/* phones (15-touch.js) */
.phonly{display:none}
#phSheet{position:fixed;inset:0;z-index:72;background:var(--panel);display:flex;flex-direction:column;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)}
.phs-head{display:flex;align-items:center;gap:8px;height:52px;padding:0 6px 0 4px;border-bottom:1px solid var(--line);flex:none}
.phs-head b{flex:1;text-align:center;font-size:15px}
.phs-back,.phs-x{min-width:64px;height:40px;border:0;background:none;color:var(--accent-text);font:600 15px/1 inherit;text-align:left;padding:0 10px}.phs-x{display:grid;place-items:center end;color:var(--muted)}.phs-x svg{width:18px;height:18px}
.phs-list{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:6px 0 20px}
.phs-sec{margin:14px 16px 6px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--faint)}
.phs-row{display:flex;align-items:center;gap:6px;width:100%;min-height:48px;border:0;border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent);background:none;color:var(--text);font-size:15px;text-align:left;padding:0 16px 0 10px}
.phs-row:active{background:var(--raise)}.phs-row .ck{width:20px;color:var(--accent-text);flex:none;text-align:center}.phs-row .lb{flex:1;min-width:0}.phs-row .ar{color:var(--faint);font-size:20px}
.phs-gap{height:10px}
.cr-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}
@media (max-width:700px), (max-height:500px) and (pointer:coarse){.cr-grid{grid-template-columns:minmax(0,1fr)}}
.modal.crm{width:100vw;height:100%;max-height:none;border-radius:0;border:0;display:flex;flex-direction:column;overflow:hidden}
#modalWrap:has(.modal.crm){padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)}
.modal.crm h2{padding:12px 16px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modal.crm .mbody{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px;padding:0 0 4px}
.crm .cr-pv{position:relative;flex:0 1 auto;min-height:120px;max-height:44vh;display:grid;place-items:center;background:#0d0d0f;touch-action:none;-webkit-user-select:none;user-select:none;overflow:hidden}
.crm .cr-pv canvas{max-width:100%;max-height:44vh;width:auto!important;height:auto!important;object-fit:contain;border-radius:0!important;background:none!important}
.crm .cr-hist{position:absolute;right:8px;bottom:8px;width:112px;pointer-events:none;opacity:.85}
.crm .cr-hist canvas{height:40px!important;border-radius:4px}
.crm .cr-hold{position:absolute;left:8px;bottom:8px;font-size:11px;padding:3px 8px;border-radius:10px;background:rgba(0,0,0,.55);color:#ddd;pointer-events:none}
.crm .cr-pv.before .cr-hold{background:var(--accent);color:var(--accent-ink)}.crm .cr-pv.before .cr-hold::after{content:': before'}
.crm .cr-acts{position:absolute;top:8px;right:8px;display:flex;gap:6px}.crm .cr-acts .btn{height:32px;padding:0 12px;border-radius:16px;background:rgba(20,20,24,.75);border-color:rgba(255,255,255,.18);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.crm .cr-info{margin:0;padding:0 16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11.5px}
.crm .cr-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:0 12px;flex:none}
.crm .cr-tabs::-webkit-scrollbar{display:none}
.crm .cr-tabs button{flex:none;height:34px;padding:0 13px;border-radius:17px;font-size:13.5px;font-weight:600}
.crm .cr-tabs button[data-g]{border:1px solid var(--line);background:var(--ground);color:var(--muted)}
.crm .cr-tabs button[data-g].on{background:var(--accent);border-color:var(--accent-text);color:var(--accent-ink)}
.crm .cr-ctl{flex:1 1 0;min-height:96px;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:2px 16px 6px}
.crm .cr-ctl .frow{grid-template-columns:92px minmax(0,1fr) 62px!important;margin-bottom:2px}
.modal.crm .mfoot{flex:none;gap:6px;padding:8px 12px}
.modal.crm .mfoot .btn{flex:1;min-height:42px;padding:0 8px;white-space:nowrap}
@media (max-width:600px), (max-height:500px) and (pointer:coarse){
  html:not(.popdoc) .phonly{display:inline-grid;place-items:center}
  html:not(.popdoc) #app{grid-template-rows:calc(46px + env(safe-area-inset-top,0px)) 44px minmax(0,1fr)}
  html:not(.popdoc) #menubar{gap:2px;padding:env(safe-area-inset-top,0px) 6px 0 4px}
  html:not(.popdoc) #menus,html:not(.popdoc) .brand,html:not(.popdoc) #fsBtn{display:none}
  html:not(.popdoc) #menubar>button{width:42px;height:40px;border:0;background:none;color:var(--text);border-radius:8px;padding:0}
  html:not(.popdoc) #menubar>button svg{width:20px;height:20px}
  html:not(.popdoc) #panelsBtn{display:inline-flex!important;align-items:center;width:auto!important;height:34px!important;padding:0 12px!important;border:1px solid var(--line-2)!important;border-radius:8px!important;margin-left:4px;font-size:13px}
  html:not(.popdoc) div:has(>#homeBtn){display:none!important} /* the tab row: open images and Home are in the ☰ menu */
  html:not(.popdoc) #status{display:none}
  html:not(.popdoc) #center{grid-template-rows:minmax(0,1fr)!important}html:not(.popdoc) #stage{grid-row:1}
  /* the panel sheet shows one panel at a time, picked from the strip at its top */
  html:not(.popdoc) #tbGrip{display:none}
  html:not(.popdoc) #toolbar{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  html:not(.popdoc) #toolbar::-webkit-scrollbar{display:none}
  html:not(.popdoc) #panels{top:auto;left:0;right:0;width:auto;height:min(52vh,560px);transform:translateY(104%);border-left:0;border-top:1px solid var(--line-2);border-radius:16px 16px 0 0;box-shadow:0 -18px 40px rgba(0,0,0,.5);padding-bottom:env(safe-area-inset-bottom,0px);overflow:hidden}
  html:not(.popdoc) #panels.open{transform:none}
  html:not(.popdoc) #sheetGrab{display:grid;width:100%;height:22px;border:0;background:none;flex:none;touch-action:none}
  html:not(.popdoc) #sheetGrab i{width:40px;height:5px;border-radius:3px;background:var(--line-2)}
  /* Home (15-touch.js homePhone) */
  #home.phone{flex-direction:column;padding-top:env(safe-area-inset-top,0px)}
  #home.phone .home-main{padding:16px 16px calc(100px + env(safe-area-inset-bottom,0px))}
  .hp-head{display:flex;align-items:center;gap:10px;margin-bottom:18px}
  .hp-head .home-logo{margin:0;flex:1;font-size:21px}
  .hp-back{height:38px;border-radius:19px!important;padding:0 16px!important;font-size:14px}
  .hp-tip{display:flex;align-items:flex-start;gap:10px;margin:-14px 0 24px;padding:12px 8px 12px 14px;border-radius:14px;border:1px solid var(--line-2);background:var(--panel);font-size:13.5px;line-height:1.45;color:var(--muted)}
  .hp-tip b{color:var(--text)}.hp-tip svg{width:22px;height:22px;flex:none;color:var(--accent-text);margin-top:1px}.hp-tip span{flex:1}
  .hp-tip button{flex:none;width:32px;height:32px;border:0;background:none;color:var(--muted);font-size:20px;line-height:1}
  .hp-acts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:28px}
  .hp-act{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;align-items:center;text-align:left;padding:14px;min-height:74px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);font:inherit;transition:transform .1s}
  .hp-act svg{grid-row:1/3;width:28px;height:28px;color:var(--accent-text)}
  .hp-act b{font-size:15px;font-weight:650;align-self:end}
  .hp-act span{font-size:12px;color:var(--muted);align-self:start;line-height:1.3}
  .hp-act.main{grid-column:1/-1;min-height:86px;background:var(--accent);border-color:var(--accent-text);color:var(--accent-ink)}
  .hp-act.main svg,.hp-act.main span{color:var(--accent-ink)}.hp-act.main b{font-size:17px}
  .hp-act:active{transform:scale(.97)}
  #home.phone .home-sec{margin-bottom:26px}
  #home.phone .home-main h2{font-size:18px;margin-bottom:12px}
  #home.phone .home-main h2 .hx,#home.phone .rc-more{display:none}
  #home.phone .rc-grid,#home.phone .rc-grid.clamp{display:flex;overflow-x:auto;gap:12px;margin:0 -16px;padding:0 16px 4px;scroll-snap-type:x mandatory;scroll-padding:0 16px;scrollbar-width:none;grid-auto-rows:auto}
  #home.phone .rc-grid::-webkit-scrollbar,#home.phone .ps-grid::-webkit-scrollbar,#home.phone .cats::-webkit-scrollbar{display:none}
  #home.phone .rc{flex:none;width:148px;scroll-snap-align:start;border-radius:14px}
  #home.phone .rc .th{height:124px}#home.phone .rc .th img{max-height:124px}
  #home.phone .rc .rm{opacity:.9;width:30px;height:30px;border-radius:15px}
  #home.phone .home-empty{font-size:14px}
  #home.phone .new-wrap{display:block}
  #home.phone .cats{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px 12px;padding:0 16px;scrollbar-width:none}
  #home.phone .cats button{flex:none;padding:8px 15px;font-size:14px}
  #home.phone .ps-grid{display:flex;overflow-x:auto;gap:10px;margin:0 -16px;padding:0 16px 4px;scroll-snap-type:x proximity;scroll-padding:0 16px;scrollbar-width:none}
  #home.phone .ps{flex:none;width:128px;scroll-snap-align:start;border-radius:14px}
  #home.phone .ps b{font-size:13.5px}#home.phone .ps span{font-size:12px}
  .hp-more{margin-top:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
  .hp-more summary{padding:15px 16px;font-weight:600;font-size:14.5px;cursor:pointer;list-style:none;display:flex;justify-content:space-between}
  .hp-more summary::-webkit-details-marker{display:none}
  .hp-more summary::after{content:'›';color:var(--faint);font-size:20px;line-height:1;transition:transform .15s}
  .hp-more[open] summary::after{transform:rotate(90deg)}
  .hp-more .nd{border:0;background:none;position:static;padding:0 16px 10px}
  .hp-more .nd h3{display:none}
  #home.phone .nd input[type=text],#home.phone .nd input[type=number],#home.phone .nd select{font-size:16px;padding:9px 10px} /* 16 px: iPhones zoom in on smaller text fields */
  .hp-create{position:fixed;z-index:2;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));display:flex;align-items:center;gap:12px;padding:10px 10px 10px 16px;border-radius:18px;border:1px solid var(--line-2);background:color-mix(in srgb,var(--panel-2) 92%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 12px 30px rgba(0,0,0,.5)}
  .hp-create span{flex:1;min-width:0;font-size:13.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .hp-create .create{width:auto!important;flex:none;height:44px;padding:0 24px;border-radius:13px;font-size:15px}
  .hp-links{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 18px;margin-top:8px;font-size:14px}
  .hp-links button,.hp-links a{background:none;border:0;padding:8px 0;color:var(--accent-text);font:inherit;text-decoration:none}
  .hp-links p{width:100%;text-align:center;margin:6px 0 0;font-size:12.5px;color:var(--muted)}
  /* toolbar: sideways swipes only, and bigger rows in the tool groups */
  html:not(.popdoc) #toolbar{touch-action:pan-x}
  #flyout button{min-height:44px;font-size:15px}#flyout button svg{width:20px;height:20px}#flyout{min-width:230px;border-radius:14px;padding:6px}
  /* Photoshop-style phone chrome: name in the top bar, tool options floating above the tools, layer thumbnails, touch shortcut */
  html:not(.popdoc) #app{grid-template-rows:calc(48px + env(safe-area-inset-top,0px)) minmax(0,1fr)!important}
  html:not(.popdoc) #menubar{background:var(--panel);border-bottom:1px solid var(--line)}
  html:not(.popdoc) #cmdBtn{display:none!important}html:not(.popdoc) #shareBtn{display:none!important}
  html:not(.popdoc) #menubar>#phHome{width:36px}
  html:not(.popdoc) #menubar>#phTitle{flex:0 1 auto;width:auto;min-width:0;max-width:44vw;display:flex;align-items:center;gap:5px;padding:0 6px;font-weight:600;font-size:14.5px}
  html:not(.popdoc) #phTitle span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  html:not(.popdoc) #menubar>#phTitle svg{width:9px;height:9px;flex:none;color:var(--muted)}
  html:not(.popdoc) #menubar>.grow{flex:1}
  html:not(.popdoc) #menubar>#panelsBtn{width:40px!important;height:40px!important;padding:0!important;border:0!important;margin:0;display:inline-grid!important;place-items:center}
  html:not(.popdoc) #panelsBtn span{display:none}
  html:not(.popdoc) #panelsBtn[aria-expanded=true]{color:var(--accent-text)}
  html:not(.popdoc) #optbar{position:fixed;z-index:6;left:8px;right:8px;bottom:calc(66px + env(safe-area-inset-bottom,0px));height:46px;gap:10px;padding-inline:10px;border:1px solid var(--line-2);border-radius:14px;background:color-mix(in srgb,var(--panel) 90%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 10px 28px rgba(0,0,0,.4)}
  html:not(.popdoc) #optbar .opt-tool{font-size:0}html:not(.popdoc) #optbar .opt-tool svg{width:20px;height:20px}
  html:not(.popdoc) #toolbar{height:calc(58px + env(safe-area-inset-bottom,0px));padding:6px 0 calc(6px + env(safe-area-inset-bottom,0px)) 8px;gap:4px;border-top:1px solid var(--line);align-items:center}
  html:not(.popdoc) #tools{gap:4px}
  html:not(.popdoc) #toolbar .tb{width:46px;height:44px;border-radius:12px}html:not(.popdoc) #toolbar .tb svg{width:22px;height:22px}
  html:not(.popdoc) #toolbar .tb.on{background:var(--accent);color:var(--accent-ink);box-shadow:none}
  html:not(.popdoc) #toolbar .tsep{display:none}
  /* tool groups and their tray (15-phone.js) */
  html:not(.popdoc) #tools{flex:1 1 auto;min-width:0}
  html:not(.popdoc) #toolbar .tb.phg{flex:1 1 0;min-width:44px;max-width:64px;width:auto;height:46px;display:grid;grid-template-rows:22px 12px;place-items:center;gap:2px;padding:3px 0 2px}
  html:not(.popdoc) #toolbar .tb.phg svg{width:21px;height:21px}
  html:not(.popdoc) #toolbar .tb.phg .phl{font-size:10px;line-height:12px;font-weight:600;letter-spacing:.01em;white-space:nowrap}
  html:not(.popdoc) #toolbar .tb.phg[aria-expanded=true]:not(.on){background:var(--raise)}
  #phTray{position:fixed;z-index:8;left:8px;right:8px;bottom:calc(66px + env(safe-area-inset-bottom,0px));display:flex;gap:4px;overflow-x:auto;padding:6px;border:1px solid var(--line-2);border-radius:14px;background:var(--panel);box-shadow:0 8px 28px rgba(0,0,0,.35);scrollbar-width:none;overscroll-behavior:contain}
  #phTray[hidden]{display:none}
  body:has(#phTray:not([hidden])) .thint{visibility:hidden}
  #phTray button{flex:none;display:grid;justify-items:center;align-content:center;gap:4px;min-width:66px;height:58px;padding:6px 6px 4px;border:0;border-radius:10px;background:none;color:var(--text);font:600 11px/1.1 inherit}
  #phTray button svg{width:22px;height:22px}
  #phTray button.on{background:var(--accent);color:var(--accent-ink)}
  html:not(.popdoc) #tbCols{display:none!important}
  html:not(.popdoc) #toolbar .colors{position:sticky;right:0;align-self:stretch;align-items:center;gap:4px;margin-left:auto;padding:0 10px 0 22px;background:linear-gradient(to right,transparent,var(--panel) 18px)}
  html:not(.popdoc) #toolbar .sw-actions{display:none}
  /* the tool options that don't fit ("⋯"): a sheet above the options strip, one setting per row */
  html:not(.popdoc) #optMore{left:8px!important;right:8px;top:auto!important;bottom:calc(120px + env(safe-area-inset-bottom,0px));max-width:none;max-height:min(46vh,420px);overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;gap:8px;padding:10px 14px 14px;border-radius:16px;box-shadow:0 -12px 34px rgba(0,0,0,.5)}
  html:not(.popdoc) #optMore>.opt{flex:1 1 100%;display:flex;align-items:center;gap:10px;min-height:48px;margin:0;border-bottom:1px solid var(--line)}
  html:not(.popdoc) #optMore>.opt>span:first-child,html:not(.popdoc) #optMore>.opt>.scrub{flex:1;font-size:14.5px;color:var(--muted)}
  html:not(.popdoc) #optMore>.opt select{flex:0 1 62%;min-height:40px;font-size:16px}
  html:not(.popdoc) #optMore .num{width:86px;min-height:40px;font-size:16px}
  html:not(.popdoc) #optMore .rdrop{width:36px;height:36px}
  /* finger-sized controls on the options bar: selection modes, the size slider button, More, small buttons */
  html:not(.popdoc) #optbar .seg.selmodes button{min-width:40px;height:36px}
  html:not(.popdoc) #optbar .rdrop{width:36px;height:36px}
  html:not(.popdoc) #optbar .btn{min-height:36px}html:not(.popdoc) #optbar .optmore{min-width:44px}html:not(.popdoc) #optbar .gprev{height:34px}
  html:not(.popdoc) #optMore input[type=color]{width:52px;height:36px}
  html:not(.popdoc) #optMore>.tog{width:46px;height:42px}
  html:not(.popdoc) #optMore>.seg{flex:1 1 auto}html:not(.popdoc) #optMore>.seg button{height:42px;flex:1}
  html:not(.popdoc) #optMore>.btn{flex:1 1 40%;min-height:44px;justify-content:center}
  html:not(.popdoc) #optMore>.opt-note{flex-basis:100%;white-space:normal;font-size:12.5px;color:var(--muted)}
  html:not(.popdoc) #optMore>label.opt:has(input[type=checkbox]){justify-content:space-between}
  /* Select and mask: a smaller preview, so its controls show in the sheet */
  .sm-stage canvas{max-height:28vh}
  /* undo / redo with nothing to do; keyboard shortcuts mean nothing on a phone */
  html:not(.popdoc) #menubar>button.dim{opacity:.35}
  html:not(.popdoc) #ctxMenu .mi kbd,html:not(.popdoc) #flyout button kbd{display:none}
  /* messages and progress sit above the options strip, not on it */
  #toast,#busy{bottom:calc(124px + env(safe-area-inset-bottom,0px))}
  /* dialogs: rows that don't fit wrap rather than run off the side */
  .mbody .seg{flex-wrap:wrap;max-width:100%}.mbody .frow>*{min-width:0}
  /* dialogs (phones held upright): a sheet at the bottom, title and buttons fixed, the middle scrolls */
  html:not(.popdoc) #modalWrap:not(.spot){place-items:end stretch;padding:0;background:transparent} /* the picture above stays undimmed, to judge the change */
  html:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm){width:100%!important;max-width:none;max-height:min(52vh,calc(100% - 56px));box-shadow:0 -10px 34px rgba(0,0,0,.5);display:flex;flex-direction:column;overflow:hidden;border-radius:18px 18px 0 0;border-width:1px 0 0;transform:none!important;padding-bottom:env(safe-area-inset-bottom,0px);box-shadow:0 -14px 40px rgba(0,0,0,.55)}
  html:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm) h2{cursor:default;touch-action:auto;flex:none;padding:14px 16px 10px;font-size:15px}
  html:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm) .mbody{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:12px 16px}
  html:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm) .mfoot{flex:none;padding:10px 12px;border-top:1px solid var(--line);flex-wrap:nowrap}
  html:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm) .mfoot .btn{flex:1 1 0;min-height:44px;justify-content:center;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* phones: right-click menus and the colour picker are sheets from the bottom */
  html:not(.popdoc) #ctxMenu{left:8px!important;right:8px;top:auto!important;bottom:calc(8px + env(safe-area-inset-bottom,0px));width:auto;max-width:none;max-height:72vh;border-radius:16px;padding:6px}
  html:not(.popdoc) #ctxMenu .mi{font-size:15px;min-height:46px}
  html:not(.popdoc) #colPop{left:8px!important;right:8px;top:auto!important;bottom:calc(8px + env(safe-area-inset-bottom,0px));width:auto!important;max-height:80vh;border-radius:16px}
  /* while a dialog is open, the image gets the space: no overlays on it */
  body:has(#modalWrap:not([hidden]):not(.spot)) :is(.lrail,.tsc,.tesc,.thint,.qs,#optbar){visibility:hidden}
  /* the tool icon in the options strip shows how to use the tool */
  html:not(.popdoc) #optbar .opt-tool.tap{position:relative;cursor:pointer;padding-right:12px}
  html:not(.popdoc) #optbar .opt-tool.tap::after{content:'?';position:absolute;left:12px;top:-4px;width:13px;height:13px;border-radius:50%;background:var(--raise);border:1px solid var(--line-2);font:700 9px/12px system-ui;text-align:center;color:var(--muted)}
  /* size and opacity sliders on the left edge (15-touch.js) */
  .touchbar{left:auto;right:8px;bottom:8px;padding:3px;gap:2px;border-radius:10px}
  .touchbar .undo,.touchbar .redo,.touchbar .tsep{display:none}
  .touchbar .tk{min-width:38px;height:36px;font-size:12px}
}
/* a phone on its side: tools down the left, the options strip at the bottom, panels and dialogs from the right */
@media (max-height:500px) and (pointer:coarse) and (orientation:landscape){
  html:not(.popdoc) #app{grid-template-rows:calc(44px + env(safe-area-inset-top,0px)) minmax(0,1fr)!important}
  html:not(.popdoc) #menubar{padding-left:calc(6px + env(safe-area-inset-left,0px));padding-right:calc(6px + env(safe-area-inset-right,0px))}
  html:not(.popdoc) #main{grid-template-columns:auto minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
  html:not(.popdoc) #toolbar{order:0;flex-direction:column;height:auto;width:auto;padding:6px 6px 0 calc(6px + env(safe-area-inset-left,0px));border-top:0;border-right:1px solid var(--line);overflow-x:hidden;overflow-y:auto;touch-action:pan-y;align-items:center;scroll-snap-type:none}
  html:not(.popdoc) #tools{flex-direction:column}
  html:not(.popdoc) #toolbar .tb{width:46px;height:42px}
  html:not(.popdoc) #toolbar .tb.phg{flex:none;width:52px;height:46px}
  #phTray{left:calc(66px + env(safe-area-inset-left,0px));right:calc(8px + env(safe-area-inset-right,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px))}
  html:not(.popdoc) #toolbar .colors{position:sticky;bottom:0;right:auto;align-self:stretch;flex-direction:column;margin:auto 0 0;padding:18px 0 6px;background:linear-gradient(to bottom,transparent,var(--panel) 16px)}
  html:not(.popdoc) #optbar{left:calc(66px + env(safe-area-inset-left,0px));right:calc(8px + env(safe-area-inset-right,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px));width:auto}
  html:not(.popdoc) #optMore{left:calc(66px + env(safe-area-inset-left,0px))!important;right:calc(8px + env(safe-area-inset-right,0px));bottom:calc(62px + env(safe-area-inset-bottom,0px));max-height:calc(100% - 120px)}
  #toast,#busy{bottom:calc(66px + env(safe-area-inset-bottom,0px))}
  html:not(.popdoc) #panels{top:calc(44px + env(safe-area-inset-top,0px));bottom:0;left:auto;right:0;width:min(360px,52vw);height:auto;transform:translateX(104%);border-top:0;border-left:1px solid var(--line-2);border-radius:16px 0 0 0;box-shadow:-18px 0 40px rgba(0,0,0,.5);padding-right:env(safe-area-inset-right,0px);padding-bottom:0}
  html:not(.popdoc) #panels.open{transform:none}
  html:not(.popdoc) #sheetGrab{display:none}
  .hp-acts{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:20px}
  .hp-act,.hp-act.main{grid-column:auto;grid-template-columns:1fr;justify-items:start;min-height:0;padding:12px;row-gap:4px}
  .hp-act svg{grid-row:auto;width:24px;height:24px}.hp-act.main b,.hp-act b{font-size:14px}.hp-act span{display:none}
  #home.phone .home-main{padding-left:calc(16px + env(safe-area-inset-left,0px));padding-right:calc(16px + env(safe-area-inset-right,0px))}
  .hp-create{left:auto;width:min(420px,60vw);right:calc(12px + env(safe-area-inset-right,0px))}
  html.touchui:not(.popdoc) .qsl{height:86px}html.touchui:not(.popdoc) .qs{gap:10px;left:12px;transform:translateY(-70%)}
  html.touchui:not(.popdoc) #sheetTabs{padding-top:10px}
  html.touchui:not(.popdoc) .lrail{max-height:calc(100% - 80px);right:calc(8px + env(safe-area-inset-right,0px))}
  html:not(.popdoc) #modalWrap:not(.spot){place-items:stretch end;padding:0}
  html:not(.popdoc) #modalWrap:not(.spot) .modal:not(.crm){width:min(420px,58vw)!important;max-height:none;height:100%;border-radius:16px 0 0 16px;border-width:0 0 0 1px;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) 0;box-shadow:-14px 0 40px rgba(0,0,0,.55)}
  .crm .mbody{display:grid!important;grid-template-columns:minmax(0,1fr) min(340px,46vw);grid-template-rows:auto auto minmax(0,1fr);column-gap:12px}
  .crm .cr-pv{grid-column:1;grid-row:1/4;max-height:none}.crm .cr-pv canvas{max-height:calc(100vh - 120px)}
  .crm .cr-info,.crm .cr-tabs,.crm .cr-ctl{grid-column:2}
  .modal.crm{padding:0 env(safe-area-inset-right,0px) 0 env(safe-area-inset-left,0px)}
}
@media (prefers-reduced-motion:reduce){#panels{transition:none}}
/* swiping between panels (15-phone.js) */
@keyframes swl{from{transform:translateX(36px);opacity:.4}}@keyframes swr{from{transform:translateX(-36px);opacity:.4}}
html.touchui .panel.oneon.swipe-l{animation:swl .18s ease-out}html.touchui .panel.oneon.swipe-r{animation:swr .18s ease-out}
@media (prefers-reduced-motion:reduce){html.touchui .panel.oneon.swipe-l,html.touchui .panel.oneon.swipe-r{animation:none}}
/* swipe over the picture to adjust (15-touch.js): the setting's name and value, or the list to choose from */
#swpHud{position:fixed;z-index:70;left:50%;top:calc(70px + env(safe-area-inset-top,0px));transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 16px;border-radius:12px;background:rgba(18,18,22,.86);color:#fff;font-size:14px;pointer-events:none;box-shadow:0 6px 22px rgba(0,0,0,.4);max-width:calc(100vw - 32px)}
#swpHud[hidden]{display:none}#swpHud b{font-weight:600}#swpHud span{font-size:20px;font-variant-numeric:tabular-nums}
#swpHud div{padding:3px 10px;border-radius:6px;color:#bbb}#swpHud div.on{background:var(--accent);color:var(--accent-ink);font-weight:600}
/* Meme maker (15-meme.js): the caption box's colour swatches */
.meme-cols{display:flex;gap:10px;margin:2px 0 12px}.meme-col{width:38px;height:38px;border-radius:50%;border:2px solid var(--line-2);cursor:pointer}.meme-col.on{outline:3px solid var(--accent);outline-offset:2px}
html.meme .lrail,html.meme .tsc,html.meme .qs{display:none!important} /* the meme maker keeps the picture clear: layers are in the top bar */
/* the keyboard is up (15-phone.js kbdFit): the app fills the part of the screen above it, and stays put */
html.kbd body{position:fixed;left:0;right:0;top:var(--vvt,0px);height:var(--vvh,100%)}
html.kbd #modalWrap{top:var(--vvt,0px);bottom:auto;height:var(--vvh,100%)}
html.kbd #modalWrap:not(.spot) .modal:not(.crm){max-height:calc(100% - 40px)}
html.touchui body:has(#panels.open) .lrail{visibility:hidden} /* the open panel sheet shows the layers; the thumbnails would cover the picture */
html.touchui .qsl[hidden]{display:none}
