/* Card scanner overlay (shared v1/v2). Logical properties throughout so Arabic (RTL) mirrors correctly. */
html.ccrs-open,html.ccrs-open body{overflow:hidden}
.ccrs{position:fixed;inset:0;z-index:1000;background:#05020b;color:#f2eeff;display:flex;flex-direction:column;height:100vh;height:100dvh;font-family:inherit;-webkit-tap-highlight-color:transparent}
.ccrs[hidden],.ccrs [hidden]{display:none!important}
.ccrs-top{position:absolute;top:0;inset-inline:0;z-index:4;display:flex;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top)) 12px 10px;background:linear-gradient(#000c,#0000)}
.ccrs-ttl{flex:1;font-size:17px;text-align:center}
.ccrs-x,.ccrs-torch,.ccrs-lens{width:46px;height:46px;border-radius:50%;border:1px solid #ffffff40;background:#0008;color:#fff;font-size:20px;display:grid;place-items:center;cursor:pointer}
.ccrs-torch.on{background:#ffd60a;color:#000;border-color:#ffd60a}
.ccrs-torch.off{visibility:hidden}
.ccrs-cam{position:absolute;inset:0;overflow:hidden;background:#000}
.ccrs-cam video{width:100%;height:100%;object-fit:cover;display:block}
/* card-shaped guide (63x88 mm) with a dimmed surround */
.ccrs-frame{position:absolute;left:50%;top:46%;transform:translate(-50%,-50%);width:min(78vw,calc(62dvh * 63 / 88),420px);aspect-ratio:63/88;border-radius:4.5%/3.2%;
 box-shadow:0 0 0 200vmax rgba(0,0,0,.55);outline:2px solid rgba(255,255,255,.55);outline-offset:0}
.ccrs-frame i{position:absolute;width:34px;height:34px;border:5px solid #39ff14;filter:drop-shadow(0 0 6px #39ff14)}
.ccrs-frame i:nth-child(1){top:-4px;left:-4px;border-right:0;border-bottom:0;border-top-left-radius:12px}
.ccrs-frame i:nth-child(2){top:-4px;right:-4px;border-left:0;border-bottom:0;border-top-right-radius:12px}
.ccrs-frame i:nth-child(3){bottom:-4px;left:-4px;border-right:0;border-top:0;border-bottom-left-radius:12px}
.ccrs-frame i:nth-child(4){bottom:-4px;right:-4px;border-left:0;border-top:0;border-bottom-right-radius:12px}
.ccrs-hint{position:absolute;inset-inline:0;top:calc(66px + env(safe-area-inset-top));margin:0;text-align:center;display:flex;flex-direction:column;gap:3px;padding:0 16px;text-shadow:0 1px 4px #000}
.ccrs-hint b{font-size:17px}.ccrs-hint span{font-size:13px;opacity:.85}
.ccrs-wait{position:absolute;inset:0;display:grid;place-items:center;margin:0;font-size:16px;color:#ddd;pointer-events:none}
.ccrs-ctrl{position:absolute;bottom:0;inset-inline:0;z-index:3;display:flex;align-items:center;justify-content:space-around;padding:14px 10px calc(18px + env(safe-area-inset-bottom));background:linear-gradient(#0000,#000d 40%)}
.ccrs-shutter{width:84px;height:84px;border-radius:50%;border:5px solid #fff;background:transparent;padding:6px;cursor:pointer;flex:none}
.ccrs-shutter span{display:block;width:100%;height:100%;border-radius:50%;background:linear-gradient(135deg,#39ff14,#b026ff)}
.ccrs-shutter:active span{transform:scale(.9)}
.ccrs-side{width:92px;display:flex;flex-direction:column;align-items:center;gap:4px;background:none;border:0;color:#fff;font-size:12px;cursor:pointer;line-height:1.2}
.ccrs-side svg{width:44px;height:44px;padding:10px;border-radius:50%;background:#ffffff22;box-sizing:border-box}
.ccrs-panel{position:absolute;inset:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:calc(70px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom))}
.ccrs-box{max-width:560px;margin:0 auto;text-align:center}
.ccrs-box h2{font-size:21px;margin:10px 0 6px}.ccrs-big{font-size:54px}
.ccrs-why{color:#cfc6ea;font-size:15px;line-height:1.45;margin:6px 0 16px}
.ccrs-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;margin:10px 0;padding:12px 16px;border:0;border-radius:14px;
 background:linear-gradient(90deg,#1f8a0c,#7a1bb5);color:#fff;font-size:17px;font-weight:700;text-decoration:none;cursor:pointer;box-sizing:border-box}
.ccrs-btn.ghost{background:#ffffff12;border:1px solid #ffffff38}
.ccrs-btn.big{min-height:58px;font-size:18px;margin-top:18px}
.ccrs-link{background:none;border:0;color:#9fd8ff;text-decoration:underline;font-size:15px;margin-top:8px;cursor:pointer;padding:10px}
.ccrs-form{display:flex;gap:8px;margin:14px 0 4px}
.ccrs-form input{flex:1;min-width:0;min-height:52px;font-size:16px;padding:0 14px;border-radius:14px;border:1px solid #ffffff45;background:#160c2b;color:#fff}
.ccrs-form .ccrs-btn{width:auto;margin:0;flex:none}
.ccrs-shot{display:block;max-width:62%;max-height:42vh;margin:6px auto 18px;border-radius:12px;box-shadow:0 6px 30px #0009}
.ccrs-shot.sm{max-width:40%;max-height:28vh}
.ccrs-spin{width:56px;height:56px;margin:0 auto 14px;border-radius:50%;border:6px solid #ffffff22;border-top-color:#39ff14;animation:ccrs-r 0.9s linear infinite}
@keyframes ccrs-r{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.ccrs-spin{animation-duration:3s}}
.ccrs-msg{font-size:17px}
.ccrs-best{background:#120a22;border:1px solid #39ff1488;border-radius:18px;padding:14px;box-shadow:0 0 24px #39ff1422}
.ccrs-lbl{font-size:13px;color:#b9a7e6;font-weight:700;text-transform:uppercase;letter-spacing:.5px;display:flex;justify-content:center;gap:8px;align-items:center;flex-wrap:wrap}
.ccrs-conf{text-transform:none;letter-spacing:0;padding:3px 10px;border-radius:999px;font-size:13px}
.ccrs-conf.high{background:#39ff1426;color:#7dff5c}.ccrs-conf.mid{background:#ffd60a26;color:#ffd60a}.ccrs-conf.low{background:#ff3b6b26;color:#ff7d9b}
.ccrs-hero img{display:block;width:min(64%,300px);aspect-ratio:63/88;object-fit:contain;margin:12px auto;border-radius:12px;background:#0b0616}
.ccrs-name{font-size:22px;margin:6px 0 2px;line-height:1.2}
.ccrs-set{color:#b9a7e6;font-size:14px}
.ccrs-tag{font-size:12px;border:1px solid #b026ff;border-radius:6px;padding:1px 6px;color:#d9a6ff}
.ccrs-prices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 6px}
.ccrs-prices div{background:#0b0616;border-radius:12px;padding:10px}.ccrs-prices span{display:block;font-size:13px;color:#b9a7e6}
.ccrs-prices b{display:block;font-size:26px;color:#7dff5c;margin-top:2px}.ccrs-prices div+div b{color:#fff;font-size:22px}
.ccrs-vers{font-size:13px;color:#cfc6ea;margin:4px 0}
.ccrs-links{margin-top:6px}
.ccrs-h3{font-size:17px;margin:22px 0 8px;text-align:start}
.ccrs-alts{display:flex;flex-direction:column;gap:8px}
.ccrs-alt{display:flex;align-items:center;gap:12px;width:100%;padding:8px;border-radius:14px;border:1px solid #2c1a4d;background:#120a22;color:#fff;text-align:start;cursor:pointer;min-height:76px}
.ccrs-alt img{width:50px;height:70px;object-fit:contain;border-radius:6px;background:#0b0616;flex:none}
.ccrs-at{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.ccrs-at b{font-size:15px}.ccrs-at small{color:#b9a7e6;font-size:12px}
.ccrs-ap{font-weight:700;color:#7dff5c;flex:none}
.ccrs-read{margin-top:14px;font-size:13px;color:#a99bd0;text-align:start}.ccrs-read summary{cursor:pointer;padding:6px 0}
.ccrs-note{font-size:12px;color:#8d7fb0;margin-top:10px}
/* home-page / nav entry points */
.scan-hero{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:10px 12px 4px;padding:14px;border-radius:18px;background:linear-gradient(135deg,#0f2a10,#2b0f4d);border:1px solid #39ff1488;box-shadow:0 0 18px #39ff1433}
.scan-cta{display:flex;align-items:center;justify-content:center;gap:10px;min-height:60px;border:0;border-radius:16px;background:linear-gradient(90deg,#39ff14,#b026ff);color:#06020d;font-size:20px;font-weight:900;cursor:pointer;text-decoration:none;box-shadow:0 4px 18px #39ff1455}
.scan-hero p{margin:2px 4px 0;font-size:13px;color:#cfc6ea;text-align:center}
.scan-chip{flex:none;display:inline-flex;align-items:center;gap:4px;border:0;border-radius:999px;padding:7px 12px;background:linear-gradient(90deg,#39ff14,#b026ff);color:#06020d;font-weight:800;font-size:13px;cursor:pointer;text-decoration:none;white-space:nowrap}
.scan-fab{position:fixed;z-index:8;inset-inline-end:16px;bottom:calc(18px + env(safe-area-inset-bottom));width:64px;height:64px;border-radius:50%;border:0;display:grid;place-items:center;font-size:28px;
 background:linear-gradient(135deg,#39ff14,#b026ff);box-shadow:0 6px 22px #000a,0 0 18px #39ff1466;cursor:pointer}
/* FAB: always on phones/tablets (touch, incl. iPad at 1024-1366px wide); hidden only on wide mouse-only desktops */
@media (min-width:900px){.scan-fab:not(.touch){display:none}}
#scanfab{inset-inline-end:auto;inset-inline-start:calc(16px + env(safe-area-inset-left))} /* bottom-left: Help + link badge sit bottom-right */
html.ccrs-open .scan-fab{display:none}
.ccrs-why.err{color:#ffd166;font-size:17px;font-weight:600}
.ccrs-lang{color:#d9cdf5;font-size:13px;margin-top:4px}.ccrs-lang small{color:#a898d0;font-size:12px}
/* ---------- barcode / QR mode ---------- */
.ccrs-mode{position:absolute;z-index:4;left:50%;transform:translateX(-50%);bottom:calc(124px + env(safe-area-inset-bottom));display:flex;gap:4px;padding:4px;border-radius:999px;background:#000b;border:1px solid #ffffff30;backdrop-filter:blur(6px)}
.ccrs-mode button{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 16px;border:0;border-radius:999px;background:none;color:#ddd;font-size:15px;font-weight:700;cursor:pointer;white-space:nowrap}
.ccrs-mode button svg{width:20px;height:20px}
.ccrs-mode button.on{background:linear-gradient(90deg,#39ff14,#b026ff);color:#06020d}
.ccrs-mode.inline{position:static;transform:none;display:inline-flex;margin:4px auto 10px;background:#ffffff10}
.ccrs.bc .ccrs-frame{width:min(86vw,560px,calc(52dvh * 2.1));aspect-ratio:2.1/1;border-radius:14px;top:44%}
.ccrs-laser{display:none}
.ccrs.bc .ccrs-laser{display:block;position:absolute;inset-inline:6%;top:50%;height:2px;background:#ff2d55;box-shadow:0 0 10px 2px #ff2d55aa;animation:ccrs-l 1.6s ease-in-out infinite alternate}
@keyframes ccrs-l{from{top:18%}to{top:82%}}
@media (prefers-reduced-motion:reduce){.ccrs.bc .ccrs-laser{animation:none}}
.ccrs-hit{position:absolute;z-index:3;border:3px solid #39ff14;border-radius:10px;box-shadow:0 0 0 2px #000a,0 0 22px #39ff14;background:#39ff1422;pointer-events:none;transition:all .12s ease-out}
.ccrs-bcmsg{display:block;font-style:normal;font-size:14px;margin-top:6px;padding:6px 10px;border-radius:10px;background:#000a;color:#ffd166}
.ccrs-chip{position:absolute;z-index:4;left:50%;transform:translateX(-50%);bottom:calc(184px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:8px;max-width:90vw;
 min-height:46px;padding:0 16px;border:0;border-radius:999px;background:#ffd60a;color:#120a22;font-weight:800;font-size:15px;box-shadow:0 4px 18px #000a;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ccrs-chip span{overflow:hidden;text-overflow:ellipsis}
.ccrs-code{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 12px;padding:10px 12px;border-radius:14px;background:#0b0616;border:1px dashed #ffffff40;font-size:15px;text-align:start}
.ccrs-code svg{flex:none;color:#ffd60a}
.ccrs-tip{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:0 0 12px;padding:10px 12px;border-radius:14px;background:#2a1a00;border:1px solid #ffd60a66;color:#ffe9a8;font-size:14px;text-align:start}
.ccrs-tip svg{flex:none;color:#ffd60a}.ccrs-tip .ccrs-btn{margin:0;padding:8px 14px;min-height:0}.ccrs-code small{color:#b9a7e6;font-size:12px}
.ccrs-codeval,.ccrs-url{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:17px;word-break:break-all;background:#0b0616;border-radius:12px;padding:12px;margin:8px 0}
.ccrs-url{font-size:14px;text-align:start}
.ccrs-help{font-size:14px;color:#ffd166;background:#ffd16614;border-radius:12px;padding:10px 12px;margin:0 0 12px;line-height:1.45}
/* landscape phones: controls on the side so the frame keeps its room */
@media (orientation:landscape) and (max-height:540px){
 .ccrs-ctrl{top:0;bottom:0;inset-inline-start:auto;inset-inline-end:0;width:118px;flex-direction:column;justify-content:center;gap:10px;padding:56px calc(8px + env(safe-area-inset-right)) 10px 8px;background:linear-gradient(90deg,#0000,#000d 35%)}
 .ccrs-shutter{width:70px;height:70px}.ccrs-side{width:96px}.ccrs-side svg{width:38px;height:38px;padding:8px}
 .ccrs-frame{left:calc(50% - 50px);top:52%;width:min(62vw,calc(70dvh * 63 / 88))}
 .ccrs.bc .ccrs-frame{width:min(60vw,calc(66dvh * 2.1))}
 .ccrs-hint{top:calc(48px + env(safe-area-inset-top));padding-inline:64px 130px}.ccrs-hint span{display:none}.ccrs-hint b{font-size:15px}
 .ccrs-mode{left:auto;inset-inline-start:12px;transform:none;bottom:calc(12px + env(safe-area-inset-bottom))}
 .ccrs-chip{left:calc(50% - 50px);bottom:calc(70px + env(safe-area-inset-bottom))}
}

.ccrs-thumbs{display:flex;gap:8px;justify-content:center;margin:8px 0 2px}.ccrs-thumbs button{width:54px;height:54px;padding:2px;border-radius:10px;border:2px solid transparent;background:#fff;cursor:pointer}.ccrs-thumbs button.on{border-color:#7bd84a}.ccrs-thumbs img{width:100%;height:100%;object-fit:contain}
/* ---------- photo pick ("Choose photo" / "Take a photo"): a real file input covers the button so the tap lands on it ---------- */
.ccrs-pick{position:relative;overflow:hidden;cursor:pointer;box-sizing:border-box;-webkit-user-select:none;user-select:none}
.ccrs-pick input.ccrs-file{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer;font-size:100px;z-index:1;-webkit-appearance:none;appearance:none}
.ccrs-pick:focus-within{outline:3px solid #39ff14;outline-offset:2px}
.ccrs-pick input.ccrs-file::-webkit-file-upload-button{cursor:pointer}
.ccrs-galside span{font-weight:700}
.ccrs-galside svg{background:#39ff1433!important;box-shadow:0 0 0 2px #39ff14aa}
.ccrs-drop{display:none;font-size:13px;color:#b9a7e6;margin:2px 0 8px}
@media (hover:hover) and (pointer:fine){.ccrs-drop{display:block}}
.ccrs.ccrs-dragging::after{content:"";position:absolute;inset:10px;z-index:9;border:3px dashed #39ff14;border-radius:18px;background:#39ff1418;pointer-events:none}

.ccrs-lens[hidden]{display:none}

/* card translator panel (scanner.js xlate): the card in the visitor's language, under the original */
.ccrs-xl{margin:10px 0 4px;padding:10px 12px;border-radius:14px;background:#140b2b;border:1px solid #7fd8ff55;text-align:start}
.ccrs-xl[hidden]{display:none}
.ccrs-xlh{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;color:#7fd8ff;font-weight:700}
.ccrs-xlb{flex:none;background:transparent;border:1px solid #7fd8ff88;color:#cfefff;border-radius:999px;padding:5px 11px;font:inherit;font-size:12px;cursor:pointer;min-height:32px}
.ccrs-xlb[hidden]{display:none}
.ccrs-xlw{font-style:normal;font-weight:400;color:#b9a7e6;animation:ccrs-xlp 1.2s ease-in-out infinite}
@keyframes ccrs-xlp{50%{opacity:.45}}
.ccrs-xln{font-size:19px;font-weight:700;color:#fff;margin-top:6px;line-height:1.25}
.ccrs-xls{font-size:14px;color:#b9a7e6;margin-top:2px}
.ccrs-xlt{margin-top:8px}
.ccrs-xlk{display:block;font-size:12px;color:#a99bd0;text-transform:uppercase;letter-spacing:.04em;margin-bottom:2px}
.ccrs-xlk2{display:block;font-size:11px;color:#8d7fb0;margin-top:6px}
.ccrs-xlp{margin:2px 0 0;font-size:14px;line-height:1.4;color:#efe9ff;white-space:pre-line}
.ccrs-xlp.k-flavor{font-style:italic;color:#cbbfe9}
.ccrs-xlf{margin:6px 0 0;font-size:12px;color:#ffcf8a}
.ccrs-xlnote{margin:8px 0 0;font-size:11px;color:#8d7fb0}
.ccrs-xl.orig{border-color:#b9a7e655}
