@font-face{font-family:'Poppins';font-weight:400;font-style:normal;font-display:swap;src:url('Poppins-Regular.woff') format('woff')}
@font-face{font-family:'Poppins';font-weight:500;font-style:normal;font-display:swap;src:url('Poppins-Medium.woff') format('woff')}
@font-face{font-family:'Poppins';font-weight:600 700;font-style:normal;font-display:swap;src:url('Poppins-Bold.woff') format('woff')}
:root{
  --bg:#ffffff;--surface:#f2f3f5;--line:#e6e7ea;--text:#16181c;--muted:#6b7079;--faint:#9aa0a8;
  --print:#1f5fd6;--email:#20a64a;--wa:#25c35d;--qr:#8a2be2;--primary:#3b82f6;--danger:#d93a3a;--ok:#1f9d55;
  --radius:14px;--safe-b:env(safe-area-inset-bottom,0px);
  font-family:'Poppins','Outfit','Gilroy','Sofia Pro',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  color:var(--text);background:var(--bg);-webkit-text-size-adjust:100%;color-scheme:light;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:var(--bg);overscroll-behavior:none}
body{min-height:100vh;min-height:100dvh}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
button:disabled{cursor:default}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
[hidden]{display:none!important}
:focus-visible{outline:3px solid rgba(59,130,246,.55);outline-offset:2px}

/* Top bar */
.head{position:sticky;top:0;z-index:20}
.bar{display:flex;gap:10px;align-items:center;padding:calc(12px + env(safe-area-inset-top,0px)) 14px 12px;background:rgba(255,255,255,.94);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid var(--line)}
.search{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:46px;padding:0 14px;border-radius:12px;background:var(--surface);color:var(--muted)}
.search svg{width:19px;height:19px}
.search input{flex:1;min-width:0;border:0;background:transparent;outline:0;font-size:16px;color:var(--text)}
.search input::placeholder{color:var(--faint)}
.search input::-webkit-search-cancel-button{-webkit-appearance:none}
.icon-btn{width:46px;height:46px;border-radius:12px;background:var(--surface);display:grid;place-items:center;color:#454a52;transition:background .15s,color .15s}
.icon-btn:active{background:#e4e6ea}
.icon-btn.has-new{position:relative;color:var(--print)}
.icon-btn.has-new:after{content:"";position:absolute;right:6px;top:6px;width:8px;height:8px;background:#287553;border-radius:50%;box-shadow:0 0 0 2px #fff}
.icon-btn[aria-pressed="true"]{background:#dbe7ff;color:var(--print)}

.filter{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 14px 0;padding:10px 14px;border-radius:12px;background:#eef4ff;color:#1d3f86;font-size:14px}
.filter button{font-weight:600;color:var(--print);padding:4px 2px}.filter-btns{display:flex;gap:14px;align-items:center}.filter #filter-all{background:#14171c;color:#fff;border-radius:12px;padding:9px 18px;font-weight:700}

/* Grid */
main{padding:12px 12px calc(84px + var(--safe-b))}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
@media (min-width:760px){.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}main{padding:16px 18px calc(84px + var(--safe-b))}}
@media (min-width:1180px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.tile{position:relative;display:block;width:100%;border:1px solid var(--line);padding:6px;border-radius:var(--radius);overflow:hidden;background:#fff;aspect-ratio:3/2;box-shadow:0 1px 2px rgba(16,24,40,.06)}
.tile.portrait{aspect-ratio:2/3}
.tile img{width:100%;height:100%;object-fit:contain;display:block;border-radius:8px;background:var(--surface);opacity:0;transition:opacity .25s}
.tile img.loaded{opacity:1}
.tile video{position:absolute;inset:6px;width:calc(100% - 12px);height:calc(100% - 12px);border-radius:8px;object-fit:contain;background:#111;opacity:0;transition:opacity .2s;pointer-events:none}
.tile video.playing{opacity:1}
.tile .vplay{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:50%;background:rgba(17,19,22,.42);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:grid;place-items:center;pointer-events:none}.tile .vplay svg.fa{width:18px;height:18px;color:#fff;fill:#fff;margin-left:2px;filter:drop-shadow(0 1px 2px rgba(0,0,0,.3))}
.tile .video-label{position:absolute;left:8px;top:8px;padding:4px 7px;border-radius:5px;background:rgba(15,17,20,.72);color:#fff;font-size:10px;font-weight:700;letter-spacing:.6px;pointer-events:none}
.tile:active{transform:scale(.985)}
.badge{position:absolute;right:8px;bottom:8px;display:inline-flex;align-items:center;gap:4px;padding:4px 9px;border-radius:999px;background:rgba(17,19,23,.72);color:#fff;font-size:13px;font-weight:600;letter-spacing:.2px;font-variant-numeric:tabular-nums}
.badge svg{width:14px;height:14px;stroke-width:2}
.badge.new{left:8px;right:auto;background:var(--print)}
.badge.tbl{top:8px;right:8px;left:auto;bottom:auto;background:rgba(17,19,23,.72)}  /* 1.9.15: table label */
.badge .qno-i{background:#fdecc8;color:#7a4a00;border-radius:999px;padding:1px 7px;margin-left:2px}
.badge.qno{right:auto;left:8px;background:#fdecc8;color:#7a4a00}  /* 1.9.50: queue number, only while Queue is on */
.empty{display:grid;justify-items:center;gap:10px;padding:80px 20px;color:var(--muted);text-align:center}
.empty svg{width:44px;height:44px;stroke-width:1.4;color:var(--faint)}
.empty p{margin:0;font-size:15px}
#sentinel{height:1px}

/* Paired device and printer status */
.status{position:fixed;left:50%;bottom:calc(14px + var(--safe-b));transform:translateX(-50%);z-index:70;display:inline-flex;align-items:center;gap:7px;padding:9px 15px;border-radius:15px;background:rgba(255,255,255,.97);border:1px solid var(--line);box-shadow:0 6px 22px rgba(16,24,40,.11);font-size:13px;color:#454a52;white-space:nowrap}
.status.combined{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:220px;width:max-content;max-width:calc(100vw - 24px);padding:10px 15px;touch-action:manipulation;text-align:center;cursor:pointer}
.status .device-row{display:flex;align-items:center;justify-content:center;gap:12px;min-width:0}
.status .device-name{max-width:min(38vw,235px);overflow:hidden;text-overflow:ellipsis;font-weight:700;color:var(--text)}
.status .device-info{display:inline-flex;align-items:center;gap:6px;flex:none;font-size:13px;font-weight:600;color:var(--text)}
.status .printer-info{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:var(--muted);font-size:11px;line-height:1.2}
.status.combined .printer-info{border-top:1px solid var(--line);padding-top:7px}
.status .printer-info .dot{width:6px;height:6px}
.dot{width:8px;height:8px;border-radius:50%;background:var(--faint)}
.dot.on{background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.18)}
.dot.off{background:var(--danger)}
.dot.warn{background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.2)}
.dlg-foot:has(.ghost[hidden]){grid-template-columns:1fr}

/* Overlays */
.overlay{position:fixed;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:16px 16px calc(76px + var(--safe-b));background:#000;animation:fade .18s ease}
.overlay.dim{z-index:50;background:rgba(10,12,16,.55)}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes rise{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}

.sheet{position:relative;width:min(100%,980px);max-height:100%;display:flex;flex-direction:column;background:#fff;border-radius:18px;overflow:hidden;animation:rise .22s ease}
.sheet-top{display:flex;justify-content:space-between;align-items:center;padding:14px 14px 10px}
.counter{padding:5px 12px;border-radius:999px;background:#3b3e44;color:#fff;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.close{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.16);color:#222}
.close.plain{box-shadow:none;width:34px;height:34px;color:#555}
.stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:200px;flex:1;touch-action:pan-y}
.stage img{display:block;width:100%;height:auto;max-height:calc(100dvh - 260px);object-fit:contain;user-select:none;-webkit-user-drag:none}
.nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:rgba(30,32,36,.55);color:#fff}
.nav svg{stroke-width:2.4}
.nav.prev{left:10px}.nav.next{right:10px}
.nav:disabled{opacity:0;pointer-events:none}
.actions{display:flex;justify-content:center;gap:10px;padding:22px 14px 20px}
.act{width:78px;height:70px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#fff;font-size:12.5px;font-weight:600;box-shadow:0 2px 6px rgba(0,0,0,.12);transition:transform .08s,filter .15s}
.act svg{width:24px;height:24px}
.act:active{transform:scale(.96);filter:brightness(.92)}
.act.print{background:var(--print)}.act.email{background:var(--email)}.act.wa{background:var(--wa)}.act.qr{background:var(--qr)}
@media (min-width:760px){.act{width:96px;height:78px;font-size:13.5px}.actions{gap:14px}}

/* Dialog */
.dialog{width:min(100%,460px);background:#fff;border-radius:16px;padding:22px 20px 20px;box-shadow:0 24px 60px rgba(0,0,0,.25);animation:rise .2s ease;max-height:100%;overflow:auto}
.dlg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}
.dialog h2{margin:0 0 5px;font-size:21px;font-weight:650;letter-spacing:-.2px}
.dialog p{margin:0;color:var(--muted);font-size:14px;line-height:1.45}
.field{display:block;margin:0 0 14px}
.field>span{display:block;margin-bottom:7px;font-size:14px;font-weight:600;color:#30343a}
.input,.select{display:block;width:100%;height:50px;padding:0 14px;border:1px solid #d9dce1;border-radius:10px;background:#fff;font-size:17px;outline:0;-webkit-appearance:none;appearance:none}
.input:focus,.select:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(59,130,246,.18)}
.select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5M7 15l5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;padding-right:38px}
.phone{display:flex;gap:8px}
.phone .code{flex:none;width:78px;display:grid;place-items:center;border:1px solid #d9dce1;border-radius:10px;background:var(--surface);font-size:17px;font-weight:500}
.phone .code input{width:100%;height:100%;border:0;background:transparent;text-align:center;font-size:17px;outline:0}
.phone .input{flex:1;min-width:0}
.dlg-foot{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px}
.btn{height:50px;border-radius:10px;font-size:16px;font-weight:600;transition:background .15s,opacity .15s}
.btn.ghost{border:1px solid #d9dce1;background:#fff;color:#222}
.btn.primary{background:var(--primary);color:#fff}
.btn.primary:disabled{opacity:.55}
.btn.primary.done{background:var(--ok);opacity:1}
.msg{min-height:0;margin:0 0 10px!important;font-size:14px}
.msg:empty{display:none}
.msg.ok{color:var(--ok)!important;font-weight:600}
.msg.err{color:var(--danger)!important}
.qrbox{display:grid;justify-items:center;gap:12px;padding:4px 0 8px}
.qrbox svg{width:min(260px,70vw);height:auto;stroke:none}
.stepper{display:flex;align-items:center;justify-content:center;gap:26px;margin:6px 0 18px}
.stepper button{width:54px;height:54px;border-radius:50%;background:var(--surface);font-size:26px;font-weight:500}
.stepper button:disabled{opacity:.38}
.stepper output{min-width:44px;text-align:center;font-size:32px;font-weight:650;font-variant-numeric:tabular-nums}
.print-label{font-size:14px!important;color:var(--text)!important;font-weight:650;text-align:center}
.face-suggestion{margin:0 0 14px!important;padding:12px 14px;border-radius:10px;background:#eef5f1;color:#215a41!important;font-size:14px!important;text-align:center}
.face-suggestion.check{background:#fff6e0;color:#7a5200!important}   /* 1.9.113: counts differ, staff please check */
.quantity-box+.note{font-size:15px!important;font-weight:600;color:var(--text)!important;margin-top:8px!important}   /* 1.9.113: packs / sheets line */
.print-review{display:flex;align-items:center;gap:16px;padding:12px;border:1px solid var(--line);border-radius:12px;margin:0 0 14px}
.print-review img{width:112px;height:84px;object-fit:contain;background:var(--surface);border-radius:8px}
.print-review b,.print-review span{display:block}.print-review b{font-size:20px}.print-review span{margin-top:4px;font-size:14px;color:var(--muted)}
.note{font-size:13px!important;text-align:center}
.camera{position:relative;border-radius:14px;overflow:hidden;background:#111;aspect-ratio:3/4;max-height:52vh;margin:0 auto 14px}
.camera .cam-wait{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:8px;color:#e8e8e8;font-size:14px;font-weight:600}
.camera .cam-wait[hidden]{display:none}
.camera .cam-switch{position:absolute;right:10px;top:10px;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border:0;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font:600 14px/1 inherit;cursor:pointer;z-index:2}
.camera .cam-switch[hidden]{display:none}
.camera .cam-switch:disabled{opacity:.6}
.camera video{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.camera .cam-still{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.camera video[hidden]{display:none}
.camera .cam-low{position:absolute;left:12px;top:12px;display:flex;align-items:center;gap:6px;background:rgba(255,246,224,.95);color:#7a5200;font-size:13px;font-weight:600;padding:6px 10px;border-radius:99px}
.cam-tip{margin:0 0 4px;padding:9px 12px;border-radius:10px;background:#eef5f1;color:#215a41;font-size:13px;text-align:center}
.fm-label{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted,#6b7079);margin:4px 0 8px}
.fm-avas{display:flex;flex-wrap:wrap;gap:14px;margin-bottom:12px}
.fm-ava{display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:transparent;padding:0;font:inherit;cursor:pointer}
.fm-ava img{width:64px;height:64px;border-radius:50%;object-fit:cover;box-sizing:border-box;border:3px solid #e6e7ea}
.fm-ava span{font-size:12px;font-weight:700;color:#6b7079}
.fm-ava.me img{border-color:#3b82f6}.fm-ava.me span{color:#1f5fd6}
.fm-ava.on img{border-color:#22c55e}.fm-ava.on span{color:#15803d}
.fm-ava.off img{opacity:.45}
.fm-modes{display:grid;gap:8px}
.fm-mode{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border-radius:12px;border:2px solid #e6e7ea;background:#fff;color:#16181c;font:inherit;text-align:left;cursor:pointer}
.fm-mode.sel{border-color:#3b82f6;background:#eef4ff}
.fm-dot{flex:none;width:20px;height:20px;border-radius:50%;box-sizing:border-box;border:2px solid #c3c8d0}.fm-mode.sel .fm-dot{border:6px solid #3b82f6}
.fm-txt{display:flex;flex-direction:column;gap:2px}.fm-txt b{font-size:15px}.fm-txt small{font-size:12.5px;color:#6b7079}
.fm-retake{margin-top:12px;width:100%}
.filter-ava{display:inline-flex;margin-right:8px;vertical-align:middle}.filter-ava img{width:28px;height:28px;border-radius:50%;object-fit:cover;border:2px solid #fff;margin-left:-8px}.filter-ava img:first-child{margin-left:0}
.spin{display:inline-block;width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite;vertical-align:-3px;margin-right:8px}
@keyframes spin{to{transform:rotate(360deg)}}

.toast{position:fixed;left:50%;bottom:calc(80px + var(--safe-b));transform:translateX(-50%);z-index:60;max-width:calc(100% - 32px);padding:12px 18px;border-radius:12px;background:#1d2025;color:#fff;font-size:15px;box-shadow:0 10px 30px rgba(0,0,0,.25);animation:rise .2s ease}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.consent{display:flex;gap:10px;align-items:flex-start;margin:2px 0 14px;font-size:14px;color:#30343a;line-height:1.4;text-align:left}
.consent input{width:22px;height:22px;flex:none;margin:0;accent-color:var(--primary)}
.pdpa-gate{padding:16px 16px 2px;margin:0 0 16px;background:#f2f5f3;border:1px solid #dbe5dd;border-radius:12px}
.pdpa-gate .pdpa-copy{font-size:15px;color:#252f29;white-space:pre-line;text-align:left;overflow-wrap:anywhere;margin:0 0 16px;line-height:1.5}
.pdpa-gate .consent{font-weight:600}
.tabs{display:flex;gap:8px;padding:10px 14px 0}.tabs button{flex:1;height:42px;border-radius:11px;background:var(--surface);font-weight:600;font-size:15px;color:#454a52}
.tabs button[aria-pressed="true"]{background:#16181c;color:#fff}.tabs span{opacity:.6;font-weight:500;margin-left:4px}
.act.tg{background:#229ed9}
.stage video{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 260px);object-fit:contain;background:#000;pointer-events:auto}
.stage.video-portrait video{max-width:min(100%,400px)}
.video-play,.video-sound{position:absolute;z-index:2;border:1px solid rgba(255,255,255,.25);background:rgba(17,19,22,.82);color:#fff;font-size:14px;font-weight:650;border-radius:999px;padding:11px 16px}
.video-play{top:50%;left:50%;transform:translate(-50%,-50%)}
.video-sound{right:14px;bottom:14px;font-size:12px;padding:8px 12px}
.video-play[hidden],.video-sound[hidden]{display:none}
.chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:10px;margin:4px 0 14px}
.chip{height:78px;border-radius:14px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:2px solid transparent;transition:transform .08s}
.chip b{font-size:28px;line-height:1}.chip small{font-size:12px;color:var(--muted)}.chip:active{transform:scale(.96)}
.chip.busy{border-color:var(--print);background:#e8efff}.chip:disabled{opacity:.5}
.tgbox{display:grid;justify-items:center;gap:10px}.tgbox svg{width:min(240px,64vw);height:auto;stroke:none}.tgbox .steps{font-size:14px!important;text-align:left;color:#30343a!important;line-height:1.6}
.tg-choices{display:grid;gap:9px;margin:4px 0 17px}.tg-choice{display:flex;gap:12px;align-items:center;border:1px solid #d9dce1;border-radius:11px;padding:12px;cursor:pointer}.tg-choice:has(input:checked){border-color:#222;background:#f5f6f7}.tg-choice input{width:18px;height:18px;accent-color:#222}.tg-choice span{display:grid;gap:3px}.tg-choice b{font-size:14px}.tg-choice small{font-size:12px;color:#656b73}
.chip.more{grid-column:span 2;flex-direction:row;gap:8px;padding:0 10px}.chip.more input{width:90px;height:48px;border:1px solid #d9dce1;border-radius:10px;text-align:center;font-size:20px}
.chip.more button{height:48px;padding:0 14px;border-radius:10px;background:var(--print);color:#fff;font-weight:700}

/* 1.3.1 bottom dock: PCs & printers (left, tap = details, double-tap = operator), event (centre), refresh + this iPad (right).
   Fixed above the photo viewer and the sharing dialogs, so the status is always visible. */
.dock{position:fixed;left:0;right:0;bottom:0;z-index:70;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;
  padding:8px 12px calc(8px + var(--safe-b));background:rgba(255,255,255,.97);border-top:1px solid var(--line);box-shadow:0 -6px 22px rgba(16,24,40,.08);
  -webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px)}
.devbar{justify-self:start;min-width:0;max-width:100%;display:flex;align-items:center;min-height:44px;padding:4px;border-radius:12px;text-align:left;-webkit-user-select:none;user-select:none;touch-action:manipulation}
.devbar:active{background:var(--surface)}
.dev-chips{display:flex;gap:6px;min-width:0;overflow:hidden}
.chip-dev{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px;border-radius:999px;background:var(--surface);font-size:12.5px;font-weight:600;color:#3d4148;white-space:nowrap;flex:none}
.chip-dev svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
.chip-dev.muted{color:var(--muted);font-weight:500}.chip-dev.bad{background:#fdecec;color:#9b1c1c}.chip-dev.warn{background:#fff4dd;color:#8a5a00}
.chip-dev small{font-weight:500;color:var(--muted)}
.dot.warn{background:#f59e0b}
.evtitle{display:grid;justify-items:center;line-height:1.2;text-align:center;min-width:0;max-width:34vw}
.evtitle b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.evtitle small{font-size:11.5px;color:var(--muted);white-space:nowrap}
.me{justify-self:end;display:flex;align-items:center;gap:8px;min-width:0}
.icon-btn.sm{width:40px;height:40px;border-radius:11px}.icon-btn.sm svg{width:19px;height:19px}
.me-chip{cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;display:flex;align-items:center;gap:8px;min-width:0;padding:4px 12px 4px 10px;border-radius:12px;background:var(--surface)}
.me-txt{display:grid;line-height:1.15;min-width:0}.me-txt b{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:26vw}.me-txt small{font-size:11px;color:var(--muted);white-space:nowrap}
.me-chip.off{background:#fdecec}.me-chip.off small{color:#9b1c1c}
.dev-panel{position:fixed;left:12px;bottom:calc(70px + var(--safe-b));z-index:75;width:min(380px,calc(100vw - 24px));max-height:60vh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 40px rgba(16,24,40,.2);padding:10px}
.dev-panel h4{margin:4px 6px 8px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.dev-row{display:flex;gap:10px;align-items:flex-start;padding:9px 8px;border-radius:10px}.dev-row+.dev-row{border-top:1px solid #f0f1f3}
.dev-row .dot{margin-top:6px;flex:none}.dev-row b{display:block;font-size:14px}.dev-row small{display:block;color:var(--muted);font-size:12.5px;line-height:1.4}
.dev-panel .hint{font-size:12px;color:var(--muted);margin:8px 6px 2px}
.overlay{padding-bottom:calc(76px + var(--safe-b))!important}
main{padding-bottom:calc(88px + var(--safe-b))!important}
.toast{bottom:calc(84px + var(--safe-b))!important}
@media (max-width:760px){.dock{grid-template-columns:minmax(0,1fr) auto}}@media (max-width:620px){.me-txt small{display:none}}
/* 1.3.1.1 select several photos */
.icon-btn.wide{width:auto;padding:0 14px;gap:6px;display:inline-flex;align-items:center;font-weight:600;font-size:14px}
.icon-btn.wide svg{width:20px;height:20px}
#kiosk.selecting .tile{outline:2px solid transparent}
#kiosk.selecting .tile::after{content:"";position:absolute;top:8px;left:8px;width:26px;height:26px;border-radius:50%;border:2px solid #fff;background:rgba(0,0,0,.25);box-shadow:0 1px 4px rgba(0,0,0,.3)}
#kiosk.selecting .tile.picked{outline:4px solid var(--print);outline-offset:-4px}
#kiosk.selecting .tile.picked::after{content:"✓";display:grid;place-items:center;background:var(--print);color:#fff;font-size:15px;font-weight:800;line-height:22px;text-align:center}
.selbar{position:fixed;left:12px;right:12px;bottom:calc(74px + var(--safe-b));z-index:65;display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 12px;border-radius:18px;background:#fff;border:1px solid var(--line);box-shadow:0 12px 34px rgba(16,24,40,.18)}
.sel-left{display:grid;gap:2px;min-width:130px}.sel-left b{font-size:15px}.sel-left button{justify-self:start;padding:0;background:none;border:0;color:var(--print);font-weight:600;font-size:13px}
.sel-acts{display:flex;gap:8px;flex:1;justify-content:center;flex-wrap:wrap}.sel-acts .act{width:74px;height:62px;font-size:12px}.sel-acts .act:disabled{opacity:.35}
.selbar #sel-done{height:46px;padding:0 18px}
#kiosk.selecting main{padding-bottom:calc(190px + var(--safe-b))!important}
.batch-thumbs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}.batch-thumbs img{width:56px;height:56px;object-fit:contain;background:var(--surface);border:1px solid var(--line);padding:3px;border-radius:8px}
.act.tg{background:#229ed9}
.qrlink{display:block;-webkit-touch-callout:default}
.qrimg{display:block;width:min(260px,70vw);height:auto;image-rendering:pixelated;-webkit-touch-callout:default;-webkit-user-select:auto;user-select:auto}
.mqr .qrimg{width:min(200px,40vw)}
.mini-chips{display:flex;flex-wrap:wrap;gap:6px}.mini-chips button{min-width:44px;height:40px;border-radius:10px;background:#fff;border:1px solid #d9dce1;font-weight:700}.mini-chips button[aria-pressed="true"]{background:var(--print);border-color:var(--print);color:#fff}
.qr-demo{font-size:12px!important;color:var(--faint)!important}
/* room for the Send bar under the share buttons */
/* v1.4.1: touch-friendly quantity box and operator shortcut. */
.print-quantity{min-width:160px;font-size:24px;padding:14px 20px;border:1px solid #cad0d8;border-radius:10px;background:#fff;color:#16181c}.quantity-box{text-align:center}.queue-quick{position:fixed;right:18px;top:calc(82px + env(safe-area-inset-top,0px));z-index:28;background:#171b22;color:#fff;border:0;border-radius:10px;padding:10px 14px;font-size:13px;box-shadow:0 2px 8px #0002}

/* ===== 1.5.0 ===== */
/* Font Awesome icons are solid shapes: fill, no stroke (the older line icons keep their outline style). */
svg.fa{fill:currentColor;stroke:none;stroke-width:0}
.icon-btn svg.fa{width:19px;height:19px}.act svg.fa{width:22px;height:22px}.search svg.fa{width:16px;height:16px}
.icon-btn.on{background:var(--text);color:#fff}
/* printer pill (paired iPads), top right */

.quick-pill{flex:none;display:inline-flex;align-items:center;gap:8px;height:46px;padding:0 16px 0 14px;max-width:260px;
  border-radius:12px;background:var(--surface);border:0;font-size:14px;font-weight:600;color:var(--text);white-space:nowrap}
.quick-pill span{overflow:hidden;text-overflow:ellipsis}
.quick-pill svg.fa{width:15px;height:15px}
.qdot{width:9px;height:9px;border-radius:50%;background:var(--faint)}.qdot.ok{background:#16a34a}.qdot.warn{background:#f59e0b}.qdot.bad{background:#dc2626}
/* time filter bar */
.timebar{padding:10px 14px;border-bottom:1px solid var(--line);background:#fff}
.timebar .chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.timebar .chips button{flex:none;height:38px;padding:0 15px;border-radius:999px;border:1px solid var(--line);background:#fff;font-size:14px;font-weight:600;color:var(--muted)}
.timebar .chips button[aria-pressed="true"]{background:var(--text);border-color:var(--text);color:#fff}
.timebar .range{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:10px}
.timebar .range label{display:grid;gap:4px;font-size:12px;color:var(--muted)}
.timebar .range input{height:42px;border:1px solid var(--line);border-radius:10px;padding:0 10px;font-size:15px;background:var(--surface)}
/* quick panel */
.quick{display:grid;gap:14px;text-align:left}
.q-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.q-state{display:flex;align-items:center;gap:12px}.q-state svg.fa{width:22px;height:22px;padding:11px;border-radius:12px;background:var(--surface);box-sizing:content-box}
.q-state b{display:block;font-size:16px}.q-state small{font-size:13px;color:var(--muted)}
.q-state.ok small{color:#15803d}.q-state.warn small{color:#b45309}.q-state.bad small{color:#c2410c}
.q-toggle{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;width:auto!important;flex:none;padding:0 18px!important;min-height:46px}.q-toggle svg.fa{width:14px;height:14px}
.q-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.q-stat{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:12px}
.q-stat svg.fa{grid-row:span 2;width:16px;height:16px;color:var(--muted)}.q-stat b{font-size:17px;line-height:1.1}.q-stat small{font-size:11.5px;color:var(--muted)}
.q-jobs{display:grid;gap:2px}.q-jobs>b{font-size:13px;color:var(--muted);margin-bottom:4px}
.q-job{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:9px 4px;border-bottom:1px solid var(--line)}
.q-job svg.fa{width:15px;height:15px;color:#98a2b3}.q-job.success svg.fa{color:#16a34a}.q-job.failed svg.fa,.q-job.uncertain svg.fa{color:#dc2626}.q-job.claimed svg.fa{color:#f59e0b}
.q-job b{display:block;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-job small{display:block;font-size:12px;color:var(--muted)}
.q-job em{font-style:normal;font-size:12px;font-weight:700;color:var(--muted)}.q-job.success em{color:#15803d}.q-job.failed em,.q-job.uncertain em{color:#c2410c}.q-job.claimed em{color:#b45309}
.quick>.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px}.quick>.btn svg.fa{width:14px;height:14px}
@media (max-width:560px){.q-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.q-head{flex-direction:column;align-items:stretch}}

@media (max-width:760px){.quick-pill span{display:none}.quick-pill{padding:0 14px}}

/* 1.5.0: copies as tap boxes */
.count-boxes{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;max-width:440px;margin:6px auto 4px}
.count-boxes button{height:64px;border-radius:14px;border:2px solid #d9dce1;background:#fff;color:#16181c;font-family:inherit;font-size:22px;font-weight:600;line-height:1;cursor:pointer;transition:background .12s,border-color .12s,transform .08s}
.count-boxes button:active{transform:scale(.96)}
.count-boxes button.on{background:var(--primary);border-color:var(--primary);color:#fff}
@media(max-width:520px){.count-boxes{gap:9px}.count-boxes button{height:54px;font-size:19px}}

/* v1.5.6.6 — bigger photo viewer, smaller share buttons, configurable grid (Operator > Settings > Display) */
.tile img.fit{object-fit:cover}
/* 1.6.4: the picture decides the card height, so nothing is cropped (the bottom of print sheets was being cut) and the card looks the same on phones, iPads and big screens. */
.tile.ar{aspect-ratio:auto!important}
.tile.ar img{height:auto;aspect-ratio:var(--ar,1.5);object-fit:contain;background:transparent}
html[data-pkcols] .grid{grid-template-columns:repeat(var(--pk-cols),minmax(0,1fr))!important}
html[data-pkcols="5"] .grid,html[data-pkcols="6"] .grid,html[data-pkcols="7"] .grid,html[data-pkcols="8"] .grid{gap:6px}
html[data-pkcols="5"] .tile,html[data-pkcols="6"] .tile,html[data-pkcols="7"] .tile,html[data-pkcols="8"] .tile{padding:3px;border-radius:9px}
html[data-pkcols="5"] .tile img,html[data-pkcols="6"] .tile img,html[data-pkcols="7"] .tile img,html[data-pkcols="8"] .tile img{border-radius:6px}
html[data-pkcols="7"] .badge,html[data-pkcols="8"] .badge{transform:scale(.8);transform-origin:top right}
html[data-pkcols="1"] .tile{padding:8px}
html[data-pkview="compact"] #viewer.overlay{padding:8px 8px calc(60px + var(--safe-b))!important}
html[data-pkview="compact"] .sheet{width:min(100%,1180px);border-radius:14px}
html[data-pkview="compact"] .sheet-top{padding:8px 12px 4px}
html[data-pkview="compact"] .stage{min-height:140px}
html[data-pkview="compact"] .stage img{max-height:calc(100dvh - 222px)}
html[data-pkview="compact"] .stage video{max-height:calc(100dvh - 222px)}
html[data-pkview="compact"] .actions{padding:12px 10px 14px;gap:14px}
html[data-pkview="compact"] .act{width:76px;height:64px;border-radius:12px;font-size:12px;gap:4px}
html[data-pkview="compact"] .act svg.fa{width:21px;height:21px}
html[data-pkview="large"] #viewer.overlay{padding:4px 4px calc(56px + var(--safe-b))!important}
html[data-pkview="large"] .sheet{width:100%;border-radius:12px}
html[data-pkview="large"] .sheet-top{padding:6px 10px 2px}
html[data-pkview="large"] .stage{min-height:120px}
html[data-pkview="large"] .stage img,html[data-pkview="large"] .stage video{max-height:calc(100dvh - 190px)}
html[data-pkview="large"] .actions{padding:10px 10px 12px;gap:16px}
html[data-pkview="large"] .act{width:60px;height:54px;border-radius:12px}
html[data-pkview="large"] .act span{display:none}
html[data-pkview="large"] .act svg.fa{width:24px;height:24px}
.pk-seg{display:flex;flex-wrap:wrap;gap:6px}.pk-seg button{min-width:46px;height:40px;padding:0 12px;border-radius:10px;border:1px solid #d9dce1;background:#fff;font-weight:700;font-size:14px}.pk-seg button[aria-pressed="true"]{background:#1f5fd6;border-color:#1f5fd6;color:#fff}
html[data-pkcols="9"] .grid,html[data-pkcols="10"] .grid,html[data-pkcols="11"] .grid,html[data-pkcols="12"] .grid{gap:4px}
html[data-pkcols="9"] .tile,html[data-pkcols="10"] .tile,html[data-pkcols="11"] .tile,html[data-pkcols="12"] .tile{padding:2px;border-radius:7px}
html[data-pkcols="9"] .tile img,html[data-pkcols="10"] .tile img,html[data-pkcols="11"] .tile img,html[data-pkcols="12"] .tile img{border-radius:5px}
html[data-pkcols="9"] .badge,html[data-pkcols="10"] .badge,html[data-pkcols="11"] .badge,html[data-pkcols="12"] .badge{transform:scale(.65);transform-origin:top right}
html[data-pkcols="9"] main,html[data-pkcols="10"] main,html[data-pkcols="11"] main,html[data-pkcols="12"] main{padding-left:8px;padding-right:8px}
/* staff-proofing: wide gaps between share buttons and a bigger, isolated close target so a fat finger cannot hit the wrong one */
html[data-pkview="compact"] .actions,html[data-pkview="large"] .actions{flex-wrap:wrap}
html[data-pkview="compact"] .sheet-top .close,html[data-pkview="large"] .sheet-top .close{min-width:48px;min-height:48px}
.dialog .dlg-head{position:sticky;top:-22px;z-index:3;background:#fff;margin:-22px -20px 14px;padding:22px 20px 10px}.dialog .dlg-head .close{min-width:48px;min-height:48px}
.sent{display:grid;justify-items:center;gap:10px;padding:14px 6px 8px;text-align:center}
.sent-ring{width:104px;height:104px;border-radius:50%;background:color-mix(in srgb,var(--c) 12%,#fff);display:grid;place-items:center;animation:sentpop .45s cubic-bezier(.2,1.4,.4,1) both}
.sent-ring svg{width:76px;height:76px;fill:none;stroke:var(--c);stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.sent-c{stroke-dasharray:151;stroke-dashoffset:151;animation:sentdraw .6s .1s ease forwards}.sent-t{stroke-dasharray:40;stroke-dashoffset:40;animation:sentdraw .35s .55s ease forwards}
.sent-title{font-size:26px;line-height:1.15;color:var(--c)}.sent-sub{font-size:16px;line-height:1.4;color:var(--text);max-width:320px}.sent-auto{font-size:12px;color:var(--faint)}
@keyframes sentpop{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}@keyframes sentdraw{to{stroke-dashoffset:0}}
.dlg-foot:has(.btn.done){display:flex;justify-content:center}.dlg-foot .btn.done{min-width:240px;max-width:100%}
.sent~.dlg-foot{justify-content:center}
/* 1.5.6.8: multi-select bar on phones and portrait tablets: count + Done on one line, the five actions side by side. */
@media (max-width:820px),(orientation:portrait){
  .selbar{display:grid;grid-template-columns:1fr auto;grid-template-areas:"left done" "acts acts";gap:8px 12px;align-items:center;padding:10px;bottom:calc(70px + var(--safe-b))}
  .selbar .sel-left{grid-area:left;display:flex;align-items:center;gap:14px;min-width:0}
  .selbar #sel-done{grid-area:done;height:42px;padding:0 20px}
  .selbar .sel-acts{grid-area:acts;display:grid;grid-template-columns:repeat(5,1fr);gap:6px;flex:none}
  .selbar .sel-acts .act{width:auto;min-width:0;height:60px;font-size:11px;padding:0 2px;gap:3px}
  .selbar .sel-acts .act svg{width:22px;height:22px}
  #kiosk.selecting main{padding-bottom:calc(170px + var(--safe-b))!important}
}

/* 1.6.5 — share buttons on phones: all of them on one even row (5 buttons used to wrap to "4 + 1 alone"); tablets keep the old layout. */
@media (max-width:759px){
  html:not([data-pkview="large"]) .actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(56px,1fr));gap:8px;padding-left:12px;padding-right:12px;justify-items:center}
  html:not([data-pkview="large"]) .act{width:100%;max-width:92px;min-width:0;padding:0 2px}
  html:not([data-pkview="large"]) .act span{white-space:nowrap;font-size:11.5px;letter-spacing:-.1px}
}

/* 1.6.7 — Printer & sharing panel on phones: long file names no longer push the panel wider than the screen (it was cut off on the left). */
.dialog{overflow-x:hidden}
.quick{grid-template-columns:minmax(0,1fr)}
.q-job{grid-template-columns:auto minmax(0,1fr) auto}
.q-job>span{min-width:0}
.q-job small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.q-job em{white-space:nowrap}
.q-head>*,.q-state>div{min-width:0}

/* 1.7.2 · several recipients */
.multi{display:grid;gap:10px}.mrow{display:flex;gap:8px;align-items:center}.mrow .input{flex:1;min-width:0}
.wa-row{display:grid;gap:8px;padding:10px;border:1px solid #e6e8ec;border-radius:12px}
.wa-row .phone{align-items:center}
.rm{flex:none;width:46px;height:46px;border-radius:10px;border:1px solid #d9dce1;background:#fff;font-size:24px;line-height:1;color:#6b7078;cursor:pointer}
.addmore{margin-top:10px;background:none;border:0;color:#1f5fd6;font-weight:600;font-size:15px;padding:10px 0;cursor:pointer;text-align:left;min-height:44px}
.addmore[hidden]{display:none}
.tg-sent{display:grid;justify-items:center;gap:8px;text-align:center;margin:16px 0 4px;padding:18px 14px 14px;width:100%;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--c) 9%,#fff);border:1px solid color-mix(in srgb,var(--c) 30%,#fff)}
.tg-sent .sent-ring{width:76px;height:76px}.tg-sent .sent-ring svg{width:56px;height:56px}
.tg-sent .sent-title{font-size:25px}.tg-sent .sent-sub{max-width:340px;font-size:15px}
.tg-bar{width:min(260px,80%);height:6px;border-radius:99px;background:color-mix(in srgb,var(--c) 18%,#fff);overflow:hidden;margin-top:4px}
.tg-bar i{display:block;height:100%;width:100%;background:var(--c);border-radius:99px;}
@keyframes tgbar{from{width:100%}to{width:0}}

.phone .code[hidden]{display:none}

.evtitle.tappable{cursor:pointer;-webkit-tap-highlight-color:transparent}.evtitle.tappable b::after{content:" ⇄";opacity:.45;font-weight:400}

/* 1.9.106: the two-row dock now covers small tablets too (up to 760px, like the photo grid): the one-row dock cut the event name off on screens such as the OPPO Pad Mini.
   1.7.5.1 phones: a two-row dock. Row 1 = the event name (tap to change event) + refresh + this device; row 2 = status chips, never cut off. */
@media (max-width:760px){
  .dock{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"ev me" "dev dev";gap:6px 10px;padding-top:8px}
  .evtitle{grid-area:ev;display:grid;justify-items:start;align-content:center;text-align:left;max-width:none;min-height:40px;padding:3px 12px;border-radius:12px;background:var(--surface)}
  .evtitle b{font-size:14px}
  .me{grid-area:me}.me-txt b{max-width:28vw}
  .devbar{grid-area:dev;justify-self:stretch;min-height:36px;padding:0}
  .dev-chips{flex-wrap:wrap;overflow:visible;width:100%}
  .chip-dev{height:30px;padding:0 10px;font-size:12px}
  main{padding-bottom:calc(136px + var(--safe-b))!important}
  .overlay{padding-bottom:calc(126px + var(--safe-b))!important}
  .toast{bottom:calc(132px + var(--safe-b))!important}
  .dev-panel{bottom:calc(122px + var(--safe-b))}
  .selbar{bottom:calc(120px + var(--safe-b))}
  #kiosk.selecting main{padding-bottom:calc(240px + var(--safe-b))!important}
}

/* 1.7.5.4 phone in landscape (short screen): the PIN pad and operator dialogs were cut off at the bottom.
   Compact dialog; the PIN screen becomes two columns: big dots + message on the left, the keys on the right.
   The repeated instruction is hidden (the heading already says it) and Back is a small button, not a full-width bar. */
@media (orientation:landscape) and (max-height:520px){
  #dlg.overlay{padding:6px 12px calc(70px + var(--safe-b))!important}
  .dialog{width:min(100%,640px);padding:12px 18px}
  .dialog .dlg-head{top:-12px;margin:-12px -18px 4px;padding:12px 18px 4px}
  .dialog h2{font-size:19px}
  .dialog .dlg-head .close{min-width:44px;min-height:44px}
  #dlg-body:has(.pad){display:grid;grid-template-columns:minmax(0,1fr) 250px;grid-template-areas:"top pad" "dots pad" "msg pad" "back pad";grid-template-rows:1fr auto auto 1fr;column-gap:28px;align-items:center;justify-items:center}
  #dlg-body:has(.pad) .op-hint{display:none}
  #dlg-body:has(.pad) .pin-dots{grid-area:dots;gap:16px;margin:0}
  #dlg-body:has(.pad) .pin-dots i{width:18px;height:18px}
  #dlg-body:has(.pad) .pad{grid-area:pad;gap:6px;max-width:250px;width:250px;margin:0}
  #dlg-body:has(.pad) .pad button{height:44px;font-size:21px;border-radius:12px}
  #dlg-body:has(.pad) .op-msg{grid-area:msg;margin:8px 0 0;text-align:center;min-height:24px}
  #dlg-body:has(.pad) .op-close{grid-area:back;align-self:start;margin-top:6px;background:#fff;color:#141821;border:1px solid #cfd4db;min-height:40px;padding:0 22px;border-radius:999px;font-weight:600}
  .evlist{max-height:calc(100dvh - 200px)}
}

/* 1.7.5.5 one height and one corner radius for every control and container (top bar, dock, tabs, time chips, dialogs). */
:root{--ctl-h:44px;--ctl-r:14px}
.search,.icon-btn,.icon-btn.sm,.icon-btn.wide,.quick-pill,.chip-dev,.evtitle,.me-chip,.tabs button,.timebar .chips button,.btn,.selbar #sel-done{height:var(--ctl-h);min-height:var(--ctl-h);border-radius:var(--ctl-r)}
.icon-btn,.icon-btn.sm{width:var(--ctl-h)}.icon-btn.wide{width:auto}
.devbar{min-height:var(--ctl-h);border-radius:var(--ctl-r)}
.evtitle{background:var(--surface);padding:0 14px;align-content:center;max-width:34vw}
.me-chip{padding:0 12px 0 10px}
.chip-dev{padding:0 13px;font-size:13px}
.timebar .range input,.timebar .range select{height:var(--ctl-h);border-radius:var(--ctl-r)}
.dialog,.sheet,.dev-panel,.selbar,.camera,.stage{border-radius:var(--ctl-r)}
#dlg button,#dlg input,#dlg select{border-radius:var(--ctl-r)}
#dlg .op-foot button,#dlg .op-close,#dlg .op-queue-btn,#dlg .op-tabs button{min-height:var(--ctl-h)}
#dlg .ev,#dlg .op-tool,#dlg .op-stat,#dlg .q-stat,#dlg .q-state,#dlg .dev-row{border-radius:var(--ctl-r)}
@media (max-width:760px){
  .evtitle{min-height:var(--ctl-h);max-width:none;padding:0 14px}
  .chip-dev{height:var(--ctl-h);padding:0 12px;font-size:12.5px}
  .devbar{min-height:var(--ctl-h)}
  main{padding-bottom:calc(150px + var(--safe-b))!important}
  .overlay{padding-bottom:calc(140px + var(--safe-b))!important}
  .toast{bottom:calc(146px + var(--safe-b))!important}
  .dev-panel{bottom:calc(136px + var(--safe-b))}
  .selbar{bottom:calc(134px + var(--safe-b))}
  #kiosk.selecting main{padding-bottom:calc(254px + var(--safe-b))!important}
}
@media (min-width:761px){
  .dock{grid-template-columns:auto minmax(0,1fr) auto}
  .evtitle{justify-self:center;max-width:min(100%,520px)}
}
/* 1.8.12: on tablets and desktops the event name sits in the true middle of the screen (equal side columns), not just between the two side groups */
@media (min-width:761px){
  .dock{grid-template-columns:minmax(max-content,1fr) auto minmax(max-content,1fr)}
  html .dock .devbar{justify-self:start;min-width:max-content;max-width:none}
  .dock .me{justify-self:end}
  .evtitle{justify-self:center}
}
@media (min-width:761px) and (max-width:1000px){.dock .chip-dev small{display:none}.dock .chip-dev{padding:0 9px;gap:5px}.dock .dev-chips{gap:4px}}
@media (max-width:360px){
  main{padding-bottom:calc(190px + var(--safe-b))!important}
}

/* 1.7.7.4 phone fixes: (1) nothing wider than the screen, (2) Select is just its logo, (3) bottom boxes fit the page,
   (4) printer logo looks like the other top-bar logos, (5) pop-ups sit in the middle of the page over an 80% dim. */
#btn-select.icon-btn.wide{width:var(--ctl-h,46px);padding:0;gap:0;justify-content:center}
.quick-pill{color:#454a52}.quick-pill svg.fa{width:19px;height:19px;color:#454a52}
.quick-pill .qdot{flex:none}
@media (max-width:759px){
  html,body{max-width:100%;overflow-x:hidden}
  #kiosk{max-width:100vw;overflow-x:clip}
  .bar{gap:8px;padding-left:12px;padding-right:12px}
  .bar .icon-btn,.bar .quick-pill{flex:none;width:42px;min-width:42px;height:42px;min-height:42px;padding:0;justify-content:center}
  .bar #btn-select.icon-btn.wide{width:42px;min-width:42px;height:42px;min-height:42px}
  .bar .quick-pill{position:relative;gap:0}.bar .quick-pill .qdot{position:absolute;top:6px;right:6px}
  .bar .search{min-width:0;padding:0 12px}
  .timebar,.filter{max-width:100%}
  .timebar .range{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
  .timebar .range label,.timebar .range input{min-width:0;width:100%;max-width:100%}
  .timebar .range .btn{grid-column:1/-1}
  /* bottom boxes: same 12px gutter as the photo grid, never wider than the screen */
  .dock{width:100%;max-width:100vw;overflow:hidden}
  .dock .me,.dock .me-chip,.dock .evtitle,.dock .devbar{min-width:0;max-width:100%}
  .selbar{left:12px;right:12px;width:auto;max-width:calc(100vw - 24px)}
  .dev-panel{left:12px;right:12px;width:auto;max-width:calc(100vw - 24px)}
  .selbar .sel-left b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
  /* pop-ups: centred on the whole page, everything behind (dock, bar, photos) dimmed to 80% */
  #dlg.overlay{z-index:95!important;padding:16px!important;background:rgba(10,12,16,.8)!important;align-items:center;justify-content:center}
  #dlg .dialog{max-height:calc(100dvh - 32px);width:min(100%,460px);margin:auto}
  .dev-panel.pop,#dlg ~ .dev-panel{z-index:75}
}

/* 1.8.8: the photo viewer never lets the picture cover the top bar or the action buttons (iPhone / small screens).
   --dock-h is the real height of the bottom dock, set by kiosk.js. */
:root{--dock-h:76px}
.stage{min-height:0;overflow:hidden}
.stage img,.stage video{max-width:100%}
.sheet-top,.actions{flex:none}
#viewer.overlay{padding-bottom:calc(var(--dock-h) + 8px)!important}
html[data-pkview="compact"] #viewer.overlay{padding-bottom:calc(var(--dock-h) + 6px)!important}
html[data-pkview="large"] #viewer.overlay{padding-bottom:calc(var(--dock-h) + 4px)!important}
.stage img,.stage video{max-height:calc(100dvh - var(--dock-h) - 230px)!important}
@media (max-width:820px),(orientation:portrait){
  #viewer .sheet{height:100%;max-height:100%}
  #viewer .stage{flex:1 1 0;min-height:0;overflow:hidden}
  #viewer .stage img,#viewer .stage video{width:auto;height:auto;max-width:100%;max-height:100%!important}
  #viewer .actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(58px,1fr));gap:8px;padding:12px 10px 14px;width:100%;max-width:520px;margin:0 auto}
  #viewer .act{width:100%;justify-self:stretch;max-width:none;min-width:0;height:62px;font-size:11.5px;gap:4px;padding:0 2px}
  #viewer .act svg.fa,#viewer .act svg{width:21px;height:21px}
  #viewer .sheet-top{padding:10px 12px 6px}
}
@media (max-width:400px){#viewer .act{font-size:10.5px}}

/* 1.9.9 queue / table number */
.ticket-badge{display:grid;gap:2px;justify-items:center;margin:6px auto 2px;padding:14px 28px;border-radius:20px;background:color-mix(in srgb,var(--c,#1f5fd6) 10%,#fff);border:2px solid color-mix(in srgb,var(--c,#1f5fd6) 35%,#fff)}
.ticket-badge small{font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#6b7079}
.ticket-badge b{font-size:clamp(46px,14vw,72px);line-height:1;letter-spacing:.02em;color:var(--c,#1f5fd6)}
.ticket-badge em{font-style:normal;font-size:20px;font-weight:700;color:#2a2f36}
.q-staff{display:flex;align-items:center;justify-content:center;gap:8px;margin:10px 0 0;text-decoration:none}
.table-pick{margin-top:14px;text-align:center}.table-pick .print-label{margin:0 0 10px;text-align:center}.table-pick .table-input{display:block;margin:0 auto;width:min(100%,360px)}.table-pick.need .table-chips,.table-pick.need .table-input{outline:2px solid #d93025;outline-offset:3px;border-radius:12px}
.table-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-height:min(36vh,272px);overflow:auto;padding:2px}
.table-chip{min-width:54px;height:48px;padding:0 14px;border-radius:12px;border:1px solid #d3d7dd;background:#fff;color:#14171c;font-size:17px;font-weight:700;cursor:pointer}
.table-chip.on{background:#1f5fd6;border-color:#1f5fd6;color:#fff}
.table-input{width:100%;height:52px;border:1px solid #d3d7dd;border-radius:12px;padding:0 14px;font-size:18px;background:#fff;color:#14171c;box-sizing:border-box}

/* 1.9.16: viewer zoom */
#viewer .stage{touch-action:pan-y}
#viewer .stage:has(.zoomctl.on){touch-action:none}
#viewer .stage img{transform-origin:0 0;will-change:transform}
#viewer .stage.zoomed{cursor:grab}
#viewer .stage.zoomed .nav{opacity:.35}
.zoomctl{position:absolute;right:10px;bottom:10px;z-index:4;display:flex;align-items:center;background:rgba(15,20,30,.62);border-radius:999px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);overflow:hidden}
.zoomctl button{all:unset;box-sizing:border-box;min-width:40px;height:38px;padding:0 10px;display:flex;align-items:center;justify-content:center;color:#fff;font:600 16px/1 system-ui,sans-serif;cursor:pointer;text-align:center;-webkit-tap-highlight-color:transparent}
.zoomctl button#zoom-pct{font-size:12px;min-width:54px;border-left:1px solid rgba(255,255,255,.2);border-right:1px solid rgba(255,255,255,.2)}
.zoomctl button:active{background:rgba(255,255,255,.18)}
.zoomctl .zc{display:flex;align-items:center;border-left:1px solid rgba(255,255,255,.2)}.zoomctl .zc[hidden]{display:none}.zoomctl.on #zoom-toggle{background:rgba(255,255,255,.22)}.zoomctl .zt{min-width:44px}

#viewer[data-kind="video"] [data-act="print"]{display:none!important}

/* 1.9.59: on-screen email keyboard (iOS-like: grey tray, white letter keys, grey function keys, staggered rows) */
.ekb{margin-top:12px;display:grid;gap:8px;padding:10px 6px;border-radius:16px;background:#d2d5db;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.ekb .r{display:flex;gap:6px}
.ekb .r.s2{padding:0 5%}
.ekb .k{flex:1 1 0;min-width:0;height:clamp(46px,6.4vh,64px);border:0;border-radius:8px;background:#fff;color:#141821;font:500 clamp(20px,2.9vh,26px)/1 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;box-shadow:0 1px 0 rgba(0,0,0,.35);padding:0;cursor:pointer}
.ekb .k:active{background:#e9ebef;box-shadow:none;transform:translateY(1px)}
.ekb .k.w{flex:1.45 1 0;background:#aeb3bc;font-size:clamp(15px,2.2vh,20px);font-weight:600}
.ekb .k.w:active{background:#c4c8cf}
.ekb .k.on{background:#fff;color:#1f5fd6;box-shadow:0 0 0 2px #1f5fd6}
.ekb .k.at{flex:1.3 1 0;background:#fff}
.ekb .ends{overflow-x:auto;scrollbar-width:none;padding:0 0 2px;gap:7px}.ekb .ends::-webkit-scrollbar{display:none}
.ekb .k.dm{flex:0 0 auto;height:40px;padding:0 16px;border-radius:99px;background:#fff;color:#1f5fd6;font-size:15px;font-weight:600;box-shadow:0 1px 0 rgba(0,0,0,.25)}
@media(max-height:620px){.ekb{gap:6px;padding:8px 5px}.ekb .k{height:42px;font-size:18px}}

/* 1.9.59: live print status, centred on top of the preview photo */
.sheet-top{position:relative}
.pchip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:4;display:flex;align-items:center;gap:8px;max-width:calc(100% - 190px);padding:7px 14px;border-radius:999px;background:rgba(20,22,26,.78);color:#fff;font-size:14px;font-weight:700;line-height:1.2;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);box-shadow:0 2px 10px rgba(0,0,0,.25);pointer-events:none;white-space:nowrap}
.pchip[hidden]{display:none}
.pchip svg{width:16px;height:16px;flex:none}
.pchip i{font-style:normal;font-weight:600;opacity:.9;overflow:hidden;text-overflow:ellipsis}
.pchip.go{background:rgba(31,95,214,.92)}.pchip.go svg{animation:pcp 1.1s ease-in-out infinite}
.pchip.ok{background:rgba(22,130,70,.92)}
@keyframes pcp{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.pchip.go svg{animation:none}}
/* 1.9.60: email keyboard follows the screen: wider and taller keys on tablets, compact on phones, orientation aware */
.dialog:has(.ekb){width:min(100%,560px)}
@media(min-width:700px){
  .dialog:has(.ekb){width:min(94%,780px)}
  .ekb{padding:12px 9px;gap:10px}.ekb .r{gap:8px}
  .ekb .k{height:clamp(54px,7.2vh,86px);font-size:clamp(22px,3.2vh,33px);border-radius:10px}
  .ekb .k.w{font-size:clamp(16px,2.4vh,23px)}
  .ekb .k.dm{height:48px;font-size:17px}
}
@media(min-width:1000px) and (orientation:landscape){.dialog:has(.ekb){width:min(78%,1000px)}}
@media(orientation:portrait) and (min-width:700px){.dialog:has(.ekb){width:min(92%,840px)}.ekb .k{height:clamp(60px,5.8vh,96px)}}
@media(orientation:landscape) and (max-height:560px){
  .dialog:has(.ekb){width:min(96%,920px);padding:14px 16px}
  .ekb{gap:5px;padding:6px 5px;margin-top:8px}.ekb .r{gap:5px}
  .ekb .k{height:36px;font-size:17px;border-radius:7px}.ekb .k.w{font-size:14px}.ekb .k.dm{height:32px;font-size:14px;padding:0 12px}
}
@media(max-width:420px){.ekb{padding:8px 4px;gap:7px}.ekb .r{gap:4px}.ekb .k{border-radius:6px}}
#dlg-sub{white-space:pre-line}
@media(orientation:landscape) and (max-height:430px){.ekb .k{height:30px;font-size:15px}.ekb .k.dm{height:28px;font-size:13px}.ekb{gap:4px;padding:5px 4px}.dialog .field>span{display:none}}
.pchip.tag{background:rgba(20,22,26,.78)}

/* 1.9.64: phone search: no layout jumps while typing */
@media (max-width:759px){
  html.typing .dock,html.typing .selbar{display:none!important}
  .bar .search input{min-width:0;width:100%;text-overflow:ellipsis}
}
.grid{overscroll-behavior:contain}
/* 1.9.88: guest numbers — the number along the bottom of a tile, the "Find my video" button and its number pad */
.gno-tag{position:absolute;left:6px;right:6px;bottom:6px;z-index:2;border-radius:0 0 8px 8px;padding:7px 8px;text-align:center;background:rgba(17,19,23,.88);color:#fff;font-size:16px;font-weight:700;letter-spacing:.06em;font-variant-numeric:tabular-nums;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gno-tag.un{background:rgba(255,255,255,.9);color:var(--muted);font-weight:500;font-size:13px;letter-spacing:0}
.tile.has-gno .badge:not(.tbl):not(.new){bottom:46px}
html[data-pkcols="5"] .gno-tag,html[data-pkcols="6"] .gno-tag{font-size:13px;padding:5px 6px}
html[data-pkcols="7"] .gno-tag,html[data-pkcols="8"] .gno-tag,html[data-pkcols="9"] .gno-tag,html[data-pkcols="10"] .gno-tag,html[data-pkcols="11"] .gno-tag,html[data-pkcols="12"] .gno-tag{font-size:11px;padding:3px 4px}
.gno-btn{flex:none;height:46px;padding:0 16px;border-radius:12px;background:var(--text);color:#fff;font-weight:700;font-size:15px;display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.gno-btn svg{width:17px;height:17px;fill:currentColor}
.gno-btn:active{transform:scale(.97)}
.gno-btn[hidden]{display:none}
@media (max-width:620px){.gno-btn span{display:none}.gno-btn{width:46px;padding:0;justify-content:center}}
.dialog.gno-dlg{width:min(100%,820px)}
.gno-body{display:flex;gap:28px;align-items:center}
.gno-l{flex:1;min-width:0}
.gno-disp{height:84px;border:2.5px solid var(--line);border-radius:18px;background:var(--surface);display:flex;align-items:center;padding:0 22px;font-size:42px;font-weight:700;letter-spacing:.12em;font-variant-numeric:tabular-nums;margin-bottom:12px;overflow:hidden}
.gno-disp.err{border-color:var(--danger)}
.gno-disp .ph{color:#c9ccd2}
.gno-disp .caret{width:3px;height:46px;background:var(--text);margin-left:4px;animation:gnob 1s steps(1) infinite}
@keyframes gnob{50%{opacity:0}}
@media (prefers-reduced-motion:reduce){.gno-disp .caret{animation:none}}
.gno-pad{flex:none;width:300px;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.gno-pad button{height:62px;border-radius:14px;background:var(--surface);font-size:26px;font-weight:700;color:var(--text);box-shadow:inset 0 -3px 0 var(--line);font-variant-numeric:tabular-nums}
.gno-pad button:active{transform:translateY(1px);background:#e4e6ea}
.gno-pad .fn{background:#fff;box-shadow:inset 0 0 0 2px var(--line);font-size:15px;font-weight:600}
.gno-pad .go{grid-column:span 3;background:var(--text);color:#fff;font-size:19px;box-shadow:none}
.gno-pad .go:disabled{opacity:.5}
.gno-pad.notouch button:not(.go){display:none}.gno-pad.notouch{width:200px}@media (max-width:700px){.gno-pad.notouch{width:100%}}
@media (max-width:700px){.gno-body{flex-direction:column;align-items:stretch}.gno-pad{width:100%}.gno-disp{font-size:34px;height:70px}}
/* 1.9.106: long names end in "…" instead of being cut off */
.me-txt small,.evtitle small{overflow:hidden;text-overflow:ellipsis;max-width:100%}

/* 1.9.107: long event names, short codes and device names wrap onto extra lines instead of ending in "…" (iPhone 15 Pro and every other size).
   The dock grows with the text, and everything that sits above it follows its real height (--dock-h, set by kiosk.js). */
.evtitle b,.me-txt b{white-space:normal;overflow:hidden;text-overflow:clip;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3}
.evtitle b{max-width:100%}
.me-txt b{-webkit-line-clamp:2;line-clamp:2}
.evtitle small,.me-txt small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;max-width:100%}
.evtitle{height:auto;min-height:var(--ctl-h);padding-top:5px;padding-bottom:5px}
.me-chip{height:auto;min-height:var(--ctl-h);padding-top:4px;padding-bottom:4px}
main{padding-bottom:calc(var(--dock-h) + 16px)!important}
#kiosk.selecting main{padding-bottom:calc(var(--dock-h) + 150px)!important}
.overlay{padding-bottom:calc(var(--dock-h) + 10px)!important}
.toast{bottom:calc(var(--dock-h) + 10px)!important}
.dev-panel{bottom:calc(var(--dock-h) + 8px)}
.selbar{bottom:calc(var(--dock-h) + 8px)}
/* phones: search gets its own full-width row, the buttons share the row below (the one-row top bar squeezed the search box to a stub) */
@media (max-width:620px){
  .bar{flex-wrap:wrap}
  .bar .search{flex:1 1 100%;order:-1}
  .bar .gno-btn,.bar .icon-btn,.bar #btn-select.icon-btn.wide,.bar .quick-pill{flex:1 1 0;width:auto;min-width:42px;max-width:none}
}
/* 1.9.107: iPads in portrait (761-900px: iPad mini, 9th gen, 10th gen, Air 11", Pro 11") use the same two-row dock as the smaller tablets, so a long event name gets room */
@media (min-width:761px) and (max-width:900px) and (min-height:701px){
  .dock{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"ev me" "dev dev";gap:6px 10px;padding-top:8px}
  .evtitle{grid-area:ev;justify-self:stretch;justify-items:start;text-align:left;max-width:none;padding-left:14px;padding-right:14px}
  .me,.dock .me{grid-area:me;justify-self:end}
  html .dock .devbar{grid-area:dev;justify-self:stretch;min-width:0;max-width:100%;min-height:36px;padding:0}
  .dev-chips{flex-wrap:wrap;width:100%}
  .dock .chip-dev small{display:inline}
}
/* 1.9.107: phones: the event name gets the whole top row of the dock (name and short code wrap), then the status chips, then this device */
@media (max-width:620px){
  .dock{grid-template-columns:minmax(0,1fr);grid-template-areas:"ev" "dev" "me"}
  .me{justify-self:stretch}
  .me .me-chip{flex:1 1 auto;min-width:0}
  .me-txt b{max-width:none}
}
/* 1.9.107: landscape phones (short screens): one row, side columns no longer forced equal, so the event name takes all the room that is left */
@media (min-width:761px) and (max-width:1000px) and (max-height:700px){
  .dock{grid-template-columns:auto minmax(0,1fr) auto}
  .evtitle{justify-self:stretch;max-width:none}
  .me-txt small{display:none}.me-txt b{max-width:18vw}
}
/* 1.9.121: phones — one compact bottom bar (event + this device on top, connections underneath) and an even photo grid */
@media (max-width:620px){
  .dock{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"ev me" "dev dev";gap:6px 8px;padding-top:8px;padding-bottom:calc(8px + var(--safe-b))}
  .evtitle{grid-area:ev;min-height:44px;padding:0 12px}
  .evtitle b{font-size:14px}.evtitle small{font-size:11px}
  .me{grid-area:me;justify-self:end;gap:6px}
  .me .icon-btn.sm{width:44px;height:44px}
  .me .me-chip{flex:none;min-height:44px;max-width:36vw}
  .me-txt b{max-width:22vw}
  .devbar{grid-area:dev;min-height:0}
  .dev-chips{flex-wrap:nowrap;overflow:hidden;gap:6px;width:100%}
  .chip-dev{height:30px;padding:0 10px;font-size:12px;flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden}
  .chip-dev svg{display:none}
  main{padding-bottom:calc(124px + var(--safe-b))!important}
  .overlay{padding-bottom:calc(114px + var(--safe-b))!important}
  .toast{bottom:calc(120px + var(--safe-b))!important}
  .dev-panel{bottom:calc(110px + var(--safe-b))}
  .selbar{bottom:calc(108px + var(--safe-b))}
  #kiosk.selecting main{padding-bottom:calc(230px + var(--safe-b))!important}
  html:not([data-pkview="large"]) .grid{gap:8px}
  html:not([data-pkview="large"]) .tile{padding:4px}
}
/* 1.9.121: one tile shape per grid (set by the kiosk from the photos it shows), so rows line up on every screen */
html:not([data-pkview="large"]) .grid.g-land .tile{aspect-ratio:3/2!important}
html:not([data-pkview="large"]) .grid.g-port .tile{aspect-ratio:2/3!important}


/* 1.9.122: loading feedback, and a tight layout when portrait and landscape cards are mixed */
.tile .tspin{position:absolute;left:50%;top:50%;width:26px;height:26px;margin:-13px 0 0 -13px;border-radius:50%;border:3px solid rgba(120,128,140,.22);border-top-color:var(--accent,#3b82f6);animation:spin .8s linear infinite;pointer-events:none}
.tile img.loaded~.tspin{display:none}
.grid-load{display:flex;align-items:center;justify-content:center;gap:10px;padding:22px 0;color:var(--muted,#6b7079);font-size:14px;font-weight:600}
.grid-load .gl-ring{width:28px;height:28px;border-radius:50%;border:3px solid rgba(120,128,140,.22);border-top-color:var(--accent,#3b82f6);animation:spin .8s linear infinite}
.grid-load.top{position:fixed;left:50%;top:84px;transform:translateX(-50%);z-index:30;padding:8px 14px;border-radius:99px;background:var(--card,#fff);box-shadow:0 6px 18px rgba(0,0,0,.12)}
html:not([data-pkview="large"]) .grid.g-mas{grid-auto-rows:4px;row-gap:0;align-items:start}
html:not([data-pkview="large"]) .grid.g-mas .tile{aspect-ratio:auto}
html:not([data-pkview="large"]) .grid.g-mas .tile.ar img{height:auto;aspect-ratio:var(--ar,1.5);object-fit:contain;background:transparent}
html:not([data-pkview="large"]) .grid.g-land .tile.ar img,html:not([data-pkview="large"]) .grid.g-port .tile.ar img{height:100%;aspect-ratio:auto}
/* 1.9.123: follow the real bottom edge on iPhone/iPad Safari (see kiosk.js) */
.dock,.selbar{translate:0 var(--vv-fix,0px)}
