/* IMG B Mobile — same premium dark language as the desktop app (honey accent), mobile first, one-handed, portrait. */
:root { --bg:#0e0f11; --raised:#141518; --surface:#1a1c20; --surface2:#22252a; --surface3:#2c2f36; --line:rgba(255,255,255,.09); --line2:rgba(255,255,255,.16); --text:#ededf0; --text2:#b0b3bb; --text3:#8b8e97; --honey:#f6c142; --honey2:#ffd36a; --onhoney:#1b1403; --pass:#46d994; --review:#ffa24d; --fail:#ff7070; --info:#84aaff; --passbg:rgba(70,217,148,.14); --reviewbg:rgba(255,162,77,.16); --failbg:rgba(255,112,112,.16); --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
#app { height: 100dvh; display: grid; grid-template-rows: auto auto 1fr auto; max-width: 720px; margin: 0 auto; position: relative; overflow: hidden; }
#bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(8px + var(--safe-t)) 14px 8px; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; letter-spacing: .03em; } .brand svg { width: 26px; height: 26px; }
.pill { display: flex; align-items: center; gap: 8px; max-width: 62%; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line2); font-size: 13.5px; color: var(--text2); }
.pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text3); flex: none; } .dot.ok { background: var(--pass); } .dot.warn { background: var(--honey); animation: pulse 1.3s ease-in-out infinite; } .dot.bad { background: var(--fail); }
@keyframes pulse { 50% { opacity: .35; } }
#views { position: relative; min-height: 0; }
.view { position: absolute; inset: 0; } .scroll { overflow-y: auto; padding: 4px 14px 18px; -webkit-overflow-scrolling: touch; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin: 18px 2px 8px; font-weight: 650; } h1 { font-size: 22px; margin: 0 0 6px; }
/* camera */
#v-camera { background: #000; border-radius: 22px 22px 0 0; overflow: hidden; }
#cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #07080a; }
#guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); max-width: 88%; padding: 8px 14px; border-radius: 16px; background: rgba(14,15,17,.78); backdrop-filter: blur(8px); font-size: 14px; text-align: center; border: 1px solid var(--line2); }
.hint.warn { color: var(--honey2); border-color: rgba(246,193,66,.5); }
.camerr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px; text-align: center; color: var(--text2); background: rgba(7,8,10,.9); }
.camerr b { color: var(--text); font-size: 17px; }
#shotbar { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px 14px; background: linear-gradient(transparent, rgba(0,0,0,.72) 40%); }
#counts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; margin-bottom: 8px; }
#counts span { padding: 3px 10px; border-radius: 12px; background: rgba(255,255,255,.1); } #counts .warn { background: var(--reviewbg); color: var(--review); } #counts .bad { background: var(--failbg); color: var(--fail); }
#strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; min-height: 62px; scrollbar-width: none; } #strip::-webkit-scrollbar { display: none; }
.th { position: relative; flex: none; width: 54px; height: 54px; border-radius: 10px; overflow: hidden; background: var(--surface2); border: 2px solid transparent; } .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th i { position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; border-radius: 50%; font: 700 10px/16px system-ui; text-align: center; font-style: normal; background: var(--surface3); } .th.s-ok { border-color: var(--pass); } .th.s-review { border-color: var(--review); } .th.s-bad { border-color: var(--fail); } .th.s-up { border-color: var(--honey); }
#ctl { display: flex; align-items: center; justify-content: space-around; }
.rnd { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; } .rnd svg, nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; padding: 0; } #shutter span { width: 58px; height: 58px; border-radius: 50%; background: var(--honey); transition: transform .08s; } #shutter:active span { transform: scale(.88); }
.flash { animation: flash .22s; } @keyframes flash { 0% { box-shadow: inset 0 0 0 100vmax rgba(255,255,255,.55); } 100% { box-shadow: none; } }
/* lists */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 10px; scrollbar-width: none; position: sticky; top: 0; background: var(--bg); z-index: 2; } .chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text2); font-size: 13.5px; } .chip.on { background: var(--honey); color: var(--onhoney); border-color: var(--honey); font-weight: 650; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface); border: 2px solid transparent; } .tile img { width: 100%; height: 100%; object-fit: cover; display: block; } .tile.sel { border-color: var(--honey); }
.tile .st { position: absolute; left: 4px; bottom: 4px; padding: 1px 7px; border-radius: 9px; font-size: 11px; background: rgba(0,0,0,.66); } .st.ok { color: var(--pass); } .st.review { color: var(--review); } .st.bad { color: var(--fail); } .st.up { color: var(--honey2); }
.rlist { display: flex; flex-direction: column; gap: 10px; }
.rcard { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; }
.rcard .pic { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; background: #fff; } .rcard .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rcard .t { font-size: 13px; color: var(--text3); } .rcard .r { font-size: 13.5px; color: var(--text2); margin-top: 4px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12.5px; font-weight: 650; } .badge.ok { background: var(--passbg); color: var(--pass); } .badge.review { background: var(--reviewbg); color: var(--review); } .badge.bad { background: var(--failbg); color: var(--fail); } .badge.up { background: rgba(246,193,66,.15); color: var(--honey2); }
.rbar { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 10px 0 4px; background: linear-gradient(transparent, var(--bg) 30%); }
.empty { text-align: center; color: var(--text3); padding: 48px 20px; }
/* controls */
.btn { min-height: 46px; padding: 0 18px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line2); font-weight: 600; } .btn.primary { background: var(--honey); color: var(--onhoney); border-color: var(--honey); } .btn.quiet { background: transparent; color: var(--text2); } .btn.danger { color: var(--fail); } .btn.wide { width: 100%; } .btn:disabled { opacity: .5; }
.row { display: flex; gap: 8px; margin: 10px 0; } .col { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
input[type=text], input:not([type]), input[type=search] { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line2); font-size: 16px; }
.wslist { display: flex; flex-direction: column; gap: 8px; } .wsi { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; } .wsi.on { border-color: var(--honey); }
.card { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text2); font-size: 14px; } .card b { color: var(--text); }
.fine { color: var(--text3); font-size: 13px; }
/* nav */
#nav { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px calc(6px + var(--safe-b)); background: var(--raised); border-top: 1px solid var(--line); }
#nav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--text3); font-size: 11.5px; } #nav button.on { color: var(--honey); }
#nav i { position: absolute; top: 2px; right: 18%; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--review); color: #1b1403; font: 700 11px/17px system-ui; text-align: center; font-style: normal; }
/* sheets */
.sheet { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.72); display: flex; align-items: flex-end; } .sheet.full { background: var(--bg); align-items: stretch; flex-direction: column; overflow-y: auto; }
.panel { width: 100%; max-height: 92%; overflow-y: auto; padding: 22px 18px calc(22px + var(--safe-b)); background: var(--raised); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line2); }
.vhead { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-t)) 14px 8px; }
.cmp { position: relative; margin: 0 14px; border-radius: 16px; overflow: hidden; background: #fff; aspect-ratio: 1; touch-action: none; user-select: none; } .cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cmp .before { background: #222; } .cmp .lbl { position: absolute; top: 8px; padding: 2px 9px; border-radius: 9px; font-size: 12px; background: rgba(0,0,0,.6); color: #fff; } .cmp .handle { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--honey); box-shadow: 0 0 0 1px rgba(0,0,0,.3); } .cmp .handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; background: var(--honey); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.alert { margin: 12px 14px 0; padding: 12px 14px; border-radius: 14px; font-size: 14px; } .alert.review { background: var(--reviewbg); color: var(--review); border: 1px solid rgba(255,162,77,.4); } .alert.bad { background: var(--failbg); color: var(--fail); border: 1px solid rgba(255,112,112,.45); } .alert.ok { background: var(--passbg); color: var(--pass); } .alert ul { margin: 6px 0 0; padding-left: 18px; }
.vact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; } .vact .primary { grid-column: 1 / -1; }
#toasts { position: absolute; left: 12px; right: 12px; bottom: calc(76px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; z-index: 40; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--surface3); border: 1px solid var(--line2); font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.45); } .toast button { color: var(--honey); font-weight: 650; padding: 4px 6px; }
@media (min-width: 760px) { #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

/* ---- offline-first additions ---- */
#statusline { margin: 0 14px 6px; padding: 5px 12px; border-radius: 12px; font-size: 12.5px; color: var(--text2); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#statusline.ok { color: var(--pass); } #statusline.warn { color: var(--honey2); border-color: rgba(246,193,66,.45); cursor: pointer; }
.dot.off { background: var(--info); }
.th.s-off { border-color: var(--info); } .st.off { color: var(--info); } .badge.off { background: rgba(132,170,255,.15); color: var(--info); }
.tile .sy { position: absolute; left: 4px; right: 4px; top: 4px; font-size: 10px; color: var(--text2); text-shadow: 0 1px 3px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbar .btn { flex: 1; }
.vtabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; } .vtabs::-webkit-scrollbar { display: none; }
.vsync { padding: 6px 16px 0; }
.bar { height: 8px; border-radius: 4px; background: var(--surface3); margin: 10px 0 6px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--honey); transition: width .2s; }
.card .btn { margin-top: 10px; } .card .fine { margin-top: 6px; } .card .fine.bad, .bad { color: var(--fail); } .okt { color: var(--pass); } .warnt { color: var(--honey2); }
.card label.sel { display: flex; align-items: center; gap: 8px; margin-top: 10px; } .card select { flex: 1; min-height: 40px; border-radius: 12px; background: var(--surface2); color: var(--text); border: 1px solid var(--line2); padding: 0 10px; font-size: 14px; }
.wsi { padding: 0; overflow: hidden; } .wsi > button:first-child { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; text-align: left; } .wsi .x { width: 48px; align-self: stretch; color: var(--text3); }
.alert.off { background: rgba(132,170,255,.12); color: var(--info); border: 1px solid rgba(132,170,255,.35); }

/* ---- names, review, translation ---- */
#nameBar { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 10px; border-radius: 16px; background: rgba(14,15,17,.82); backdrop-filter: blur(8px); border: 1px solid var(--line2); }
#nameBar img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface2); flex: none; }
.nbcol { flex: 1; min-width: 0; } #nbAr { width: 100%; min-height: 40px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line2); color: var(--text); font-size: 16px; }
.nben { font-size: 12px; color: var(--text3); padding: 2px 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: left; }
.tile { aspect-ratio: auto; background: none; padding: 0; display: block; text-align: start; border-radius: 12px; border: 0; }
.tile .im { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface); border: 2px solid transparent; } .tile.sel .im { border-color: var(--honey); }
.tile .cap { font-size: 12px; color: var(--text2); padding: 4px 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 20px; }
.rvd { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; font: 700 12px/20px system-ui; text-align: center; background: rgba(0,0,0,.66); } .rv-approved { color: var(--pass); } .rv-later { color: var(--honey2); } .rv-needs { color: var(--review); } .rv-rejected { color: var(--fail); }
.rvlist { display: flex; flex-direction: column; gap: 10px; }
.rv { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.rv .pic { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: #fff; padding: 0; } .rv .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rv .info { min-width: 0; } .rv .nm { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rv .en { font-size: 13px; color: var(--text2); direction: ltr; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rv .bd { margin: 4px 0 6px; }
.rv .acts { display: flex; gap: 8px; } .rv .acts .btn { min-height: 40px; padding: 0 12px; flex: 1; font-size: 14px; }
.enc { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; background: var(--surface3); color: var(--text2); } .enc.suggested { background: var(--reviewbg); color: var(--review); } .enc.approved { background: var(--passbg); color: var(--pass); } .enc.failed { background: var(--failbg); color: var(--fail); }
.prod { margin: 12px 14px 0; display: flex; flex-direction: column; gap: 8px; } .prod label { display: flex; flex-direction: column; gap: 4px; } .prod input { min-height: 44px; font-size: 16px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line2); color: var(--text); width: 100%; }
.prow { display: flex; gap: 8px; margin-top: 6px; } .prow .btn { flex: 1; min-height: 42px; font-size: 14px; } .prow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.decide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 14px 0; } .decide .btn { min-height: 44px; padding: 0 6px; font-size: 13.5px; } .decide .btn.on { background: var(--honey); color: var(--onhoney); border-color: var(--honey); }
/* save confirmation (shown only after the original is committed) and the red notice when the phone refuses a write */
#saveChip { align-self: center; margin-bottom: 6px; padding: 4px 12px; border-radius: 14px; font-size: 13px; font-weight: 650; background: rgba(255,255,255,.12); color: var(--text2); } #saveChip.saved { background: rgba(70,217,148,.18); color: var(--pass); }
#saveBanner { margin: 0 12px 8px; padding: 12px 14px; border-radius: 14px; background: var(--failbg); border: 1px solid rgba(255,107,107,.45); color: var(--text); display: flex; flex-direction: column; gap: 6px; } #saveBanner b { color: var(--fail); font-size: 15px; } #saveBanner span { font-size: 13.5px; color: var(--text2); }
#saveBanner .sbb { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* the viewer is a scrolling column: its children must keep their size (the square before/after picture was being squeezed to a thin strip by flex-shrink once the name / review block was added) */
.sheet.full > * { flex-shrink: 0; }
