/* Viresta Size Charts — storefront. Uses Viresta Home's tokens when present, with fallbacks for other themes. */
.vsc-modal, .vsc-inline, .vsc-link, .vsc-float {
	--vsc-ink: var(--vh-ink, #0A0A0A);
	--vsc-ink-2: var(--vh-ink-2, #1A1A19);
	--vsc-paper: var(--vh-paper, #FAFAF7);
	--vsc-surface: var(--vh-surface, #F0EFEA);
	--vsc-line: var(--vh-hairline, #E2E1DC);
	--vsc-muted: var(--vh-muted, #6B6B66);
	--vsc-accent: var(--vh-accent, #FF4F00);
	--vsc-accent-text: var(--vh-accent-text, #C43D00);
	--vsc-scrim: var(--vh-scrim, rgba(10, 10, 10, .55));
	--vsc-display: "VH Display", "Archivo Narrow", "Arial Narrow", system-ui, sans-serif;
	--vsc-text: "VH Text", system-ui, -apple-system, "Segoe UI", sans-serif;
	--vsc-ok: #1F7A3A;
}
html.vsc-lock, html.vsc-lock body { overflow: hidden; }

/* ------------------------------------------------------------------ link */
.vsc-link {
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0 0 14px; padding: 0; border: 0; background: none; cursor: pointer;
	font: 600 13px/1.2 var(--vsc-text); letter-spacing: .02em; color: var(--vsc-ink);
	text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.vsc-link svg { width: 20px; height: 20px; flex: none; }
.vsc-link:hover, .vsc-link:focus-visible { color: var(--vsc-accent-text); }
.vsc-link:focus-visible { outline: 2px solid var(--vsc-accent); outline-offset: 3px; }
.vsc-link--auto { display: flex; }
.vsc-link--vh { margin: 4px 0 18px; }

.vsc-float {
	position: fixed; right: 0; top: 50%; z-index: 9990; transform: translateY(-50%) rotate(-90deg); transform-origin: 100% 100%;
	padding: 10px 16px; border: 0; background: var(--vsc-ink); color: var(--vsc-paper); cursor: pointer;
	font: 700 12px/1 var(--vsc-text); letter-spacing: .12em; text-transform: uppercase;
}

/* ----------------------------------------------------------------- modal */
.vsc-modal { position: fixed; inset: 0; z-index: 100000; display: flex; justify-content: flex-end; }
.vsc-modal[hidden] { display: none; }
.vsc-scrim { position: absolute; inset: 0; background: var(--vsc-scrim); opacity: 0; transition: opacity .22s ease; }
.vsc-sheet {
	position: relative; width: min(560px, 100%); height: 100%; background: var(--vsc-paper); color: var(--vsc-ink);
	display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
	box-shadow: -24px 0 60px rgba(0, 0, 0, .12);
}
.vsc-modal.is-open .vsc-scrim { opacity: 1; }
.vsc-modal.is-open .vsc-sheet { transform: none; }
.vsc-grab { display: none; }
.vsc-sheet-in { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }

@media (max-width: 767px) {
	.vsc-modal { align-items: flex-end; }
	.vsc-sheet { width: 100%; height: auto; max-height: 92vh; max-height: 92dvh; transform: translateY(100%); box-shadow: none; }
	.vsc-grab { display: block; height: 22px; flex: none; position: relative; cursor: grab; touch-action: none; }
	.vsc-grab::after { content: ""; position: absolute; left: 50%; top: 9px; width: 40px; height: 4px; margin-left: -20px; background: var(--vsc-line); }
}
@media (prefers-reduced-motion: reduce) { .vsc-sheet, .vsc-scrim { transition: none; } }

/* ---------------------------------------------------------- guide (both) */
.vsc-modal *, .vsc-inline * { box-sizing: border-box; }
.vsc-sheet-in, .vsc-inline-in { font: 400 14px/1.5 var(--vsc-text); color: var(--vsc-ink); }
.vsc-inline { margin: 24px 0; border: 1px solid var(--vsc-line); background: var(--vsc-paper); color: var(--vsc-ink); }

.vsc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 28px 28px 18px; }
@media (max-width: 767px) { .vsc-top { padding: 4px 20px 14px; } }
.vsc-eyebrow { margin: 0 0 6px; font: 700 11px/1 var(--vsc-text); letter-spacing: .16em; text-transform: uppercase; color: var(--vsc-accent-text); }
.vsc-title { margin: 0; font: 800 28px/1.02 var(--vsc-display); letter-spacing: -.01em; text-transform: uppercase; color: var(--vsc-ink); }
@media (max-width: 767px) { .vsc-title { font-size: 22px; } }
.vsc-x { flex: none; width: 40px; height: 40px; margin: -6px -8px 0 0; border: 0; background: none; color: var(--vsc-ink); cursor: pointer; display: grid; place-items: center; }
.vsc-x svg { width: 22px; height: 22px; }
.vsc-x:hover { color: var(--vsc-accent-text); }

.vsc-bar {
	position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
	padding: 0 28px; background: var(--vsc-paper); border-bottom: 1px solid var(--vsc-line);
}
@media (max-width: 767px) {
	.vsc-bar { padding: 0 20px; flex-direction: column-reverse; align-items: stretch; gap: 0; }
	.vsc-units { align-self: flex-end; margin: 0 0 4px; }
	.vsc-tabs { justify-content: space-between; gap: 12px; }
}
.vsc-tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.vsc-tabs::-webkit-scrollbar { display: none; }
.vsc-tab {
	position: relative; padding: 12px 0 13px; border: 0; background: none; cursor: pointer; white-space: nowrap;
	font: 700 12px/1 var(--vsc-text); letter-spacing: .1em; text-transform: uppercase; color: var(--vsc-muted);
}
.vsc-tab[aria-selected="true"] { color: var(--vsc-ink); }
.vsc-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--vsc-ink); }
.vsc-tab:hover { color: var(--vsc-ink); }
.vsc-units { display: flex; margin-bottom: 8px; border: 1px solid var(--vsc-ink); flex: none; }
.vsc-unit { min-width: 38px; padding: 6px 8px; border: 0; background: none; cursor: pointer; font: 700 11px/1 var(--vsc-text); letter-spacing: .08em; text-transform: uppercase; color: var(--vsc-ink); }
.vsc-unit[aria-pressed="true"] { background: var(--vsc-ink); color: var(--vsc-paper); }

.vsc-panel-body { padding: 22px 28px 28px; flex: 1; }
@media (max-width: 767px) { .vsc-panel-body { padding: 18px 20px 24px; } }
.vsc-intro { margin: 0 0 18px; color: var(--vsc-ink-2); }
.vsc-intro p { margin: 0 0 8px; }
.vsc-h3 { margin: 0 0 10px; font: 800 15px/1.2 var(--vsc-display); letter-spacing: .02em; text-transform: uppercase; }
.vsc-note, .vsc-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--vsc-muted); }
.vsc-warn { margin: 12px 0 0; font-size: 13px; color: var(--vsc-accent-text); font-weight: 600; }
.vsc-modal button:focus-visible, .vsc-inline button:focus-visible, .vsc-modal [tabindex="0"]:focus-visible, .vsc-inline [tabindex="0"]:focus-visible,
.vsc-modal select:focus-visible, .vsc-modal input:focus-visible, .vsc-inline select:focus-visible, .vsc-inline input:focus-visible { outline: 2px solid var(--vsc-accent); outline-offset: 2px; }

/* fit meter */
.vsc-fit { margin: 0 0 22px; padding: 14px 16px; background: var(--vsc-surface); }
.vsc-fit-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.vsc-fit-k { font: 700 11px/1 var(--vsc-text); letter-spacing: .14em; text-transform: uppercase; color: var(--vsc-muted); }
.vsc-fit-row strong { font: 800 15px/1 var(--vsc-display); text-transform: uppercase; }
.vsc-fit-track { position: relative; height: 2px; background: var(--vsc-line); margin: 8px 0; }
.vsc-fit-track i { position: absolute; top: -5px; width: 12px; height: 12px; margin-left: -6px; background: var(--vsc-accent); }
.vsc-fit-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--vsc-muted); }
.vsc-fit-note { margin: 8px 0 0; font-size: 12.5px; color: var(--vsc-ink-2); }
.vsc-fit-row + .vsc-fit-track + .vsc-fit-scale + .vsc-fit-note { border-top: 1px solid var(--vsc-line); padding-top: 10px; margin-top: 12px; }

/* tables */
.vsc-table { margin: 0 0 24px; }
.vsc-table:last-child { margin-bottom: 0; }
.vsc-scroll { overflow-x: auto; border: 1px solid var(--vsc-ink); -webkit-overflow-scrolling: touch; }
.vsc-scroll table { width: 100%; min-width: 100%; border-collapse: collapse; margin: 0; font-variant-numeric: tabular-nums; }
.vsc-scroll th, .vsc-scroll td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--vsc-line); text-align: center; white-space: nowrap; font-size: 14px; background: transparent; }
.vsc-scroll thead th {
	position: sticky; top: 0; background: var(--vsc-ink); color: var(--vsc-paper); border-bottom: 0;
	font: 700 11px/1.2 var(--vsc-text); letter-spacing: .1em; text-transform: uppercase;
}
.vsc-scroll thead th small { font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .7; }
.vsc-scroll thead th.is-mine { background: var(--vsc-accent); color: #fff; }
.vsc-scroll tbody th { font-weight: 700; position: sticky; left: 0; background: var(--vsc-paper); }
.vsc-scroll tbody tr:last-child > * { border-bottom: 0; }
.vsc-scroll tbody .is-mine { font-weight: 700; }
.vsc-scroll tbody tr.is-pick { cursor: pointer; }
.vsc-scroll tbody tr.is-pick:hover > * { background: var(--vsc-surface); }
.vsc-scroll .is-hover { background: var(--vsc-surface); }
.vsc-scroll thead .is-hover { background: var(--vsc-ink-2); }
.vsc-scroll tbody tr.is-on > *, .vsc-scroll tbody tr.is-on:hover > * { background: var(--vsc-ink); color: var(--vsc-paper); }
.vsc-scroll tbody tr.is-on > th::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 0; background: var(--vsc-accent); vertical-align: middle; }

/* footer (selected size) */
.vsc-foot {
	position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 28px calc(14px + env(safe-area-inset-bottom)); background: var(--vsc-paper); border-top: 1px solid var(--vsc-line);
}
.vsc-foot[hidden] { display: none; }
@media (max-width: 767px) { .vsc-foot { padding-left: 20px; padding-right: 20px; } }
.vsc-foot-msg { margin: 0; font-size: 13px; color: var(--vsc-muted); }
.vsc-foot-msg.is-ok { color: var(--vsc-ok); font-weight: 600; }
.vsc-foot .vsc-btn--go { width: 100%; }

.vsc-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid var(--vsc-ink);
	background: var(--vsc-paper); color: var(--vsc-ink); cursor: pointer; font: 700 12px/1 var(--vsc-text); letter-spacing: .12em; text-transform: uppercase;
}
.vsc-btn--go { background: var(--vsc-ink); color: var(--vsc-paper); }
.vsc-btn--go:hover { background: var(--vsc-ink-2); }
.vsc-btn:hover { border-color: var(--vsc-ink-2); }

/* find my size */
.vsc-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--vsc-ink); margin: 0 0 20px; }
.vsc-seg-b { min-height: 42px; padding: 8px 10px; border: 0; border-left: 1px solid var(--vsc-ink); background: none; cursor: pointer; font: 700 12px/1.2 var(--vsc-text); letter-spacing: .06em; text-transform: uppercase; color: var(--vsc-ink); }
.vsc-seg-b:first-child { border-left: 0; }
.vsc-seg-b[aria-pressed="true"] { background: var(--vsc-ink); color: var(--vsc-paper); }
.vsc-field { display: block; margin: 0 0 18px; }
.vsc-field > span:first-child { display: block; margin: 0 0 8px; font: 700 11px/1.2 var(--vsc-text); letter-spacing: .12em; text-transform: uppercase; color: var(--vsc-muted); }
.vsc-field .vsc-seg { margin: 0; }
.vsc-input-unit { display: flex; align-items: stretch; border: 1px solid var(--vsc-ink); max-width: 240px; }
.vsc-fu { min-width: 56px; border: 0; cursor: pointer; color: var(--vsc-ink); }
.vsc-fu:hover { background: var(--vsc-line); }
.vsc-input-unit b, .vsc-fu { display: grid; place-items: center; padding: 0 14px; background: var(--vsc-surface); font: 700 12px/1 var(--vsc-text); text-transform: uppercase; border-left: 1px solid var(--vsc-ink); }
.vsc-in {
	width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 0; background: #fff; color: var(--vsc-ink);
	font: 700 20px/1 var(--vsc-display); -moz-appearance: textfield; box-shadow: none;
}
.vsc-in::-webkit-outer-spin-button, .vsc-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select.vsc-in { border: 1px solid var(--vsc-ink); font: 600 14px/1 var(--vsc-text); appearance: auto; }
.vsc-grid3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .vsc-grid3 { grid-template-columns: 1fr 1fr; } .vsc-grid3 .vsc-field:first-child { grid-column: 1 / -1; } }

.vsc-result { margin-top: 6px; }
.vsc-rec { padding: 20px; background: var(--vsc-surface); border-left: 4px solid var(--vsc-accent); }
.vsc-rec.is-new { animation: vsc-in .25s ease; }
@keyframes vsc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vsc-rec-k { margin: 0; font: 700 11px/1 var(--vsc-text); letter-spacing: .14em; text-transform: uppercase; color: var(--vsc-muted); }
.vsc-rec-size { margin: 6px 0 4px; font: 800 44px/1 var(--vsc-display); text-transform: uppercase; letter-spacing: -.01em; }
.vsc-rec-alt { margin: 0; font-size: 13px; color: var(--vsc-ink-2); }
.vsc-rec .vsc-btn { width: 100%; margin-top: 18px; }
.vsc-scale { margin: 26px 0 6px; }
.vsc-scale-line { position: relative; height: 2px; background: var(--vsc-ink); }
.vsc-scale-line i { position: absolute; top: -7px; width: 2px; height: 16px; margin-left: -1px; background: var(--vsc-accent); }
.vsc-scale-line em { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font: 700 10px/1 var(--vsc-text); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--vsc-accent-text); white-space: nowrap; }
.vsc-scale-marks { position: relative; height: 22px; margin-top: 6px; }
.vsc-scale-marks span { position: absolute; transform: translateX(-50%); font: 700 12px/1 var(--vsc-text); color: var(--vsc-muted); }
.vsc-scale-marks span:first-child { transform: none; }
.vsc-scale-marks span:last-child:not(:first-child) { transform: translateX(-100%); }
.vsc-scale-marks span.is-pick { color: var(--vsc-ink); }
.vsc-scale-marks span::before { content: ""; position: absolute; left: 50%; top: -11px; width: 1px; height: 6px; background: var(--vsc-ink); }

/* measure */
.vsc-measure { display: grid; gap: 18px; }
.vsc-fig { margin: 0; background: var(--vsc-surface); padding: 16px; }
.vsc-fig img { display: block; width: 100%; height: auto; }
.vsc-fig--draw svg { display: block; width: 100%; max-width: 360px; margin: 0 auto; color: var(--vsc-ink); }
.vsc-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.vsc-steps li { position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid var(--vsc-line); counter-increment: s; }
.vsc-steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 11px; font: 800 18px/1 var(--vsc-display); color: var(--vsc-accent-text); }

/* bags */
.vsc-bagviz { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: center; margin: 0 0 20px; padding: 18px; background: var(--vsc-surface); }
@media (max-width: 520px) { .vsc-bagviz { grid-template-columns: 1fr; } }
.vsc-bagsvg { display: block; width: 100%; height: auto; color: var(--vsc-ink); overflow: visible; }
.vsc-front { fill: var(--vsc-paper); stroke: var(--vsc-ink); stroke-width: 1.6; }
.vsc-side { fill: var(--vsc-line); stroke: var(--vsc-ink); stroke-width: 1.2; }
.vsc-dim { stroke: var(--vsc-accent); stroke-width: 1.4; fill: none; }
.vsc-svg-t { font: 700 11px/1 var(--vsc-text); fill: var(--vsc-ink); }
.vsc-dims { margin: 0; display: grid; gap: 0; }
.vsc-dims > div { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--vsc-line); }
.vsc-dims > div:last-child { border-bottom: 0; }
.vsc-dims dt { font: 700 11px/1 var(--vsc-text); letter-spacing: .12em; text-transform: uppercase; color: var(--vsc-muted); }
.vsc-dims dd { margin: 0; font: 800 20px/1 var(--vsc-display); }
.vsc-dims dd small { font: 600 11px/1 var(--vsc-text); color: var(--vsc-muted); }

.vsc-fits { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--vsc-line); border: 1px solid var(--vsc-line); }
@media (max-width: 520px) { .vsc-fits { grid-template-columns: repeat(2, 1fr); } }
.vsc-fits li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; background: var(--vsc-paper); text-align: center; }
.vsc-fits svg { width: 72px; height: 56px; }
.vsc-mini-bag { fill: none; stroke: var(--vsc-ink); stroke-width: 1.2; }
.vsc-mini-item { fill: var(--vsc-ok); opacity: .85; }
.vsc-fit-tight .vsc-mini-item { fill: #B7791F; }
.vsc-fit-noFit .vsc-mini-item { fill: var(--vsc-accent); opacity: .55; }
.vsc-fit-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.vsc-chip { font: 700 10px/1 var(--vsc-text); letter-spacing: .1em; text-transform: uppercase; padding: 4px 6px; background: #E6F2EA; color: var(--vsc-ok); }
.vsc-fit-tight .vsc-chip { background: #FBF0DC; color: #8A5A10; }
.vsc-fit-noFit .vsc-chip { background: #FDE9DF; color: var(--vsc-accent-text); }
.vsc-fit-noFit .vsc-fit-name { color: var(--vsc-muted); }
