/* SPK-SCANFIX2: orientation is locked via manifest (portrait) + screen.orientation.lock in spokes-scanfix.js. A CSS rotate fallback was tested and removed: the phone layout depends on width<=760, so a rotated page switched to the PC layout. */
/* SPK-SCANFIX3 v2: Registrering/Telling on phone – ONE clean white result card (also when the phone is in dark mode), camera shrinks above it, shutter hidden while a card waits for OK/Feil, big OK/Feil in the thumb zone, «Slett linje» as a small text link. */
@media (max-width:760px){
 html:not(#_):not(#_) .vt-phone .vt-cam{flex:none!important;transition:height .2s}
 html:not(#_):not(#_) .vt-phone:has(.vt-cur .vt-card):not(:has(.vt-cur.spk-sf-done)) .vt-shut,html:not(#_):not(#_) .vt-phone:has(.vt-cur .vt-card):not(:has(.vt-cur.spk-sf-done)) .vt-camhint{opacity:0!important;pointer-events:none!important}
 html:not(#_):not(#_) .vt-phone .vt-cur:has(.vt-card){position:fixed;left:10px;right:10px;bottom:calc(136px + env(safe-area-inset-bottom,0px));z-index:30;background:#fff!important;color:#10232B!important;border:1px solid #E3E8EE;border-radius:18px;box-shadow:0 8px 28px rgba(13,40,50,.18);padding:10px 12px 6px;max-height:calc(100dvh - 400px - env(safe-area-inset-bottom,0px));overflow:auto;margin:0;transition:opacity .2s,transform .2s;color-scheme:light}
 html:not(#_):not(#_) .vt-phone .vt-cur.spk-sf-done{opacity:0;transform:translateY(12px);pointer-events:none}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-card{display:flex!important;align-items:center;gap:10px;border:0!important;padding:0!important;margin:0 0 8px!important;background:transparent!important;box-shadow:none!important;color:#10232B!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-card *{color:inherit}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-img{flex:none;width:40px!important;height:40px!important;border-radius:10px;position:static!important;margin:0!important;background:#EEF4F6!important;color:#0E7490!important;display:grid;place-items:center;overflow:hidden}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-img svg{width:22px;height:22px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-cb{min-width:0;display:flex;flex-direction:column;gap:1px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-cb b{font-size:16px;font-weight:600;color:#10232B!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-muted{color:#5B6B73!important;font-size:13px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-o-unknown{background:#FEF3C7!important;color:#92400E!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-tag{align-self:flex-start;font-size:11.5px;padding:1px 8px;border-radius:99px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-mnrow{display:flex!important;gap:8px;align-items:stretch;margin:0 0 8px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-mnrow .vt-in,html:not(#_):not(#_) .vt-phone .vt-cur input.vt-in{flex:1;min-width:0;height:46px;background:#fff!important;color:#10232B!important;border:1px solid #D5DDE3!important;border-radius:12px;padding:0 12px;font-size:16px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-in::placeholder{color:#8A989F!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-photo{flex:none;width:64px;height:46px;display:flex!important;flex-direction:row;align-items:center;justify-content:center;gap:4px;background:#fff!important;color:#0E7490!important;border:1px solid #D5DDE3!important;border-radius:12px;font-size:13px;font-weight:600;padding:0}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-photo svg{width:18px;height:18px;background:none!important;color:#0E7490!important;fill:none}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-qrow{display:flex!important;align-items:center;justify-content:space-between;margin:0 0 8px;color:#10232B!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-qrow>span{font-size:15px;font-weight:600;color:#10232B!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-q{display:flex;align-items:center;gap:6px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-q b{min-width:34px;text-align:center;font-size:20px;font-weight:700;color:#10232B!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-q button{width:44px;height:44px;min-width:44px;border-radius:12px;background:#F4F6F8!important;color:#10232B!important;border:1px solid #D5DDE3!important;font-size:22px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-two{display:flex;gap:10px;margin:0}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-two .vt-btn{flex:1;min-height:56px;font-size:17px;font-weight:600;border-radius:14px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-two .vt-btn:not(.vt-pri){background:#fff!important;color:#10232B!important;border:1px solid #D5DDE3!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-two .vt-pri{background:#0E7490!important;color:#fff!important;border:0!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-dlrow{display:flex;justify-content:center;margin:2px 0 0;padding:0;border:0}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-dl{background:none!important;border:0!important;box-shadow:none!important;min-height:32px;padding:4px 8px;width:auto!important;color:#B42318!important;font-size:13.5px;font-weight:500;display:inline-flex;align-items:center;gap:5px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-dl svg{width:15px;height:15px}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-ainote,html:not(#_):not(#_) .vt-phone .vt-ainote{display:none!important}
 html:not(#_):not(#_) .vt-phone .vt-cur .vt-aimsg{font-size:13px;margin:0 0 8px}
 /* other scan cards: Skann del (product card) – white, same buttons */
 html:not(#_):not(#_) .psc{background:#fff!important;color:#10232B!important;color-scheme:light}
 html:not(#_):not(#_) .psc .psc-card{background:#fff!important;color:#10232B!important;border:1px solid #E3E8EE!important;border-radius:16px}
 html:not(#_):not(#_) .psc .psc-src{display:none}
 html:not(#_):not(#_) .psc .psc-act .psc-btn{min-height:56px;font-size:17px;border-radius:14px}
}
/* SPK-SCANFIX4: «Lukk» lay under the iPhone status bar / Dynamic Island (a later rule dropped the safe-area padding), where iOS swallows taps. */
.blv-cs .blv-cs__top{padding-top:calc(env(safe-area-inset-top,0px) + 12px)!important}
.blv-cs .blv-cs__x{min-height:44px;min-width:64px;position:relative;z-index:3;pointer-events:auto;touch-action:manipulation}
/* SPK-SCANFIX6: Registrering/Telling phone – shutter in the thumb zone just above Linjer/Send til PC (fixed, 68px, never on the frame), smaller camera, line list scrolls inside its area (newest first, ≥2 rows visible at 375×667). */
@media (max-width:760px){
 html:not(#_):not(#_) .vt-phone{display:flex!important;flex-direction:column;height:100dvh;overflow:hidden}
 html:not(#_):not(#_) .vt-phone .vt-cam{height:clamp(150px,28dvh,260px)!important;max-height:260px!important}
 html:not(#_):not(#_) .vt-phone .vt-camhint{display:none!important}
 html:not(#_):not(#_) .vt-phone .vt-cam .vt-aim{top:50%!important;width:min(74%,300px)!important;height:calc(100% - 28px)!important;aspect-ratio:auto!important}
 html:not(#_):not(#_) .vt-phone .vt-bd{flex:1 1 auto;min-height:0;display:flex!important;flex-direction:column;overflow:hidden!important;padding-bottom:8px!important}
 html:not(#_):not(#_) .vt-phone .vt-bd>.vt-scan{flex:none}
 html:not(#_):not(#_) .vt-phone .vt-list{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
 html:not(#_):not(#_) .vt-phone .vt-list .vt-sum{position:sticky;top:0;z-index:1;background:inherit}
 html:not(#_):not(#_) .vt-phone .vt-shut{position:fixed!important;left:50%!important;right:auto!important;top:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 6px)!important;margin:0 0 0 -32px!important;width:64px!important;height:64px!important;z-index:29!important;background:#0E7490!important;border-radius:50%!important;box-shadow:0 6px 18px rgba(14,116,144,.35)}
 html:not(#_):not(#_) .vt-phone .vt-shut span{background:#fff!important;border-color:#fff!important}
 html:not(#_):not(#_) .vt-phone .vt-ft{flex:none;display:grid!important;grid-template-columns:1fr 80px 1fr;gap:14px 8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))!important;align-items:center}
 html:not(#_):not(#_) .vt-phone .vt-ft #vt-book{grid-column:1/-1;grid-row:1;min-height:52px;font-size:16.5px;font-weight:600;border-radius:14px;width:100%}
 html:not(#_):not(#_) .vt-phone .vt-ft #vt-lines{grid-column:1;grid-row:2;min-height:48px;width:100%;padding:0 6px}
 html:not(#_):not(#_) .vt-phone .vt-ft #vt-send{grid-column:3;grid-row:2;min-height:48px;width:100%;padding:0 6px;background:#fff!important;color:#0E7490!important;border:1px solid #0E7490!important}
}
/* SPK-SCANFIX8: «Skanneliste – mange varer» only on product scanners (not shelf/bike/QR/frame); camera preview fills the screen on iOS (explicit viewport size, the % size collapsed to the video's own size in the top layer). */
dialog.blv-cs:not(.spk-psl-ok) .psl-cs,.blv-cs:not(.spk-psl-ok) .psl-cs{display:none!important}
/* SPK-SCANFIX9: «Skann del / vare» and Varetelling shortcuts only on the main Skann */
.blv-cs:not([data-spk-kind=main]) .psc-cs,.blv-cs:not([data-spk-kind=main]) .vt-cs{display:none!important}
dialog.blv-cs .blv-cs__v{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;min-width:100vw!important;min-height:100dvh!important;object-fit:cover!important;object-position:center!important;transform:none!important}
dialog.blv-cs{width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;inset:0!important}
/* SPK-SCANFIX10: «Skann neste» primary, «Feil vare?» secondary on the same row */
@media (max-width:760px){html:not(#_):not(#_) .vt-phone .vt-cur .vt-two .spk-next{background:#0E7490!important;color:#fff!important;border:0!important}}
/* SPK-SCANFIX11: inline confirmation after «Godkjenn» – scanner stays open */
.spk-vt-toast{position:fixed;left:50%;top:calc(env(safe-area-inset-top,0px) + 76px);transform:translateX(-50%);z-index:2147483600;background:#065F46;color:#fff;font:600 15px/1.3 inherit;padding:10px 16px;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.2);animation:spkvt .25s ease-out;white-space:nowrap}
@keyframes spkvt{from{opacity:0;transform:translate(-50%,-6px)}}
