/*
 * Vehicle Graphics Designer - front end.
 * Brand values follow auchterprint.co.uk (deep purple #44236B, Open Sans, pill buttons), same
 * as PPRICER. Everything hangs off CSS variables on .vgd-app, so a theme can restyle it.
 */
.vgd-app {
	--vgd-accent: #44236b;
	--vgd-accent-d: #341a53;
	--vgd-accent-soft: #efe9f6;
	--vgd-ink: #282828;
	--vgd-muted: #636363;
	--vgd-bg: #fff;
	--vgd-alt: #f2f5f7;
	--vgd-line: #dcdfe3;
	--vgd-good: #1b7a46;
	--vgd-warn: #a85d00;
	--vgd-bad: #b3261e;
	--vgd-r: 12px;
	--vgd-font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-family: var(--vgd-font);
	color: var(--vgd-ink);
	font-size: 16px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
	margin: 1.5em 0;
}
.vgd-app *,
.vgd-app *::before,
.vgd-app *::after { box-sizing: border-box; }
:where(.vgd-app) button,
:where(.vgd-app) input,
:where(.vgd-app) select,
:where(.vgd-app) textarea { font: inherit; color: inherit; }
.vgd-app [hidden] { display: none !important; }
html.vgd-lock, html.vgd-lock body { overflow: hidden; overscroll-behavior: none; }

.vgd-loading, .vgd-empty { padding: 2rem 1rem; text-align: center; color: var(--vgd-muted); }

/* ---------------------------------------------------------------- buttons */
.vgd-app button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vgd-app button:disabled { opacity: .4; cursor: not-allowed; }
.vgd-app :focus-visible { outline: 3px solid #9b7bd1; outline-offset: 2px; }
.vgd-primary, .vgd-secondary, .vgd-linkbtn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 44px; padding: .55em 1.3em; border-radius: 999px; font-weight: 700; font-size: .95rem;
	border: 2px solid var(--vgd-accent); text-decoration: none; line-height: 1.2;
	transition: background .15s, color .15s, transform .05s;
}
.vgd-primary, .vgd-linkbtn.vgd-primary { background: var(--vgd-accent); color: #fff; }
.vgd-primary:hover:not(:disabled) { background: var(--vgd-accent-d); border-color: var(--vgd-accent-d); }
.vgd-secondary { background: #fff; color: var(--vgd-accent); }
.vgd-secondary:hover:not(:disabled) { background: var(--vgd-accent-soft); }
.vgd-primary:active, .vgd-secondary:active { transform: scale(.98); }
.vgd-block { display: flex; width: 100%; }
.vgd-sheetcopy { display: grid; gap: .5rem; }
.vgd-sheetcopy:not(:empty) { margin-top: .5rem; }
.vgd-large { min-height: 52px; font-size: 1.05rem; }
.vgd-small { min-height: 36px; padding: .3em .9em; font-size: .85rem; }
.vgd-link { background: none; border: 0; color: var(--vgd-accent); text-decoration: underline; padding: .4em .2em; font-weight: 600; }
.vgd-iconbtn {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto;
	border: 0; border-radius: 50%; background: transparent; color: var(--vgd-ink);
}
.vgd-iconbtn:hover:not(:disabled) { background: var(--vgd-alt); }
.vgd-iconbtn.is-danger { color: var(--vgd-bad); }
.vgd-ico { display: inline-flex; line-height: 0; }
.vgd-btn-t { white-space: nowrap; }

/* ---------------------------------------------------------------- chooser */
.vgd-chooser { background: var(--vgd-bg); border: 1px solid var(--vgd-line); border-radius: var(--vgd-r); padding: clamp(1rem, 3vw, 2rem); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); }
.vgd-chooser-head h2 { margin: 0 0 .25em; font-size: clamp(1.35rem, 4vw, 1.9rem); line-height: 1.2; }
.vgd-chooser-head p { margin: 0 0 1em; color: var(--vgd-muted); }
.vgd-search { width: 100%; min-height: 48px; padding: .6em 1em; border: 2px solid var(--vgd-line); border-radius: 999px; font-size: 1rem; background: #fff; }
.vgd-search:focus { border-color: var(--vgd-accent); outline: none; }
.vgd-chips { display: flex; gap: .5rem; margin: .9rem 0; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.vgd-chip { flex: 0 0 auto; min-height: 40px; padding: .35em 1em; border: 1.5px solid var(--vgd-line); border-radius: 999px; background: #fff; font-weight: 600; font-size: .9rem; }
.vgd-chip.is-on { background: var(--vgd-accent); border-color: var(--vgd-accent); color: #fff; }
.vgd-vgrid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.vgd-vcard { display: flex; flex-direction: column; text-align: left; padding: .7rem; background: #fff; border: 1.5px solid var(--vgd-line); border-radius: var(--vgd-r); transition: border-color .15s, box-shadow .15s; }
.vgd-vcard:hover, .vgd-vcard:focus-visible { border-color: var(--vgd-accent); box-shadow: 0 4px 14px rgba(68,35,107,.15); }
.vgd-vthumb { display: block; aspect-ratio: 16 / 7; background: var(--vgd-alt); border-radius: 8px; margin-bottom: .55rem; overflow: hidden; }
.vgd-vthumb img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; }
.vgd-vname { font-weight: 700; line-height: 1.25; }
.vgd-vsub { color: var(--vgd-muted); font-size: .85rem; }
.vgd-vviews { margin-top: .3rem; font-size: .78rem; color: var(--vgd-accent); font-weight: 700; }
.vgd-resume { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; background: var(--vgd-accent-soft); padding: .8rem 1rem; border-radius: var(--vgd-r); margin: 0 0 1rem; }
.vgd-resume > span { flex: 1 1 200px; font-weight: 600; }

/* ---------------------------------------------------------------- designer shell */
.vgd-designer { display: flex; flex-direction: column; height: 80vh; height: min(86dvh, 900px); min-height: 560px; background: var(--vgd-bg); border: 1px solid var(--vgd-line); border-radius: var(--vgd-r); overflow: hidden; }
.vgd-full .vgd-designer { position: fixed; inset: 0; z-index: 99990; height: 100vh; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
.admin-bar .vgd-full .vgd-designer { top: 32px; height: auto; }
@media (max-width: 782px) { .admin-bar .vgd-full .vgd-designer { top: 46px; } }
.vgd-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "back title right" "tabs tabs tabs"; align-items: center; gap: 0 .3rem; padding: .35rem .5rem .1rem; border-bottom: 1px solid var(--vgd-line); background: #fff; }
.vgd-bar > .vgd-iconbtn { grid-area: back; }
.vgd-title { grid-area: title; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.vgd-title strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vgd-title small { color: var(--vgd-muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vgd-bar-r { grid-area: right; display: flex; align-items: center; gap: .15rem; }
.vgd-add-top { display: none; }
.vgd-pricebtn { display: inline-flex; flex-direction: column; align-items: flex-end; justify-content: center; min-height: 44px; padding: .1rem .85rem; border: 2px solid var(--vgd-accent); border-radius: 999px; background: var(--vgd-accent-soft); color: var(--vgd-accent-d); line-height: 1.05; margin-left: .2rem; }
.vgd-pricebtn strong { font-size: 1.05rem; }
.vgd-pricebtn small { font-size: .65rem; opacity: .8; }
.vgd-pricebtn.is-busy { opacity: .6; }
.vgd-viewtabs { grid-area: tabs; display: flex; gap: .4rem; overflow-x: auto; padding: .35rem 0 .45rem; scrollbar-width: none; }
.vgd-viewtabs::-webkit-scrollbar { display: none; }
.vgd-viewtab { flex: 0 0 auto; min-height: 36px; padding: .25em .9em; border: 1.5px solid var(--vgd-line); border-radius: 999px; background: #fff; font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4em; }
.vgd-viewall { background: var(--vgd-accent-soft); border-color: transparent; color: var(--vgd-accent); }
.vgd-viewtab.is-on { background: var(--vgd-accent); border-color: var(--vgd-accent); color: #fff; }
.vgd-viewtab em { font-style: normal; font-size: .72rem; min-width: 1.5em; height: 1.5em; line-height: 1.5em; text-align: center; border-radius: 99px; background: rgba(255,255,255,.28); }
.vgd-viewtab:not(.is-on) em { background: var(--vgd-accent-soft); color: var(--vgd-accent); }

.vgd-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vgd-stage-wrap { position: relative; flex: 1; min-height: 120px; background: #cfd4d8; overflow: hidden; }
.vgd-stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; cursor: grab; }
.vgd-stage:active { cursor: grabbing; }
.vgd-pasteboard { fill: #cfd4d8; }
.vgd-l-outline { mix-blend-mode: multiply; pointer-events: none; }
.vgd-outline-img { pointer-events: none; }
.vgd-l-board, .vgd-l-tags { pointer-events: none; }
.vgd-side .vgd-outline-img { mix-blend-mode: multiply; } /* like the working side: the outline's white body fill must not hide the artwork under it */
.vgd-side-ring { fill: none; stroke: rgba(70,76,90,.28); stroke-width: 1; }
.vgd-side-ring.is-on { stroke: var(--vgd-accent); stroke-width: 2.5; }
.vgd-side-tag { fill: #5b6470; font-weight: 700; font-family: var(--vgd-font); paint-order: stroke; stroke: rgba(207,212,216,.9); stroke-width: 3px; }
.vgd-side-tag.is-on { fill: var(--vgd-accent); }
.vgd-el { cursor: move; }
.vgd-el.is-locked { cursor: not-allowed; }
.vgd-panel-rect { fill: rgba(68,35,107,.05); stroke: var(--vgd-accent); stroke-width: 1.5; stroke-dasharray: 6 5; pointer-events: none; }
.vgd-panel-label { fill: var(--vgd-accent); font-weight: 700; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3px; font-family: var(--vgd-font); }
.vgd-guide { stroke: #e0245e; stroke-width: 1; stroke-dasharray: 4 3; pointer-events: none; }
.vgd-sel-box { fill: none; stroke: var(--vgd-accent); stroke-width: 1.8; stroke-dasharray: 7 4; pointer-events: none; }
.vgd-rot-line { stroke: var(--vgd-accent); stroke-width: 1.5; pointer-events: none; }
.vgd-handle { cursor: pointer; }
.vgd-handle-hit { fill: transparent; }
.vgd-handle-dot { fill: #fff; stroke: var(--vgd-accent); stroke-width: 2.5; }
.vgd-handle.is-rot .vgd-handle-dot { fill: var(--vgd-accent); stroke: #fff; }
.vgd-handle.is-edge .vgd-handle-dot { fill: var(--vgd-accent-soft); }
.vgd-zoomtools { position: absolute; right: .5rem; top: .5rem; z-index: 2; display: flex; flex-direction: column; gap: .3rem; }
.vgd-zoomtools .vgd-iconbtn { background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.vgd-hint { position: absolute; left: 50%; bottom: .8rem; transform: translateX(-50%); z-index: 2; max-width: 90%; padding: .5em 1em; background: rgba(40,40,40,.85); color: #fff; border-radius: 999px; font-size: .85rem; pointer-events: none; text-align: center; }

/* ---------------------------------------------------------------- phone: one tidy top row, floating undo/zoom, 4 tabs */
.vgd-viewpick, .vgd-hist, .vgd-grab { display: none; }
.vgd-viewlist { display: flex; flex-direction: column; gap: .4rem; }
.vgd-viewrow { display: flex; align-items: center; gap: .6rem; min-height: 52px; padding: .4rem .9rem; border: 1.5px solid var(--vgd-line); border-radius: 12px; background: #fff; text-align: left; font-weight: 700; font-size: 1rem; }
.vgd-viewrow span { flex: 1; }
.vgd-viewrow em { font-style: normal; font-weight: 600; font-size: .8rem; color: var(--vgd-muted); }
.vgd-viewrow.is-on { border-color: var(--vgd-accent); background: var(--vgd-accent-soft); color: var(--vgd-accent-d); }
@media (max-width: 899px) {
	.vgd-bar { grid-template-areas: "back title right"; padding: .3rem .5rem; }
	.vgd-title, .vgd-viewtabs, .vgd-hist-bar { display: none; }
	.vgd-viewpick { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; grid-area: title; min-width: 0; min-height: 44px; padding: .1rem .4rem; border: 0; border-radius: 10px; background: transparent; text-align: left; line-height: 1.2; }
	.vgd-viewpick:disabled { opacity: 1; }
	.vgd-vp-main { display: flex; align-items: center; gap: .1rem; max-width: 100%; }
	.vgd-vp-main strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.vgd-viewpick small { max-width: 100%; color: var(--vgd-muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.vgd-hist, .vgd-zoomtools { padding: 2px; border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: 0 1px 5px rgba(0,0,0,.22); }
	.vgd-hist { display: flex; position: absolute; left: .5rem; top: .5rem; z-index: 2; }
	.vgd-hist .vgd-iconbtn, .vgd-zoomtools .vgd-iconbtn { background: transparent; box-shadow: none; }
	.vgd-zoomtools { gap: 0; }
	.vgd-tabs { grid-template-columns: repeat(4, 1fr); }
	.vgd-tab[data-pane="price"] { display: none; }
	.vgd-grab { display: flex; justify-content: center; width: 100%; padding: .55rem 0 .3rem; border: 0; background: #fff; border-top: 1px solid var(--vgd-line); }
	.vgd-grab::before { content: ""; width: 42px; height: 5px; border-radius: 3px; background: #c9ccd1; }
	.vgd-dock.is-closed .vgd-grab { display: none; }
}

/* ---------------------------------------------------------------- dock: bottom drawer on phones, side panel on desktop */
.vgd-dock { display: flex; flex-direction: column-reverse; flex: 0 0 auto; background: #fff; border-top: 1px solid var(--vgd-line); }
.vgd-tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--vgd-line); background: #fff; padding-bottom: env(safe-area-inset-bottom); }
.vgd-dock .vgd-drawer { border-top: 0; }
.vgd-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: .35rem .1rem; border: 0; background: transparent; color: var(--vgd-muted); font-size: .72rem; font-weight: 600; border-top: 3px solid transparent; }
.vgd-tab.is-on { color: var(--vgd-accent); border-top-color: var(--vgd-accent); }
.vgd-drawer { max-height: 42vh; max-height: 42dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.vgd-dock.is-closed .vgd-drawer { display: none; }
.vgd-pane { padding: .8rem .9rem 1.1rem; }

@media (min-width: 900px) {
	.vgd-add-top { display: inline-flex; }
	.vgd-bar { grid-template-columns: auto minmax(0, 1fr) minmax(0, auto) auto; grid-template-areas: "back title tabs right"; padding: .4rem .7rem; }
	.vgd-viewtabs { padding: 0; justify-content: center; }
	.vgd-main { flex-direction: row; }
	.vgd-dock { flex-direction: column; width: 372px; border-top: 0; border-left: 1px solid var(--vgd-line); }
	.vgd-tabs { border-top: 0; border-bottom: 1px solid var(--vgd-line); padding-bottom: 0; }
	.vgd-tab { flex-direction: row; justify-content: center; min-height: 46px; font-size: .82rem; gap: 5px; border-top: 0; border-bottom: 3px solid transparent; }
	.vgd-tab .vgd-ico svg { width: 18px; height: 18px; }
	.vgd-tab.is-on { border-bottom-color: var(--vgd-accent); }
	.vgd-drawer { flex: 1; max-height: none; }
	.vgd-dock.is-closed .vgd-drawer { display: block; }
	.vgd-pricebtn { display: none; }
}
@media (min-width: 900px) and (max-width: 1150px) {
	.vgd-tab span:last-child { font-size: .75rem; }
	.vgd-tab .vgd-ico { display: none; }
}

/* ---------------------------------------------------------------- panes */
.vgd-h { margin: 1.2em 0 .5em; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--vgd-muted); }
.vgd-note { margin: .6em 0; font-size: .85rem; color: var(--vgd-muted); }
.vgd-note.is-warn { color: var(--vgd-warn); font-weight: 600; }
.vgd-addgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.vgd-addgrid .vgd-bigadd { padding: .8rem .3rem; min-height: 96px; }
.vgd-addgrid .vgd-bigadd strong { font-size: .95rem; }
.vgd-magic { display: flex; align-items: center; gap: .8rem; width: 100%; margin-top: .6rem; padding: .7rem .9rem; border: 2px dashed var(--vgd-accent); border-radius: var(--vgd-r); background: #fff; color: var(--vgd-accent-d); text-align: left; }
.vgd-magic:hover, .vgd-magic:focus-visible { background: var(--vgd-accent-soft); }
.vgd-magic span { display: flex; flex-direction: column; }
.vgd-magic small { color: var(--vgd-muted); font-size: .78rem; line-height: 1.25; }
.vgd-helpermodal { max-width: 560px; }
.vgd-helper .vgd-h { margin-top: 1.1em; }
.vgd-helper .vgd-primary.vgd-block { margin-top: .4rem; }
.vgd-select { width: 100%; min-height: 48px; padding: .4em .8em; border: 2px solid var(--vgd-line); border-radius: 10px; background: #fff; font-size: 1rem; }
/* select several + groups */
.vgd-sel-sub { fill: none; stroke: var(--vgd-accent); stroke-width: 1; stroke-dasharray: 3 3; opacity: .55; pointer-events: none; }
.vgd-sel-box.is-group { stroke-dasharray: none; stroke-width: 2.2; }
.vgd-marquee { fill: rgba(68,35,107,.08); stroke: var(--vgd-accent); stroke-width: 1.2; stroke-dasharray: 4 3; pointer-events: none; }
.vgd-multibtn.is-on { background: var(--vgd-accent) !important; color: #fff; }
.vgd-selbar { position: absolute; left: 50%; bottom: .8rem; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: .4rem; max-width: calc(100% - 1rem); padding: .3rem .4rem .3rem .9rem; border-radius: 999px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); white-space: nowrap; }
.vgd-selcount { font-weight: 700; font-size: .9rem; color: var(--vgd-accent-d); padding-right: .2rem; }
.vgd-selbar .vgd-small { min-height: 38px; }
@media (max-width: 899px) { .vgd-selbar { bottom: 3.7rem; } } /* sits above the confirmation toasts, which appear at the foot of the canvas */
.vgd-lcheck { flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid var(--vgd-line); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #fff; }
.vgd-lcheck.is-on { background: var(--vgd-accent); border-color: var(--vgd-accent); }
.vgd-ltag.is-group { background: var(--vgd-accent-soft); color: var(--vgd-accent-d); }
.vgd-ingroup { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .5rem .8rem; margin: .5rem 0; border-radius: 10px; background: var(--vgd-accent-soft); font-size: .88rem; font-weight: 600; color: var(--vgd-accent-d); }
.vgd-aligngrid { display: flex; gap: .4rem; margin: 0 0 .5rem; }
.vgd-alignbtn { border: 1.5px solid var(--vgd-line); background: #fff; flex: 1 1 0; max-width: 64px; }
.vgd-dspace { margin: .7rem 0 .2rem; }
.vgd-drow { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-bottom: .4rem; }
.vgd-dcheck { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.vgd-dcheck input { width: 22px; height: 22px; accent-color: var(--vgd-accent); }
.vgd-dtext { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: .4em .8em; border: 2px solid var(--vgd-line); border-radius: 10px; font-size: 1rem; background: #fff; }
.vgd-dtext:focus { border-color: var(--vgd-accent); outline: none; }
.vgd-drow.is-check .vgd-dtext { border-color: var(--vgd-warn); background: #fff8ee; }
.vgd-dwarn { flex: 1 0 100%; margin-left: 52px; font-size: .78rem; font-weight: 700; color: var(--vgd-warn); }
.vgd-aiout { display: flex; flex-direction: column; gap: .6rem; margin-top: .7rem; }
.vgd-aicard { display: flex; gap: .8rem; align-items: stretch; padding: .6rem; border: 1.5px solid var(--vgd-line); border-radius: 12px; background: #fff; }
.vgd-aipic { flex: 0 0 42%; display: flex; align-items: center; }
.vgd-schem { width: 100%; height: auto; display: block; }
.vgd-aiwhere { display: block; font-style: normal; font-size: .78rem; font-weight: 700; color: var(--vgd-accent); }
.vgd-zonefig { margin: .5rem 0 .75rem; }
.vgd-zonefig img { display: block; width: 100%; max-width: 100%; height: auto; background: #fff; border: 1px solid #d9dce1; border-radius: 10px; }
.vgd-zonefig figcaption { margin-top: .35rem; }
.vgd-aitext { display: flex; flex-direction: column; gap: .3rem; min-width: 0; justify-content: center; }
.vgd-aitext span { font-size: .82rem; color: var(--vgd-muted); }
.vgd-aitext .vgd-secondary { align-self: flex-start; margin-top: .2rem; }
.vgd-iconmodal { max-width: 560px; }
.vgd-iconpick .vgd-chips { margin: .6rem 0; }
.vgd-icongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: .4rem; }
.vgd-iconcell { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; min-height: 52px; padding: .7rem; border: 1.5px solid var(--vgd-line); border-radius: 10px; background: #fff; color: var(--vgd-accent); }
.vgd-iconcell svg { width: 100%; height: 100%; display: block; }
.vgd-iconcell:hover, .vgd-iconcell:focus-visible { border-color: var(--vgd-accent); background: var(--vgd-accent-soft); }
.vgd-bigadd { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: 1rem .5rem; border: 2px solid var(--vgd-accent); border-radius: var(--vgd-r); background: var(--vgd-accent-soft); color: var(--vgd-accent-d); text-align: center; min-height: 104px; justify-content: center; }
.vgd-bigadd:hover { background: #e4d9f2; }
.vgd-bigadd small { color: var(--vgd-muted); font-size: .75rem; line-height: 1.2; }
.vgd-file { display: none; }
.vgd-shapegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.vgd-shapegrid.is-small { grid-template-columns: repeat(7, 1fr); gap: .3rem; margin-bottom: .6rem; }
.vgd-shapebtn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px; padding: .4rem .2rem; border: 1.5px solid var(--vgd-line); border-radius: 10px; background: #fff; color: var(--vgd-accent); font-size: .68rem; font-weight: 600; justify-content: center; }
.vgd-shapegrid.is-small .vgd-shapebtn { min-height: 44px; }
.vgd-shapebtn.is-on, .vgd-shapebtn:hover { border-color: var(--vgd-accent); background: var(--vgd-accent-soft); }
.vgd-shapebtn span { color: var(--vgd-ink); }

.vgd-edit-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.vgd-edit-head strong { font-size: 1.05rem; }
.vgd-edit-actions { display: flex; gap: .1rem; }
.vgd-badge { margin: 0 0 .8rem; padding: .55rem .75rem; border-radius: 10px; font-size: .85rem; line-height: 1.35; display: flex; flex-direction: column; gap: 2px; border-left: 5px solid var(--vgd-line); background: var(--vgd-alt); }
.vgd-badge.is-cut { border-left-color: var(--vgd-good); background: #eaf6ef; }
.vgd-badge.is-print { border-left-color: #c47a00; background: #fff4e0; }
.vgd-badge.is-sheet { border-left-color: var(--vgd-accent); background: var(--vgd-accent-soft); }
.vgd-badge .vgd-link { align-self: flex-start; padding: 0; min-height: 32px; text-align: left; }
.vgd-field { display: block; margin: 0 0 .85rem; }
.vgd-flabel { display: block; font-size: .8rem; font-weight: 700; margin-bottom: .25rem; color: var(--vgd-ink); }
.vgd-fhelp { display: block; font-size: .75rem; color: var(--vgd-muted); margin-top: .2rem; }
.vgd-textarea { width: 100%; padding: .6em .8em; border: 2px solid var(--vgd-line); border-radius: 10px; resize: vertical; min-height: 64px; font-size: 1rem; }
.vgd-textarea:focus, .vgd-num:focus, .vgd-hex:focus { border-color: var(--vgd-accent); outline: none; }
.vgd-row { display: flex; gap: .5rem; align-items: stretch; margin-bottom: .85rem; flex-wrap: wrap; }
.vgd-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.vgd-fontbtn { flex: 1 1 140px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l i" "n i"; align-items: center; text-align: left; min-height: 48px; padding: .3rem .8rem; border: 2px solid var(--vgd-line); border-radius: 10px; background: #fff; }
.vgd-fontbtn small { grid-area: l; font-size: .68rem; color: var(--vgd-muted); line-height: 1; }
.vgd-fontbtn span:not(.vgd-ico) { grid-area: n; font-weight: 700; }
.vgd-fontbtn .vgd-ico { grid-area: i; }
.vgd-seg { display: inline-flex; border: 2px solid var(--vgd-line); border-radius: 999px; overflow: hidden; margin: 0 0 .85rem; background: #fff; }
.vgd-row .vgd-seg { margin: 0; }
.vgd-segb { min-height: 44px; padding: .2em 1em; border: 0; background: transparent; font-weight: 600; font-size: .85rem; display: inline-flex; align-items: center; gap: .3em; }
.vgd-segb + .vgd-segb { border-left: 1.5px solid var(--vgd-line); }
.vgd-segb.is-on { background: var(--vgd-accent); color: #fff; }
.vgd-numwrap { display: flex; align-items: center; gap: .3rem; }
.vgd-step { width: 44px; height: 44px; flex: 0 0 auto; border: 2px solid var(--vgd-line); border-radius: 50%; background: #fff; font-size: 1.3rem; line-height: 1; font-weight: 700; color: var(--vgd-accent); }
.vgd-step:active { background: var(--vgd-accent-soft); }
.vgd-num { width: 100%; min-width: 0; height: 44px; text-align: center; border: 2px solid var(--vgd-line); border-radius: 10px; font-size: 1rem; -moz-appearance: textfield; }
.vgd-num::-webkit-outer-spin-button, .vgd-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vgd-unit { font-size: .8rem; color: var(--vgd-muted); }
.vgd-rangewrap { display: flex; align-items: center; gap: .6rem; }
.vgd-range { flex: 1; min-width: 0; height: 44px; accent-color: var(--vgd-accent); }
.vgd-rangeout { min-width: 4em; text-align: right; font-size: .8rem; color: var(--vgd-muted); font-variant-numeric: tabular-nums; }
.vgd-btnrow { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; }
.vgd-btnrow .vgd-secondary { flex: 1 1 auto; padding-inline: .8em; min-height: 40px; }
.vgd-check, .vgd-radio { display: flex; align-items: flex-start; gap: .6rem; min-height: 44px; padding: .35rem 0; cursor: pointer; }
.vgd-check input, .vgd-radio input { width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--vgd-accent); flex: 0 0 auto; }
.vgd-radio small { display: block; color: var(--vgd-muted); font-size: .78rem; line-height: 1.3; }

/* colour */
.vgd-colstatus { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px; margin-bottom: .6rem; background: var(--vgd-alt); border-left: 5px solid var(--vgd-line); }
.vgd-colstatus.is-cut { border-left-color: var(--vgd-good); background: #eaf6ef; }
.vgd-colstatus.is-print { border-left-color: #c47a00; background: #fff4e0; }
.vgd-colstatus > div { flex: 1; min-width: 0; line-height: 1.25; }
.vgd-colstatus small { display: block; font-size: .75rem; color: var(--vgd-muted); }
.vgd-colchip { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); flex: 0 0 auto; }
.vgd-fam { margin: .9rem 0 .35rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--vgd-muted); }
.vgd-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.vgd-sw { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(0,0,0,.18); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.vgd-sw.is-on { border-color: var(--vgd-accent); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--vgd-accent); }
@media (pointer: coarse) { .vgd-sw { width: 44px; height: 44px; } .vgd-swatches { gap: 8px; } }
.vgd-custom { display: flex; gap: .6rem; align-items: center; }
.vgd-colorinput { width: 56px; height: 48px; padding: 2px; border: 2px solid var(--vgd-line); border-radius: 10px; background: #fff; }
.vgd-hex { flex: 1; height: 48px; padding: 0 .8em; border: 2px solid var(--vgd-line); border-radius: 10px; font-family: ui-monospace, Menlo, monospace; text-transform: lowercase; }
.vgd-logocols { display: flex; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; }
.vgd-logocol { width: 40px; height: 40px; border-radius: 10px; border: 2px solid rgba(0,0,0,.2); }
.vgd-logocol.is-on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--vgd-accent); }

/* layers */
.vgd-layers { list-style: none; margin: 0; padding: 0; }
.vgd-layer { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--vgd-line); border-radius: 10px; margin-bottom: .4rem; background: #fff; }
.vgd-layer.is-on { border-color: var(--vgd-accent); background: var(--vgd-accent-soft); }
.vgd-layer.is-hidden .vgd-lname { opacity: .45; text-decoration: line-through; }
.vgd-layer-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; min-height: 48px; padding: 0 .4rem 0 .7rem; border: 0; background: transparent; text-align: left; }
.vgd-layer .vgd-iconbtn { width: 38px; height: 44px; border-radius: 8px; }
.vgd-lname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: .9rem; }
.vgd-lswatch { width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto; border: 1.5px solid rgba(0,0,0,.2); }
.vgd-ltag { font-style: normal; font-size: .65rem; font-weight: 700; padding: .15em .6em; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; background: var(--vgd-alt); }
.vgd-ltag.is-vinyl { background: #d6efe0; color: var(--vgd-good); }
.vgd-ltag.is-print { background: #ffe8c2; color: #8a5200; }
.vgd-ltag.is-sheet { background: #e2d6f1; color: var(--vgd-accent-d); }
.vgd-backdrops { margin-top: .8rem; }

/* price */
.vgd-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; padding: .8rem 1rem; border-radius: var(--vgd-r); background: var(--vgd-accent); color: #fff; margin-bottom: .8rem; }
.vgd-total span { flex: 1 1 100%; font-size: .8rem; opacity: .85; }
.vgd-total strong { font-size: 2rem; line-height: 1; }
.vgd-total small { opacity: .8; }
.vgd-lines { list-style: none; margin: 0 0 .8rem; padding: 0; }
.vgd-lines li { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--vgd-line); }
.vgd-ltext { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .88rem; line-height: 1.3; }
.vgd-ltext small { color: var(--vgd-muted); font-size: .75rem; }
.vgd-lamt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vgd-lkind { width: 20px; height: 20px; border-radius: 4px; flex: 0 0 auto; background: var(--vgd-line); }
.vgd-lkind.is-print { background: repeating-linear-gradient(45deg, #f5a623 0 4px, #ffd58a 4px 8px); }
.vgd-lkind.is-sheet { background: var(--vgd-accent); }
.vgd-warns { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .4rem; }
.vgd-warns li { display: flex; gap: .5rem; padding: .5rem .7rem; border-radius: 10px; background: #fff4e0; font-size: .82rem; line-height: 1.35; }
.vgd-warns li.is-info { background: var(--vgd-alt); }
.vgd-warns .vgd-ico { color: var(--vgd-warn); flex: 0 0 auto; }

/* ---------------------------------------------------------------- overlays */
.vgd-toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 100010; max-width: min(92vw, 460px); padding: .7em 1.2em; border-radius: 12px; background: #222; color: #fff; font-size: .9rem; box-shadow: 0 6px 24px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
.vgd-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.vgd-toast.error { background: var(--vgd-bad); }
.vgd-modal-back { position: fixed; inset: 0; z-index: 100000; background: rgba(20,10,35,.55); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.vgd-modal { width: 100%; max-width: 520px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 40px rgba(0,0,0,.3); overflow: hidden; }
.vgd-modal.is-tall { height: 80vh; height: 80dvh; }
.vgd-modal-h { display: flex; align-items: center; justify-content: space-between; padding: .5rem .5rem .5rem 1.1rem; border-bottom: 1px solid var(--vgd-line); }
.vgd-modal-h h3 { margin: 0; font-size: 1.1rem; }
.vgd-modal-b { padding: 1rem 1.1rem; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.vgd-modal-b p { margin-top: 0; }
.vgd-modal-f { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; padding: .8rem 1.1rem calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--vgd-line); }
@media (min-width: 640px) { .vgd-modal-back { align-items: center; padding: 1rem; } .vgd-modal { border-radius: 18px; } }
.vgd-fontlist { margin-top: .6rem; }
.vgd-fontcat { margin: .9rem 0 .2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--vgd-muted); }
.vgd-fontrow { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: .5rem .8rem; margin-bottom: .3rem; border: 1.5px solid var(--vgd-line); border-radius: 10px; background: #fff; text-align: left; min-height: 56px; }
.vgd-fontrow.is-on { border-color: var(--vgd-accent); background: var(--vgd-accent-soft); }
.vgd-fontsample { font-size: 1.35rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vgd-fontrow small { color: var(--vgd-muted); font-size: .72rem; }
.vgd-spinner { width: 42px; height: 42px; margin: .5rem auto; border: 5px solid var(--vgd-accent-soft); border-top-color: var(--vgd-accent); border-radius: 50%; animation: vgd-spin .8s linear infinite; }
@keyframes vgd-spin { to { transform: rotate(360deg); } }
.vgd-app.is-busy .vgd-stage-wrap::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--vgd-accent), transparent); animation: vgd-bar 1s linear infinite; }
@keyframes vgd-bar { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .vgd-app * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- accounts: save button, saved designs, dialogs */
.vgd-savebtn.is-saved { color: var(--vgd-good); }
.vgd-savebtn:disabled { opacity: .35; }
.vgd-nameinput { min-height: 48px; resize: none; }
.vgd-modal.is-working .vgd-modal-b, .vgd-modal.is-working .vgd-modal-f { opacity: .5; pointer-events: none; }
.vgd-guestnote { margin: 0 0 1rem; font-size: .9rem; color: var(--vgd-muted); }
.vgd-guestnote a { color: var(--vgd-accent); font-weight: 600; }
.vgd-strip { margin: 0 0 1.2rem; padding: .8rem; border-radius: var(--vgd-r); background: var(--vgd-accent-soft); }
.vgd-strip-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .5rem; }
.vgd-strip-head h3 { margin: 0; font-size: 1rem; }
.vgd-strip-head a { font-size: .85rem; color: var(--vgd-accent); font-weight: 600; }
.vgd-strip-row { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.vgd-scard { flex: 0 0 168px; display: flex; flex-direction: column; text-align: left; padding: .5rem; border: 1.5px solid transparent; border-radius: 10px; background: #fff; }
.vgd-scard:hover:not(:disabled), .vgd-scard:focus-visible { border-color: var(--vgd-accent); }
.vgd-scard.is-gone { opacity: .55; }
.vgd-sthumb { display: block; aspect-ratio: 16 / 8; margin-bottom: .4rem; background: var(--vgd-alt); border-radius: 6px; overflow: hidden; }
.vgd-sthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vgd-scard strong { font-size: .88rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vgd-scard small { color: var(--vgd-muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vgd-modal-b a { color: var(--vgd-accent); font-weight: 600; }
