/* ФудДвор: экраны витрины и команды. Токены берутся из app.css */
[hidden] { display: none !important; }
.app { max-width: 560px; margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; }
.app.wide { max-width: 980px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s2); padding: 10px var(--s3); background: var(--bg-glass); backdrop-filter: blur(10px); }
.topbar .title { font-weight: 750; font-size: 19px; line-height: 1.2; }
.topbar .sub { color: var(--text-2); font-size: var(--fs-small); }
.logo-img { display: block; height: 38px; width: auto; }
.logo-big { display: block; width: 220px; max-width: 70%; height: auto; margin: 0 auto; }
.hero { position: relative; padding: 18px 0 6px; margin-bottom: 18px; }
.hero-blob { position: absolute; right: 0; top: 0; width: min(170px, 45vw); height: auto; z-index: 0; pointer-events: none; }
.hero-title { position: relative; z-index: 1; font-size: clamp(26px, 9.4vw, 36px); line-height: 1.02; font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; max-width: 11ch; }
.hero-slogan { position: relative; z-index: 1; margin-top: 10px; color: var(--primary); font-weight: 900; text-transform: uppercase; font-size: 19px; line-height: 1.1; }
/* фирменный паттерн фоном витрины: приглушён белой вуалью, чтобы текст на фоне читался */
body.brand-bg { background: linear-gradient(rgb(255 255 255 / 86%), rgb(255 255 255 / 86%)), url(/brand/pattern.webp) center top / 620px auto repeat, #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.brand-bg { background: linear-gradient(rgb(14 14 14 / 90%), rgb(14 14 14 / 90%)), url(/brand/pattern.webp) center top / 620px auto repeat, #0e0e0e; } }
.h2 { font-size: 22px; font-weight: 900; text-transform: uppercase; margin: 6px 0 2px; }
.pattern-band { height: 120px; margin-top: 8px; background: url(/brand/pattern-band.webp) center / cover no-repeat; }
.main { flex: 1; padding: 0 var(--s4) calc(var(--s8) + 80px); }
.h1 { font-size: var(--fs-h1); font-weight: 900; text-transform: uppercase; line-height: 1.05; margin: var(--s2) 0 var(--s1); }
.lead { color: var(--text-2); margin-bottom: var(--s4); }
.list > * + * { margin-top: 10px; }
.bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: var(--fs-small); margin-bottom: 8px; }
.bar .icon { color: var(--primary); }
.bar button { margin-left: auto; }
.round-bar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-size: var(--fs-small); margin-bottom: 12px; }
.round-bar.closed { background: var(--brand-grey); color: #000; }

/* витрина: две колонки, фото и видео рядом (эскиз заказчика) */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pc { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.pc .media { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; aspect-ratio: 1 / 1; }
.pc .media.one { grid-template-columns: 1fr; }
.tile { position: relative; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; display: block; width: 100%; height: 100%; min-height: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile .play { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / 92%); color: #1a1512; display: grid; place-items: center; box-shadow: 0 2px 8px rgb(0 0 0 / 25%); }
.tile .play .icon { width: 18px; height: 18px; margin-left: 2px; }
.tile .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-3); }
.pn { font-weight: 900; font-size: 15.5px; margin: 8px 3px 0; line-height: 1.15; overflow-wrap: anywhere; text-transform: uppercase; color: var(--primary); letter-spacing: .01em; }
.pp { font-size: 14px; color: var(--text-2); margin: 2px 3px 0; }
.pp b { color: var(--text); font-size: 16px; font-weight: 900; text-transform: uppercase; }
.ppk { font-size: 13px; color: var(--text-3); margin: 1px 3px 0; }
.ctrs { margin-top: auto; padding-top: 6px; }
.ctr { display: flex; justify-content: space-between; gap: 6px; font-size: 13.5px; padding: 6px 9px; border-radius: 9px; margin-top: 4px; }
.ctr.l { background: var(--accent); color: var(--on-accent); }
.ctr.s { background: var(--surface-2); }
.ctr b { font-weight: 800; white-space: nowrap; }
.pc .btn { margin-top: 6px; min-height: 46px; border-radius: 12px; width: 100%; padding: 0 8px; }
.pc.gone .media { filter: grayscale(1); opacity: .6; }
.sold { margin-top: 6px; min-height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 750; font-size: 15px; text-align: center; }
.mini { display: flex; align-items: center; margin-top: 6px; border: 1.5px solid var(--primary); border-radius: 12px; overflow: hidden; height: 46px; background: var(--surface); }
.mini output { flex: 1; text-align: center; font-weight: 800; font-size: 16px; white-space: nowrap; }
.mini button { width: 46px; height: 100%; flex: none; border: 0; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); cursor: pointer; transition: background var(--t-fast); }
.mini button:hover { background: var(--primary); color: var(--on-primary); }
.mini button:active { background: var(--primary-active); color: var(--on-primary); }
.mini button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.mini button[disabled] { opacity: .35; cursor: not-allowed; background: var(--primary-soft); color: var(--primary); }
.mini .icon { stroke-width: 2.8; }

.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); box-shadow: var(--shadow-up); padding: 10px var(--s4) calc(12px + env(safe-area-inset-bottom)); }
.cartbar .in { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.cartbar .sum { font-weight: 800; font-size: 20px; }
.footbar { position: sticky; bottom: 0; z-index: 10; background: var(--surface); box-shadow: var(--shadow-up); padding: 10px var(--s4) calc(12px + env(safe-area-inset-bottom)); margin: 12px calc(-1 * var(--s4)) 0; }

.line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.th { width: 52px; height: 52px; border-radius: 10px; flex: none; object-fit: cover; background: var(--surface-2); display: block; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kv > span:first-child { color: var(--text-2); }
.kv b { text-align: right; }
.big-ok { width: 72px; height: 72px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; margin: 32px auto 14px; }
.big-ok .icon { width: 38px; height: 38px; stroke-width: 2.6; }
.center { text-align: center; }
.ord { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.ord + .ord { margin-top: 10px; }
.ord.dim { opacity: .72; }
.player { width: 100%; max-height: 72svh; border-radius: 12px; background: #000; object-fit: contain; }
.fld + .fld, .two + .fld, .fld + .two, .two + .two, .fld + .hintline + .two { margin-top: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two > .fld + .fld { margin-top: 0; }
.grp { font-size: 12.5px; font-weight: 750; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin: 18px 2px 8px; }
.it { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; width: 100%; text-align: left; font: inherit; color: inherit; }
button.it { cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
button.it:hover { border-color: var(--primary); }
button.it:active { background: var(--surface-2); }
button.it:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.it + .it { margin-top: 8px; }
.it .nm { font-weight: 700; }
.it .mt { font-size: 13.5px; color: var(--text-2); }
.it .th { width: 48px; height: 48px; }
.prog { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.prog i { display: block; height: 100%; background: var(--success); }
.tabs { position: sticky; bottom: 0; z-index: 25; display: flex; border-top: 1px solid var(--border); background: var(--surface); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; border: 0; background: none; padding: 8px 0 10px; font: 650 12px/1.2 var(--font); color: var(--text-3); cursor: pointer; }
.tabs button .icon { display: block; margin: 0 auto 3px; width: 23px; height: 23px; }
.tabs button[aria-selected="true"] { color: var(--primary); }
.tabs button:hover { color: var(--text); }
.tabs button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.upbox { position: relative; border: 2px dashed var(--border-strong); border-radius: 14px; aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; color: var(--text-2); font-size: 14px; font-weight: 650; background: var(--surface); cursor: pointer; overflow: hidden; }
.upbox:hover { border-color: var(--primary); }
.icon-btn.danger-ic { color: var(--danger); }
.icon-btn.danger-ic:hover, .icon-btn.danger-ic:active { background: var(--danger-soft); }
.upbox.is-missing { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.upbox:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.upbox input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 4; }
.upbox .icon { display: block; width: 28px; height: 28px; margin: 0 auto 6px; color: var(--primary); }
.upbox img, .upbox video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upbox .badge { position: absolute; left: 8px; bottom: 8px; z-index: 2; }
.upbox .pbar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--primary); z-index: 3; transition: width .2s; }
.calc { background: var(--success-soft); border-radius: 12px; padding: 4px 12px; margin-top: 12px; }
.calc .kv { border-bottom-color: rgb(31 122 69 / 18%); }
.calc .kv:last-child { border-bottom: 0; }
.hintline { font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin-top: 10px; }
.stat { display: flex; gap: 10px; flex-wrap: wrap; }
.stat > div { flex: 1; min-width: 90px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.stat .v { font-size: 22px; font-weight: 800; }
.stat .l { font-size: 13px; color: var(--text-2); }
.linkbox { font-size: 13px; word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: 10px; }
.skel-card { height: 330px; border-radius: 16px; }
.tbl-wrap { overflow-x: auto; }
@media (min-width: 720px) { .grid2.auto { grid-template-columns: repeat(3, 1fr); } }

/* ---------- приложение на экране телефона ---------- */
.install-slot { max-width: 560px; margin: 0 auto; padding: 10px 16px 0; }
.install-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 12px; padding: 12px; border-radius: 14px; background: var(--accent); color: var(--on-accent); }
.install-card .install-go { grid-column: 1 / -1; min-height: 46px; }
.install-text b { display: block; font-weight: 800; line-height: 1.2; }
.install-card img { border-radius: 10px; flex: none; }
.install-card .muted { color: rgb(0 0 0 / 72%); }
.install-card .icon-btn { width: 40px; height: 40px; color: #000; }
.install-card .icon-btn:hover, .install-card .icon-btn:active { background: #e6cc00; }
.install-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.install-head img { border-radius: 12px; }
.isteps { list-style: none; padding: 0; margin: 0; }
.istep { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.istep:last-child { border-bottom: 0; }
.istep .icon { width: 22px; height: 22px; vertical-align: -5px; color: var(--primary); }
.istep-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.offline-bar { position: sticky; top: 0; z-index: 40; background: #000; color: #fff; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 12px; }
html { -webkit-tap-highlight-color: transparent; }
.btn, .choice, .tabs button, .mini button, .seg button { -webkit-user-select: none; user-select: none; }
html.standalone body { overscroll-behavior-y: contain; }
html.standalone .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
html.standalone .install-slot:empty { display: none; }

/* расшифровка заказа */
.receipt { font-size: 14.5px; }
.rc-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.rc-name { font-weight: 600; }
.rc-calc { margin-left: auto; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-calc b { color: var(--text); }
.rc-total { display: flex; justify-content: space-between; gap: 10px; padding-top: 7px; font-size: 16px; }
.rc-total span { color: var(--text-2); }
.rc-total b { font-weight: 800; }

.pvz-ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.pvz-big { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }

/* карточка пункта выдачи */
.pvz-head { display: flex; gap: 12px; align-items: center; text-align: left; }
.pvz-head img { border-radius: 10px; flex: none; }
.pvz-head > span { display: flex; flex-direction: column; font-size: 21px; line-height: 1.15; }
.pvz-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.pvz-sub { font-size: 13.5px; font-weight: 500; color: var(--text-2); margin-top: 2px; }
.gal { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 55%); color: #fff; display: grid; place-items: center; cursor: pointer; }
.gal-nav:hover, .gal-nav:active { background: rgb(0 0 0 / 75%); }
.gal-nav:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.gal-nav.prev { left: 8px; } .gal-nav.next { right: 8px; }
.gal-count { position: absolute; right: 10px; bottom: 10px; background: rgb(0 0 0 / 60%); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gal-th { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; }
.gal-th img { width: 100%; height: 100%; object-fit: cover; }
.gal-th[aria-current="true"] { border-color: var(--primary); }
.gal-th:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pvz-hours { display: flex; gap: 10px; align-items: center; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
/* редактор фото пункта */
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.gth { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.gth img { width: 100%; height: 100%; object-fit: cover; }
.gdel { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 60%); color: #fff; display: grid; place-items: center; cursor: pointer; }
.gdel:hover, .gdel:active { background: var(--danger); }
.gadd { display: grid; place-items: center; align-content: center; gap: 4px; border: 2px dashed var(--border-strong); color: var(--text-2); font-weight: 650; font-size: 13px; cursor: pointer; background: var(--surface); }
.gadd:hover { border-color: var(--primary); color: var(--primary); }
.gadd input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gadd .icon { color: var(--primary); }
.pvz-big-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; }
.pvz-big-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* категории */
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; border-radius: 12px; }
.cat-pick.is-missing { outline: 2px solid var(--danger); outline-offset: 4px; }
.cat-pick .chip { min-height: 40px; }
.cat-bar { position: sticky; top: 64px; z-index: 15; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 8px 0 10px; margin: 0 calc(-1 * var(--s4)) 4px; padding-inline: var(--s4); background: var(--bg-glass); backdrop-filter: blur(8px); }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar .chip { flex: none; min-height: 40px; font-size: 15px; }
.cat-n { font-weight: 400; margin-left: 2px; }
.cat-h { font-size: 22px; font-weight: 900; text-transform: uppercase; margin: 18px 2px 10px; }
.cat-sec:first-of-type .cat-h { margin-top: 8px; }

/* управление категориями */
.cat-list { display: flex; flex-direction: column; }
.cat-row { display: flex; align-items: center; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cat-row .nm { font-weight: 700; }
.cat-row .mt { font-size: 13px; color: var(--text-3); }
.cat-row .icon-btn:disabled { opacity: .3; cursor: default; }
.cat-add { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; }
.cat-add .fld { margin: 0; }

/* публикация наверху списка: видна сразу, не зависит от нижней панели браузера */
.pub-top { margin: 4px 0 10px; }
/* оценка пункта */
.stars { display: flex; gap: 4px; }
.star { width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 12px; color: var(--text); cursor: pointer; }
.star svg { width: 34px; height: 34px; }
.star.on svg, .stars-line .on svg { fill: var(--accent); }
.star:hover { background: var(--surface-2); }
.star:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.star:disabled { opacity: .5; }
.stars-line { display: inline-flex; gap: 1px; vertical-align: -3px; color: var(--text); }
.stars-line svg { width: 15px; height: 15px; }
.rate-ask { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.rate-ask.banner { margin: 0 0 12px; background: var(--surface); border: 2px solid var(--text); }
.rate-done { margin-top: 6px; }

/* что закупить */
.buy { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 8px; }
.buy-nm { font-size: 17px; }
.buy-q { font-weight: 800; font-size: 17px; white-space: nowrap; }
.buy-box { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; padding: 8px 10px; border-radius: var(--radius-s); background: var(--accent); color: var(--on-accent); font-weight: 800; }
.buy-box svg { width: 20px; height: 20px; flex: none; }
.buy-box.muted-box { background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.buy .mt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); margin-top: 2px; }
.buy .mt svg { width: 16px; height: 16px; flex: none; }
.buy-total { font-size: 19px; border: 0; margin-top: 6px; }
