/* Vyberfoto – client front-end */

:root {
	--vf-text: #1f1f1f;
	--vf-muted: #6b6b6b;
	--vf-line: #e3e3e3;
	--vf-thumb-bg: #f3f3f3;
	--vf-ok: #2E7D32;
	--vf-no: #C62828;
	--vf-accent: #1f1f1f;
	--vf-radius: 8px;
	--vf-max: 1400px;
	--vf-gap: 24px;
	--vf-side: 24px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.vf-noscroll,
html.vf-noscroll body { overflow: hidden; }

body.vf-body {
	margin: 0;
	background: #fff;
	color: var(--vf-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	font-size: 15px;
	line-height: 1.45;
}

a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }

:focus-visible { outline: 2px solid #1565C0; outline-offset: 2px; }

/* ---------- Generic ---------- */

.vf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid #cfcfcf;
	border-radius: var(--vf-radius);
	background: #fff;
	text-decoration: none;
	font-weight: 500;
	transition: background-color .15s, border-color .15s;
}
.vf-btn:hover { background: #f5f5f5; }
.vf-btn-primary { background: var(--vf-accent); border-color: var(--vf-accent); color: #fff; }
.vf-btn-primary:hover { background: #3a3a3a; }
.vf-btn-primary:disabled { background: #8a8a8a; border-color: #8a8a8a; }
.vf-btn-block { width: 100%; }

.vf-alert {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: var(--vf-radius);
	background: #fdecea;
	color: #8e1c1c;
}
.vf-alert p { margin: 0 0 12px; }

.vf-empty,
.vf-loading { color: var(--vf-muted); padding: 40px 0; text-align: center; }

/* ---------- Login ---------- */

.vf-center {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: #fafafa;
}
.vf-card {
	width: 100%;
	max-width: 380px;
	padding: 36px 32px;
	background: #fff;
	border: 1px solid var(--vf-line);
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .05);
}
.vf-brand { margin: 0 0 28px; font-size: 26px; font-weight: 600; text-align: center; letter-spacing: -.01em; }
.vf-card-note { text-align: center; color: var(--vf-muted); }
.vf-form { display: flex; flex-direction: column; gap: 16px; }
.vf-field { display: flex; flex-direction: column; gap: 6px; }
.vf-label { font-size: 14px; font-weight: 500; }
.vf-input {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #cfcfcf;
	border-radius: var(--vf-radius);
	background: #fff;
	font-size: 16px;
}
.vf-input:focus { border-color: #1565C0; outline: none; box-shadow: 0 0 0 3px rgba(21, 101, 192, .15); }
.vf-form .vf-btn { margin-top: 8px; }

/* ---------- Header ---------- */

.vf-header { background: #fff; border-bottom: 1px solid var(--vf-line); }
.vf-header-sticky { position: sticky; top: 0; z-index: 50; }
.vf-header-inner {
	max-width: var(--vf-max);
	margin: 0 auto;
	padding: 14px var(--vf-side);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	flex-wrap: wrap;
}
.vf-header-main { display: flex; align-items: baseline; gap: 16px; min-width: 0; flex-wrap: wrap; }
.vf-title { margin: 0; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.vf-back { color: var(--vf-muted); text-decoration: none; white-space: nowrap; padding: 8px 0; }
.vf-back:hover { color: var(--vf-text); }
.vf-header-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 20px; }
.vf-shown { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; color: var(--vf-sel); }
.vf-progress { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.vf-logout { color: var(--vf-muted); text-decoration: none; white-space: nowrap; padding: 8px 0; }
.vf-logout:hover { color: var(--vf-text); text-decoration: underline; }

.vf-legend {
	padding-top: 0;
	justify-content: flex-start;
	gap: 6px 18px;
	font-size: 13px;
	color: var(--vf-muted);
}
.vf-legend:empty { display: none; }
.vf-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.vf-legend-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.vf-legend-count { margin-left: 2px; font-variant-numeric: tabular-nums; opacity: .8; }

/* ---------- Main / list ---------- */

.vf-main { max-width: var(--vf-max); margin: 0 auto; padding: 28px var(--vf-side) 64px; }
.vf-main-narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.vf-list-title { font-size: 16px; font-weight: 600; color: var(--vf-muted); margin: 8px 0 12px; }
.vf-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--vf-line); }
.vf-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
	padding: 14px 4px;
	border-bottom: 1px solid var(--vf-line);
	text-decoration: none;
	font-size: 17px;
}
.vf-list-item:hover { background: #fafafa; }
.vf-list-arrow { color: var(--vf-muted); }

/* ---------- Admin banner ---------- */

.vf-banner {
	margin: 0 0 28px;
	padding: 12px 16px;
	border-radius: var(--vf-radius);
	background: #f6f6f6;
	font-size: 14px;
}
.vf-banner.is-empty { color: var(--vf-muted); }

/* ---------- Product ---------- */

.vf-product { margin: 0 0 48px; }
.vf-product-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	flex-wrap: wrap;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--vf-line);
}
.vf-product-title { margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.vf-product-name { overflow-wrap: anywhere; }
.vf-product-count { font-size: 13px; font-weight: 400; color: var(--vf-muted); }
.vf-product-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.vf-pbtn {
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid #d0d0d0;
	border-radius: var(--vf-radius);
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	transition: background-color .15s, border-color .15s, color .15s;
}
.vf-pbtn-ok { color: var(--vf-ok); }
.vf-pbtn-no { color: var(--vf-no); }
.vf-pbtn-ok:hover { border-color: var(--vf-ok); background: #f1f8f1; }
.vf-pbtn-no:hover { border-color: var(--vf-no); background: #fdf1f1; }
.vf-pbtn-ok[aria-pressed="true"] { background: var(--vf-ok); border-color: var(--vf-ok); color: #fff; }
.vf-pbtn-no[aria-pressed="true"] { background: var(--vf-no); border-color: var(--vf-no); color: #fff; }

/* ---------- Grid ---------- */

.vf-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 32px var(--vf-gap);
}

.vf-photo { display: flex; flex-direction: column; min-width: 0; }

.vf-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: var(--vf-thumb-bg);
	overflow: hidden;
	cursor: zoom-in;
	box-shadow: 0 0 0 0 transparent;
	transition: box-shadow .15s;
}
.vf-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	-webkit-user-drag: none;
	user-select: none;
}
.vf-thumb:hover { box-shadow: 0 0 0 1px #c9c9c9; }
.vf-photo.is-ok .vf-thumb { box-shadow: 0 0 0 3px var(--vf-ok); }
.vf-photo.is-no .vf-thumb { box-shadow: 0 0 0 3px var(--vf-no); }

.vf-photo-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 10px;
	min-height: 40px;
}
.vf-mbtns { display: flex; gap: 6px; flex: none; }

.vf-mbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	border: 1px solid #d6d6d6;
	border-radius: var(--vf-radius);
	background: #fff;
	color: #9a9a9a;
	transition: background-color .15s, border-color .15s, color .15s;
}
.vf-mbtn-ok:hover { color: var(--vf-ok); border-color: var(--vf-ok); }
.vf-mbtn-no:hover { color: var(--vf-no); border-color: var(--vf-no); }
.vf-mbtn-ok[aria-pressed="true"] { background: var(--vf-ok); border-color: var(--vf-ok); color: #fff; }
.vf-mbtn-no[aria-pressed="true"] { background: var(--vf-no); border-color: var(--vf-no); color: #fff; }
.vf-ico { display: inline-flex; line-height: 0; }
.vf-mbtn-text { font-size: 14px; font-weight: 600; }

.vf-dots { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.vf-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: default;
}

.vf-fname {
	margin-top: 6px;
	font-size: 12px;
	color: var(--vf-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vf-others:empty { display: none; }
.vf-others { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.vf-onote { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.vf-onote-author { font-weight: 600; margin-right: 6px; }
.vf-onote-author::after { content: ":"; }

.vf-note-wrap { margin-top: 8px; }
.vf-note {
	display: block;
	width: 100%;
	min-height: 44px;
	max-height: 320px;
	padding: 8px 10px;
	border: 1px solid #dedede;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	line-height: 1.4;
	resize: vertical;
	transition: border-color .15s;
}
.vf-note::placeholder { color: #a5a5a5; }
.vf-note:hover { border-color: #c4c4c4; }
.vf-note:focus { border-color: #8f8f8f; outline: none; }

.vf-note-status { min-height: 18px; margin-top: 3px; font-size: 12px; color: var(--vf-muted); }
.vf-note-status.is-saved { color: var(--vf-ok); }
.vf-note-status.is-error { color: var(--vf-no); }
.vf-retry {
	padding: 2px 0;
	border: 0;
	background: none;
	color: var(--vf-no);
	font-size: 12px;
	font-weight: 600;
	text-decoration: underline;
}

/* ---------- Submit ---------- */

.vf-submit {
	margin: 56px auto 0;
	max-width: 520px;
	text-align: center;
	padding-top: 32px;
	border-top: 1px solid var(--vf-line);
}
.vf-submit-hint { margin: 0 0 16px; color: var(--vf-muted); }
.vf-submit-btn { min-width: 240px; min-height: 48px; font-size: 16px; }
.vf-submit-msg { margin: 16px 0 0; color: var(--vf-ok); font-weight: 500; }
.vf-submit-msg:empty { display: none; }

/* ---------- Select & download ---------- */

:root { --vf-sel: #1565C0; --vf-selbar-h: 72px; }

.vf-thumb-wrap { position: relative; }

/* corner toggle: 40px hit area, 24px checkbox look */
.vf-sel {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	width: 44px;
	height: 44px;
	padding: 7px;
	border: 0;
	background: transparent;
	transition: opacity .15s;
}
.vf-sel-box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex: none;
	border: 2px solid #8a8a8a;
	border-radius: 4px;
	background: rgba(255, 255, 255, .92);
	color: transparent;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
	transition: background-color .15s, border-color .15s, color .15s;
}
.vf-sel:hover .vf-sel-box { border-color: var(--vf-sel); }
.vf-sel[aria-pressed="true"] .vf-sel-box,
.vf-lb-selbtn[aria-pressed="true"] .vf-sel-box { background: var(--vf-sel); border-color: var(--vf-sel); color: #fff; }
.vf-photo.is-sel .vf-thumb-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 4px;
	box-shadow: inset 0 0 0 3px var(--vf-sel);
	background: rgba(21, 101, 192, .07);
	pointer-events: none;
}
/* mouse devices: keep the toggle subtle until hovered / used */
@media (hover: hover) and (pointer: fine) {
	.vf-sel { opacity: .55; }
	.vf-photo:hover .vf-sel,
	.vf-sel:focus-visible,
	.vf-sel[aria-pressed="true"],
	body.vf-has-selbar .vf-sel { opacity: 1; }
}

.vf-product-titlewrap { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; min-width: 0; }
.vf-pselbtn {
	min-height: 40px;
	padding: 6px 12px;
	border: 1px solid #d0d0d0;
	border-radius: var(--vf-radius);
	background: #fff;
	color: var(--vf-sel);
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	transition: background-color .15s, border-color .15s, color .15s;
}
.vf-pselbtn:hover { border-color: var(--vf-sel); background: #f1f6fc; }
.vf-pselbtn[aria-pressed="true"] { background: var(--vf-sel); border-color: var(--vf-sel); color: #fff; }

.vf-seltools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin: -8px 0 20px;
	font-size: 14px;
	color: var(--vf-muted);
}
.vf-tbtn {
	min-height: 40px;
	padding: 6px 10px;
	border: 0;
	border-radius: var(--vf-radius);
	background: transparent;
	color: var(--vf-sel);
	font-weight: 500;
}
.vf-tbtn:hover { background: #f1f6fc; }
.vf-tbtn:disabled { color: #a9a9a9; background: transparent; }

.vf-selbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 900; /* below lightbox (1000) and toast (2000) */
	background: #fff;
	border-top: 1px solid var(--vf-line);
	box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
.vf-selbar[hidden] { display: none; }
.vf-selbar-inner {
	max-width: var(--vf-max);
	min-height: var(--vf-selbar-h);
	margin: 0 auto;
	padding: 12px var(--vf-side);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.vf-selbar-count { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vf-selbar-actions { display: flex; gap: 8px; }
.vf-selbar .vf-btn { white-space: nowrap; }
body.vf-has-selbar .vf-main { padding-bottom: calc(64px + var(--vf-selbar-h) + env(safe-area-inset-bottom, 0px)); }
body.vf-has-selbar .vf-toast { bottom: calc(24px + var(--vf-selbar-h) + env(safe-area-inset-bottom, 0px)); }

.vf-dl-frame,
.vf-dl-form { position: absolute; width: 0; height: 0; border: 0; overflow: hidden; visibility: hidden; }

/* ---------- Filters ---------- */

.vf-photo[hidden],
.vf-product[hidden],
.vf-shown[hidden],
.vf-filter-empty[hidden],
.vf-filters [hidden] { display: none; }

.vf-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0 0 24px;
}
.vf-toolbar .vf-seltools { margin: 0; }
.vf-seltools-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 14px; cursor: pointer; }
.vf-seltools-opt input { width: 18px; height: 18px; margin: 0; flex: none; }
.vf-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }

.vf-chip {
	min-height: 40px;
	padding: 6px 14px;
	border: 1px solid #d0d0d0;
	border-radius: 20px;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	transition: background-color .15s, border-color .15s, color .15s;
}
.vf-chip:hover { border-color: #8f8f8f; }
.vf-chip-ok { color: var(--vf-ok); }
.vf-chip-no { color: var(--vf-no); }
.vf-chip-ok:hover { border-color: var(--vf-ok); }
.vf-chip-no:hover { border-color: var(--vf-no); }
.vf-chip-ok[aria-pressed="true"] { background: var(--vf-ok); border-color: var(--vf-ok); color: #fff; }
.vf-chip-no[aria-pressed="true"] { background: var(--vf-no); border-color: var(--vf-no); color: #fff; }
.vf-chip-note[aria-pressed="true"] { background: var(--vf-accent); border-color: var(--vf-accent); color: #fff; }

.vf-fselect {
	min-height: 40px;
	max-width: 100%;
	padding: 6px 10px;
	border: 1px solid #d0d0d0;
	border-radius: var(--vf-radius);
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 14px;
}
.vf-fdl {
	min-height: 40px;
	padding: 6px 14px;
	border: 1px solid var(--vf-accent);
	border-radius: var(--vf-radius);
	background: var(--vf-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
}
.vf-fdl:hover { background: #3a3a3a; }

/* ---------- Toast ---------- */

.vf-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 2000;
	max-width: calc(100% - 32px);
	padding: 12px 18px;
	border-radius: var(--vf-radius);
	background: #2b2b2b;
	color: #fff;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
	transform: translate(-50%, 20px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
}
.vf-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Lightbox ---------- */

.vf-lb {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	background: #111;
	color: #eee;
}
.vf-lb[hidden] { display: none; }

.vf-lb-top {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 8px 8px 8px 20px;
	min-height: 56px;
	flex: none;
}
.vf-lb-info { flex: 1; min-width: 0; }
.vf-lb-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-lb-fname { font-size: 12px; color: #a9a9a9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-lb-counter { font-size: 14px; color: #cfcfcf; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vf-lb-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
}
.vf-lb-close:hover { background: rgba(255, 255, 255, .12); }

.vf-lb-body { flex: 1; min-height: 0; display: flex; }

.vf-lb-stage { position: relative; flex: 1; min-width: 0; touch-action: pan-y pinch-zoom; }
.vf-lb-imgwrap {
	position: absolute;
	inset: 8px 72px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.vf-lb-img {
	display: block;
	max-width: min(100%, 1200px);
	max-height: 100%;
	object-fit: contain;
	background: #f3f3f3;
	user-select: none;
	-webkit-user-drag: none;
	transition: opacity .15s, box-shadow .15s;
}
.vf-lb.is-loading .vf-lb-img { opacity: .35; }
.vf-lb.is-ok .vf-lb-img { box-shadow: 0 0 0 4px var(--vf-ok); }
.vf-lb.is-no .vf-lb-img { box-shadow: 0 0 0 4px var(--vf-no); }

.vf-lb-nav {
	position: absolute;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	transition: background-color .15s, opacity .15s;
}
.vf-lb-nav:hover { background: rgba(255, 255, 255, .22); }
.vf-lb-nav:disabled { opacity: 0; pointer-events: none; }
.vf-lb-prev { left: 10px; }
.vf-lb-next { right: 10px; }

.vf-lb-side {
	flex: none;
	width: 340px;
	overflow-y: auto;
	padding: 20px;
	background: #fff;
	color: var(--vf-text);
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.vf-lb-marks { display: flex; gap: 8px; }
.vf-lb-marks .vf-mbtn { flex: 1; height: 44px; }
.vf-lb-dl { display: flex; gap: 8px; }
.vf-lb-dl[hidden] { display: none; }
.vf-lb-dl .vf-btn { flex: 1; min-height: 44px; padding: 8px 12px; gap: 8px; font-size: 14px; }
.vf-lb-selbtn { color: var(--vf-sel); }
.vf-lb-selbtn[aria-pressed="true"] { border-color: var(--vf-sel); background: #f1f6fc; }
.vf-lb-selbtn .vf-sel-box { width: 20px; height: 20px; box-shadow: none; }
.vf-lb.is-sel .vf-lb-img { outline: 3px solid var(--vf-sel); outline-offset: -3px; }
.vf-lb-side .vf-note-wrap { margin-top: 0; }
.vf-lb-dots { justify-content: flex-start; }
.vf-lb-dots:empty { display: none; }
.vf-lb-side .vf-others { margin-top: 0; }
.vf-lb-side .vf-onote { font-size: 14px; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	:root { --vf-gap: 20px; --vf-side: 20px; }
	.vf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.vf-lb-side { width: 300px; }
}

@media (max-width: 760px) {
	.vf-lb-body { flex-direction: column; }
	.vf-lb-stage { flex: 1 1 auto; min-height: 45vh; }
	.vf-lb-imgwrap { inset: 0 0 8px; }
	.vf-lb-nav { background: rgba(0, 0, 0, .45); width: 44px; height: 44px; margin-top: -22px; }
	.vf-lb-prev { left: 6px; }
	.vf-lb-next { right: 6px; }
	.vf-lb-side { width: auto; max-height: 42vh; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
	.vf-lb-top { padding-left: 16px; }
}

@media (max-width: 600px) {
	:root { --vf-gap: 12px; --vf-side: 16px; }
	body.vf-body { font-size: 15px; }
	.vf-header-sticky { position: static; }
	.vf-header-inner { padding-top: 12px; padding-bottom: 12px; }
	.vf-legend { padding-top: 0; }
	.vf-title { font-size: 18px; }
	.vf-main { padding-top: 20px; }
	.vf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px var(--vf-gap); }
	.vf-product { margin-bottom: 36px; }
	.vf-product-actions { width: 100%; }
	.vf-pbtn { flex: 1; min-height: 44px; padding: 8px 10px; white-space: normal; }
	.vf-mbtn { min-width: 44px; height: 44px; }
	.vf-photo-row { flex-wrap: wrap; }
	.vf-dot { width: 18px; height: 18px; font-size: 11px; }
	.vf-note { font-size: 16px; } /* prevents iOS zoom on focus */
	.vf-submit-btn { width: 100%; }
	.vf-card { padding: 28px 20px; }
	.vf-seltools { justify-content: flex-start; margin-top: -4px; }
	.vf-seltools-label { width: 100%; }
	.vf-toolbar .vf-seltools { width: 100%; }
	.vf-chip, .vf-fselect, .vf-fdl, .vf-tbtn { min-height: 44px; }
	.vf-fselect { font-size: 16px; } /* prevents iOS zoom on focus */
	.vf-fdl { width: 100%; }
	:root { --vf-selbar-h: 64px; }
	.vf-selbar-inner { padding-top: 10px; padding-bottom: 10px; gap: 8px; }
	.vf-selbar .vf-btn { padding: 8px 12px; font-size: 14px; }
	.vf-selbar-clear { padding-left: 8px; padding-right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
