/* editor2 (Teo 8 nov 2026, decision #5): the card fills the screen; tap the photo or the words on the card to edit them. Phone first.
   Fondly Airmail colors. No pill shapes: buttons and tiles are 10 px rounded rectangles. */
#ed2{--ink:#14213D;--blue:#1F4FB8;--rust:var(--fp-cta,#A50E1C);--soft:#F3F4F6;--line:#E4E7EE;--mut:#5A6478;--bg:#EEF1F6;
  position:fixed;inset:0;z-index:1000;background:var(--bg);color:var(--ink);display:flex;flex-direction:column;font:15px/1.35 Figtree,system-ui,-apple-system,sans-serif;
  -webkit-tap-highlight-color:transparent;overscroll-behavior:contain;touch-action:manipulation}
#ed2 *{box-sizing:border-box}
#ed2 button{font:inherit;color:inherit;cursor:pointer}
#ed2 .vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#ed2 .top{display:flex;align-items:center;justify-content:space-between;gap:8px;height:54px;padding:0 10px;background:#fff;border-bottom:1px solid var(--line);flex:none}
#ed2 .lnk{background:none;border:0;text-decoration:underline;font-weight:700;color:var(--blue);min-height:44px;padding:0 6px}
#ed2 .ur{display:flex;gap:4px}
#ed2 .ico{width:44px;height:44px;border:0;background:none;border-radius:10px;display:grid;place-items:center}
#ed2 .ico:disabled{opacity:.3;cursor:default}
#ed2 .ico svg,#ed2 .tool svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#ed2 .pri{background:var(--blue);color:#fff;border:0;border-radius:10px;font-weight:700;min-height:44px;padding:0 16px}
#ed2 .pri.cta{background:var(--rust)}
#ed2 .pri:disabled{opacity:.55}
#ed2 .sec{background:#fff;border:1.5px solid var(--line);border-radius:10px;font-weight:700;min-height:44px;padding:0 14px}
#ed2 .tools{display:flex;justify-content:center;gap:2px;padding:6px 6px 4px;flex:none;overflow-x:auto;scrollbar-width:none}
#ed2 .tools::-webkit-scrollbar{display:none}
#ed2 .tool{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:62px;padding:6px 4px;border:0;background:none;border-radius:10px;font-size:12px;font-weight:600}
#ed2 .tool[aria-pressed=true]{background:#fff;box-shadow:0 1px 3px rgba(20,33,61,.15)}
#ed2 .tool[hidden]{display:none}
#ed2 .stage{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center;padding:8px}
#ed2 .e2card{position:relative;background:#fff;box-shadow:0 6px 24px rgba(20,33,61,.18);touch-action:none}
#ed2 .e2card>svg{display:block;width:100%;height:100%}
#ed2 .hit{position:absolute;border:0;background:transparent;padding:0;margin:0;display:grid;place-items:center}
#ed2 .hit.slot .add{width:46px;height:46px;border-radius:50%;background:#fff;border:2px solid var(--blue);display:grid;place-items:center;box-shadow:0 2px 6px rgba(0,0,0,.15)}
#ed2 .hit.slot .add svg{width:24px;height:24px;stroke:var(--blue);fill:none;stroke-width:2}
#ed2 .hit[aria-pressed=true]{outline:3px solid var(--blue);outline-offset:2px}
#ed2 .hit.txt{outline:2px dashed rgba(31,79,184,.55);outline-offset:1px}
#ed2 .hit.txt[aria-pressed=true]{outline:3px solid var(--blue)}
#ed2 .hit.st{outline:2px dashed rgba(165,67,47,.0)}
#ed2 .hit.st[aria-pressed=true]{outline:2px dashed var(--rust)}
#ed2 .lowres{position:absolute;left:6px;bottom:6px;background:#F3F4F6;color:#7A4B00;border:1px solid #E9B949;border-radius:8px;font-size:11px;font-weight:700;padding:2px 6px;pointer-events:none}
#ed2 .lock{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:10px}
#ed2 .lock span{background:rgba(255,255,255,.94);border-radius:10px;padding:6px 10px;font-size:12px;font-weight:600;box-shadow:0 1px 4px rgba(0,0,0,.12)}
#ed2 .edit{position:absolute;z-index:3;background:rgba(255,255,255,.97);border:2px solid var(--blue);border-radius:6px;resize:none;text-align:center;padding:2px;outline:0;overflow:hidden;line-height:1.2}
#ed2 .float{position:absolute;left:50%;transform:translateX(-50%);top:8px;z-index:4;display:flex;gap:2px;background:#fff;border-radius:12px;box-shadow:0 4px 18px rgba(20,33,61,.22);padding:4px}
#ed2 .float button{border:0;background:none;border-radius:var(--fp-r);min-width:64px;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;font-weight:700}
#ed2 .float button svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9}
#ed2 .float .done{color:#1B7A43}
#ed2 .hint{position:absolute;bottom:6px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;border-radius:10px;padding:6px 10px;font-size:12px;z-index:4;white-space:nowrap}
#ed2 .faces{display:flex;justify-content:center;gap:8px;padding:6px 8px calc(8px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);flex:none}
#ed2 .face{border:2px solid transparent;border-radius:8px;background:none;padding:2px;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;font-weight:600;color:var(--mut)}
#ed2 .face[aria-pressed=true]{border-color:var(--blue);color:var(--ink)}
#ed2 .face .th{height:50px;display:flex;gap:1px;align-items:center}
#ed2 .face .th svg,#ed2 .face .th img{height:100%;width:auto;display:block;border:1px solid var(--line);background:#fff}
#ed2 .sheet{position:relative;flex:none;z-index:6;background:#fff;border-radius:16px 16px 0 0;box-shadow:0 -6px 30px rgba(20,33,61,.2);max-height:46%;display:flex;flex-direction:column;padding:6px 14px calc(12px + env(safe-area-inset-bottom))}
#ed2.has-sheet .faces{display:none}
#ed2 .sheet[hidden]{display:none}
#ed2 .sheet .grab{width:40px;height:4px;border-radius:2px;background:var(--line);margin:4px auto 6px}
#ed2 .sheet h2{font-size:18px;margin:0;display:flex;justify-content:space-between;align-items:center}
#ed2 .sheet .body{overflow:auto;padding-top:6px}
#ed2 .sheet p.mut,#ed2 .mut{color:var(--mut);font-size:13px;margin:4px 0 8px}
#ed2 .lib{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px}
#ed2 .lib .t{aspect-ratio:1;border-radius:10px;border:2px solid var(--line);background:#F5F7FB center/cover no-repeat;position:relative;padding:0}
#ed2 .lib .t.addp{border-color:var(--blue);color:var(--blue);font-weight:700;font-size:13px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#fff}
#ed2 .lib .t.addp svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:2}
#ed2 .lib .t .st{position:absolute;left:4px;bottom:4px;font-size:10px;font-weight:700;background:rgba(255,255,255,.92);border-radius:6px;padding:1px 5px}
#ed2 .lib .t .st.bad{color:#9B1C1C}
#ed2 .chk{display:flex;gap:10px;align-items:flex-start;margin:10px 0 2px;font-size:14px}
#ed2 .chk input{width:22px;height:22px;flex:none;margin:0}
#ed2 .tiles{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 10px}
#ed2 .tile{border:2px solid var(--line);background:#fff;border-radius:10px;min-width:64px;min-height:56px;padding:6px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:12px;font-weight:600}
#ed2 .tile[aria-pressed=true]{border-color:var(--blue);background:var(--soft)}
#ed2 .tile .aa{font-size:22px;line-height:1}
#ed2 .sw{width:40px;height:40px;border-radius:10px;border:2px solid var(--line);padding:0}
#ed2 .sw[aria-pressed=true]{outline:3px solid var(--blue);outline-offset:2px}
#ed2 .lay svg{width:46px;height:46px}
#ed2 .chars h3{font-size:14px;margin:8px 0 4px}
#ed2 .poses{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:6px}
#ed2 .poses button{aspect-ratio:1;border:1.5px solid var(--line);border-radius:var(--fp-r);background:#FAFBFD center/contain no-repeat;padding:0}
#ed2 .row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
#ed2 .field{display:block;margin:6px 0}
#ed2 .field span{display:block;font-size:13px;font-weight:700;margin-bottom:3px}
#ed2 .field input,#ed2 .field textarea{width:100%;border:1.5px solid var(--line);border-radius:var(--fp-r-sm);padding:10px;font:inherit;font-size:16px}
#ed2 .sw2{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1.5px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0}
#ed2 .sw2 input{width:44px;height:26px}
#ed2 .err{color:#9B1C1C;font-size:13px;font-weight:600;min-height:18px;margin:6px 0 0}
#ed2 .pv{position:absolute;inset:0;z-index:8;background:var(--bg);display:flex;flex-direction:column}
#ed2 .pv[hidden]{display:none}
#ed2 .pv .scroll{flex:1;overflow:auto;padding:12px 12px 4px}
#ed2 .pv .face2{margin:0 auto 14px;max-width:560px}
#ed2 .pv .face2 h3{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--mut);margin:0 0 6px}
#ed2 .pv .pair{display:flex;gap:2px;box-shadow:0 6px 20px rgba(20,33,61,.16);background:#fff}
#ed2 .pv .pair.col{flex-direction:column}
#ed2 .pv .pair>div{flex:1;position:relative}
#ed2 .pv img{display:block;width:100%;height:auto}
#ed2 .pv .one{box-shadow:0 6px 20px rgba(20,33,61,.16);background:#fff}
#ed2 .pv .ov{position:absolute;inset:0;width:100%;height:100%}
#ed2 .pv .cap{font-size:12px;color:var(--mut);margin:6px 0 0}
#ed2 .pv .foot{background:#fff;border-top:1px solid var(--line);padding:10px 12px calc(10px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:8px}
#ed2 .pv .foot .row>button{flex:1}
#ed2 .wait{display:flex;align-items:center;justify-content:center;min-height:240px;color:var(--mut);font-weight:600}
#ed2 .kidq{background:#fff;border:1.5px solid var(--line);border-radius:10px;padding:8px 10px}
#ed2 .kidq b{display:block;margin-bottom:6px}
@media (min-width:900px){#ed2 .stage{padding:20px}#ed2 .sheet{align-self:center;width:640px;max-height:40%}#ed2 .face .th{height:64px}}
/* fixes-nav (Teo 8 nov ~15:00): Preview (optional) + Add to cart side by side in the top bar; its error line under the bar */
#ed2 .top [data-a=preview]{margin-left:auto}
#ed2 .top [data-a=add]{background:var(--rust)}
#ed2 .top-err{margin:0;padding:0 12px;min-height:0;text-align:right;flex:none}
#ed2 .top-err:empty{display:none}
@media(max-width:420px){#ed2 .top{gap:6px;padding:0 8px}#ed2 .top .pri,#ed2 .top .sec{padding:0 10px;font-size:14px}}

/* fixes-nav (8 nov): the kept draft note and the "Keep your draft?" question on Exit */
#ed2 .note{margin:0;padding:4px 12px;font-size:14px;background:#F7F8FA;color:#14213D;display:flex;align-items:center;gap:6px;flex:none}
#ed2 .keepq{position:absolute;left:8px;right:8px;top:60px;z-index:12;background:#fff;border:2px solid var(--blue);border-radius:10px;box-shadow:0 10px 30px rgba(20,33,61,.22);padding:14px;display:grid;gap:8px;max-width:520px;margin:0 auto}
#ed2 .keepq[hidden]{display:none}
#ed2 .keepq .row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#ed2 .keepq .row button{min-height:44px}
