body.mobile { padding-bottom: env(safe-area-inset-bottom); -webkit-tap-highlight-color: transparent; }
.m-center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 1.25rem; max-width: 480px; margin: 0 auto; }
.m-logo { width: 96px; height: 96px; object-fit: contain; margin-bottom: 1rem; }
.m-title { font-size: 1.5rem; font-weight: 800; margin-bottom: .75rem; }
.m-btn { width: 100%; padding: 1rem; border-radius: 14px; font-weight: 700; margin-top: 1rem; }
.m-icon-bad { font-size: 3.5rem; color: var(--danger); margin-bottom: .5rem; }
.m-reader { width: 100%; max-width: 360px; border-radius: 16px; overflow: hidden; background: #000; min-height: 200px; }

.offline-bar { position: sticky; top: 0; z-index: 50; background: var(--warn-bg); color: var(--warn-fg); border-bottom: 1px solid var(--warn); text-align: center; padding: .4rem; font-size: .85rem; font-weight: 600; }
.m-head { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; padding-top: calc(.75rem + env(safe-area-inset-top)); background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 40; }
.m-head-logo { width: 40px; height: 40px; background: #fff; border-radius: 10px; padding: 3px; object-fit: contain; }
.m-head-txt { flex: 1; line-height: 1.15; } .m-head-txt small { opacity: .85; font-size: .72rem; letter-spacing: .06em; }
.m-head-cart { position: relative; font-size: 1.35rem; padding: .25rem .5rem; cursor: pointer; }
.m-head-cart span { position: absolute; top: -4px; right: -2px; background: var(--accent); color: #222; border-radius: 999px; font-size: .7rem; font-weight: 800; min-width: 20px; text-align: center; padding: 0 5px; }
.m-view { padding: 1rem 1rem 6.5rem; max-width: 560px; margin: 0 auto; }
.m-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); z-index: 45; }
.m-nav button { flex: 1; border: 0; background: none; padding: .55rem 0 .5rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .05em; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.m-nav button i { font-size: 1.25rem; } .m-nav button.on { color: var(--brand-text); }
.m-toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: .7rem 1.1rem; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; font-weight: 600; max-width: 90%; text-align: center; }
.m-toast.show { opacity: 1; transform: translate(-50%, 0); } .m-toast.bad { background: var(--danger); color: #fff; }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.tile { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 1.1rem .5rem; text-align: center; font-weight: 700; color: var(--text); box-shadow: var(--shadow); }
.tile i { display: block; font-size: 1.8rem; color: var(--brand-text); margin-bottom: .35rem; }
.tile.main { grid-column: 1 / -1; background: var(--brand); color: #fff; padding: 1.5rem; font-size: 1.25rem; } .tile.main i { color: #fff; font-size: 2.4rem; }
.tile[disabled] { opacity: .5; } .tile small { display: block; font-weight: 500; color: var(--muted); }
.code-box { text-align: center; padding: 1.1rem; } .code-box .code { font-size: 2.2rem; font-weight: 900; letter-spacing: .08em; color: var(--brand-text); font-family: ui-monospace, Menlo, Consolas, monospace; }
#scan-reader { width: 100%; border-radius: var(--radius); overflow: hidden; background: #111; min-height: 220px; }
.pcard { padding: 1rem; } .pcard .name { font-weight: 800; font-size: 1.15rem; } .pcard .price { font-size: 1.9rem; font-weight: 900; color: var(--brand-text); }
.pcard .old { text-decoration: line-through; color: var(--muted); margin-left: .4rem; font-size: 1rem; font-weight: 500; }
.pimg { width: 100%; max-height: 160px; object-fit: contain; border-radius: 12px; background: var(--brand-soft); margin-bottom: .6rem; }
.stepper { display: inline-flex; align-items: center; gap: .6rem; } .stepper button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 1.3rem; font-weight: 700; color: var(--text); }
.stepper span { min-width: 2.2rem; text-align: center; font-weight: 800; font-size: 1.2rem; }
.cline { display: flex; gap: .75rem; padding: .85rem; border-bottom: 1px solid var(--border); align-items: center; } .cline:last-child { border-bottom: 0; }
.cline .n { flex: 1; font-weight: 700; line-height: 1.2; } .cline .s { font-size: .82rem; color: var(--muted); font-weight: 500; }
.cline .stepper button { width: 36px; height: 36px; font-size: 1.1rem; } .cline .stepper span { min-width: 1.6rem; font-size: 1rem; }
.total-bar { display: flex; justify-content: space-between; font-size: 1.4rem; font-weight: 900; padding: .9rem; }
.big-code { font-size: 3rem; font-weight: 900; letter-spacing: .1em; color: var(--brand-text); font-family: ui-monospace, Menlo, Consolas, monospace; }

/* --- price scanner additions --- */
.hero { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-radius: var(--radius); padding: 1.1rem; }
.hero .tile.main { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4) !important; }
.k { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .v { font-weight: 900; font-size: 1.1rem; }
.stamp { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 1rem; }
.mrow { display: flex; justify-content: space-between; gap: .75rem; padding: .7rem 1rem; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; align-items: center; }
.mrow .n { font-weight: 600; line-height: 1.2; } .mrow .pr { font-weight: 800; white-space: nowrap; color: var(--brand-text); text-align: right; } .mrow.big { padding: .9rem 1rem; }
.ok-tag { font-size: .78rem; font-weight: 800; letter-spacing: .06em; color: var(--brand-text); margin-bottom: .5rem; }
.lbl { font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); } .reg { font-size: 1.15rem; text-decoration: line-through; color: var(--muted); }
.price.promo { color: var(--promo); } .save { display: inline-block; margin-top: .25rem; background: var(--ok-bg); color: var(--ok-fg); font-weight: 800; border-radius: 8px; padding: .15rem .55rem; font-size: .85rem; }
.pill-upd, .pill-promo, .pill-low { display: inline-block; font-size: .65rem; font-weight: 800; letter-spacing: .04em; border-radius: 999px; padding: .1rem .5rem; vertical-align: middle; }
.pill-upd { background: var(--warn-bg); color: var(--warn-fg); margin-bottom: .35rem; } .pill-promo { background: var(--promo-bg); color: var(--promo); } .pill-low { background: var(--ok-bg); color: var(--ok-fg); }
.noimg { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--brand-text); }
.adj { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 1rem; border-top: 1px solid var(--border); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

.m-theme { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 30; }

/* camera scanner */
#scan-reader video, #qr-reader video { width: 100% !important; border-radius: var(--radius); display: block; }
#scan-reader, #qr-reader { min-height: 200px; }
.btn.active { background: var(--accent); border-color: var(--accent); color: #1b1300; }
