/* SBBN Card Studio
   Palette: cutting-mat green stage, white paper controls, and the four
   colours of a card printer ribbon (yellow, magenta, cyan, black). */

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(../fonts/figtree-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(../fonts/poppins-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(../fonts/poppins-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url(../fonts/montserrat-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url(../fonts/montserrat-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-display: swap; src: url(../fonts/playfair-display-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-display: swap; src: url(../fonts/playfair-display-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 400; font-display: swap; src: url(../fonts/roboto-slab-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 700; font-display: swap; src: url(../fonts/roboto-slab-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 400; font-display: swap; src: url(../fonts/caveat-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap; src: url(../fonts/caveat-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url(../fonts/bebas-neue-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Pacifico"; font-weight: 400; font-display: swap; src: url(../fonts/pacifico-latin-400-normal.woff2) format("woff2"); }

:root {
	--sbcs-mat: #1f5d50;
	--sbcs-mat-deep: #184a40;
	--sbcs-paper: #ffffff;
	--sbcs-wash: #f1f6f4;
	--sbcs-ink: #16302b;
	--sbcs-muted: #586b66;
	--sbcs-line: #d9e3df;
	--sbcs-magenta: #d81e6a;
	--sbcs-magenta-deep: #b41557;
	--sbcs-yellow: #ffc93c;
	--sbcs-cyan: #1aa7c9;
	--sbcs-ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--sbcs-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
}

html.sbcs-open, html.sbcs-open body { overflow: hidden !important; }

/* ------------------------------------------------------------------ *
 * Landing block (sits inside the theme's page)
 * ------------------------------------------------------------------ */

.sbcs-landing-wrap { container-type: inline-size; margin: 0 auto 32px; max-width: 1040px; }
.sbcs-landing {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: 24px;
	align-items: center;
	margin: 0;
	padding: clamp(24px, 5vw, 56px);
	border-radius: 24px;
	overflow: hidden;
	color: #fff;
	font-family: var(--sbcs-ui);
	background-color: var(--sbcs-mat);
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: 28px 28px;
	box-sizing: border-box;
}
.sbcs-landing *, .sbcs-landing *::before, .sbcs-landing *::after { box-sizing: border-box; }

.sbcs-landing .sbcs-landing__title {
	margin: 0 0 12px;
	padding: 0;
	font-family: var(--sbcs-display);
	font-size: clamp(34px, 6vw, 58px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	color: #fff;
	text-transform: none;
}
.sbcs-landing .sbcs-landing__lead {
	margin: 0 0 20px;
	max-width: 34ch;
	font-size: 18px;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.86);
}
.sbcs-landing .sbcs-landing__steps {
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
	counter-reset: sbcs-step;
	display: grid;
	gap: 10px;
}
.sbcs-landing .sbcs-landing__steps li {
	counter-increment: sbcs-step;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.35;
	color: #fff;
	list-style: none;
}
.sbcs-landing .sbcs-landing__steps li::before {
	content: counter(sbcs-step);
	flex: none;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--sbcs-yellow);
	color: var(--sbcs-ink);
	font-weight: 700;
	font-size: 14px;
}
.sbcs-landing .sbcs-landing__start {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	margin: 0;
	padding: 0 30px;
	border: 0;
	border-radius: 14px;
	background: var(--sbcs-magenta);
	color: #fff;
	font: 700 18px/1 var(--sbcs-ui);
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	box-shadow: 0 6px 0 var(--sbcs-magenta-deep);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sbcs-landing .sbcs-landing__start:hover { background: #e32a77; color: #fff; }
.sbcs-landing .sbcs-landing__start:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sbcs-magenta-deep); }
.sbcs-landing .sbcs-landing__start:focus-visible { outline: 3px solid var(--sbcs-yellow); outline-offset: 3px; }
.sbcs-landing .sbcs-landing__start[disabled] { opacity: 0.6; cursor: default; }
.sbcs-landing .sbcs-landing__note { margin: 14px 0 0; color: #fff; }

.sbcs-landing__art { position: relative; aspect-ratio: 1 / 0.82; min-width: 0; }
.sbcs-landing__card {
	position: absolute;
	left: 8%;
	top: 18%;
	width: 84%;
	aspect-ratio: 85.6 / 54;
	border-radius: 5.5% / 8.7%;
	background: #fff;
	box-shadow: 0 18px 30px rgba(8, 32, 27, 0.38);
}
.sbcs-landing__card--b { transform: rotate(9deg) translate(6%, 8%); background: var(--sbcs-yellow); }
.sbcs-landing__card--a { transform: rotate(-6deg); overflow: hidden; }
.sbcs-landing__photo {
	position: absolute; left: 8%; top: 16%; width: 30%; aspect-ratio: 3 / 4; border-radius: 10px;
	background:
		radial-gradient(circle at 50% 36%, #f3d2b8 0 21%, transparent 22%),
		radial-gradient(ellipse at 50% 108%, var(--sbcs-mat) 0 50%, transparent 51%),
		#cfe6ee;
}
.sbcs-landing__line { position: absolute; left: 46%; height: 9%; border-radius: 99px; background: var(--sbcs-ink); }
.sbcs-landing__line--1 { top: 26%; width: 42%; }
.sbcs-landing__line--2 { top: 44%; width: 28%; background: #b9c7c3; }
.sbcs-landing__ribbon { position: absolute; left: 0; right: 0; bottom: 0; height: 10%; display: flex; }
.sbcs-landing__ribbon i { flex: 1; }
.sbcs-landing__ribbon i:nth-child(1), .sbcs-ribbon i:nth-child(1) { background: var(--sbcs-yellow); }
.sbcs-landing__ribbon i:nth-child(2), .sbcs-ribbon i:nth-child(2) { background: var(--sbcs-magenta); }
.sbcs-landing__ribbon i:nth-child(3), .sbcs-ribbon i:nth-child(3) { background: var(--sbcs-cyan); }
.sbcs-landing__ribbon i:nth-child(4), .sbcs-ribbon i:nth-child(4) { background: #101614; }

/* Stack when the theme's content column is narrow, whatever the screen size. */
@container (max-width: 720px) {
	.sbcs-landing { grid-template-columns: 1fr; border-radius: 18px; padding: clamp(22px, 6cqi, 40px); }
	.sbcs-landing__art { order: -1; max-width: 320px; width: 100%; margin: 0 auto; aspect-ratio: 1 / 0.7; }
	.sbcs-landing .sbcs-landing__title { font-size: clamp(32px, 9cqi, 50px); }
	.sbcs-landing .sbcs-landing__start { width: 100%; }
}
@supports not (container-type: inline-size) {
	@media (max-width: 760px) {
		.sbcs-landing { grid-template-columns: 1fr; border-radius: 18px; }
		.sbcs-landing__art { order: -1; max-width: 320px; width: 100%; margin: 0 auto; aspect-ratio: 1 / 0.7; }
		.sbcs-landing .sbcs-landing__start { width: 100%; }
	}
}

/* ------------------------------------------------------------------ *
 * Studio shell (full screen, added to <body>)
 * ------------------------------------------------------------------ */

.sbcs {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	background: var(--sbcs-mat);
	color: var(--sbcs-ink);
	font: 400 15px/1.4 var(--sbcs-ui);
	text-align: left;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior: contain;
	touch-action: manipulation;
}
.sbcs, .sbcs *, .sbcs *::before, .sbcs *::after { box-sizing: border-box; }
.sbcs [hidden], .sbcs[hidden] { display: none !important; }

.sbcs button.sbcs-btn,
.sbcs input.sbcs-input,
.sbcs textarea.sbcs-input {
	all: unset;
	box-sizing: border-box;
	font-family: var(--sbcs-ui);
}
.sbcs button.sbcs-btn { cursor: pointer; user-select: none; -webkit-user-select: none; }
.sbcs button.sbcs-btn:focus-visible,
.sbcs .sbcs-swatch--pick:focus-within { outline: 3px solid var(--sbcs-cyan); outline-offset: 2px; }
.sbcs button.sbcs-btn[disabled] { opacity: 0.35; cursor: default; }
.sbcs .sbcs-ico { display: block; flex: none; }
.sbcs h3, .sbcs p { margin: 0; padding: 0; color: inherit; font-family: inherit; text-transform: none; letter-spacing: 0; }

/* ---- top bar ---- */

.sbcs-top {
	position: relative;
	flex: none;
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 8px 10px;
	padding-top: max(8px, env(safe-area-inset-top));
	background: var(--sbcs-paper);
}
.sbcs-top__gap { flex: 1; }

.sbcs button.sbcs-btn--icon {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	color: var(--sbcs-ink);
}
.sbcs button.sbcs-btn--icon:hover:not([disabled]) { background: var(--sbcs-wash); }

.sbcs button.sbcs-btn--quiet {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 12px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 15px;
	color: var(--sbcs-ink);
}
.sbcs button.sbcs-btn--quiet:hover { background: var(--sbcs-wash); }

.sbcs button.sbcs-btn--print {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 42px;
	margin-left: 4px;
	padding: 0 16px;
	border-radius: 12px;
	background: var(--sbcs-magenta);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
}
.sbcs button.sbcs-btn--print:hover:not([disabled]) { background: var(--sbcs-magenta-deep); }
.sbcs button.sbcs-btn--wide { display: flex; width: 100%; height: 52px; margin: 0; font-size: 17px; border-radius: 14px; }

.sbcs-menu {
	position: absolute;
	right: 10px;
	top: calc(100% - 2px);
	z-index: 5;
	min-width: 264px;
	padding: 6px;
	border-radius: 14px;
	background: var(--sbcs-paper);
	box-shadow: 0 14px 34px rgba(8, 32, 27, 0.3), 0 0 0 1px var(--sbcs-line);
}
.sbcs button.sbcs-menu__item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px;
	border-radius: 10px;
	font-size: 15px;
	color: var(--sbcs-ink);
}
.sbcs button.sbcs-menu__item:hover { background: var(--sbcs-wash); }

.sbcs-ribbon { flex: none; display: flex; height: 4px; }
.sbcs-ribbon i { flex: 1; }

/* ---- body ---- */

.sbcs-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.sbcs-stage {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background-color: var(--sbcs-mat);
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
	background-size: 24px 24px;
	background-position: center;
}
.sbcs-stage__fit { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.sbcs-canvas { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
.sbcs-canvas .canvas-container { position: absolute !important; left: 0; top: 0; }

.sbcs-paper, .sbcs-card { position: absolute; border-radius: var(--sbcs-r, 12px); pointer-events: none; }
.sbcs-paper { background: #fff; box-shadow: 0 2px 0 rgba(8, 32, 27, 0.25), 0 16px 34px rgba(8, 32, 27, 0.42); }
.sbcs-card { overflow: hidden; }

.sbcs-guide { position: absolute; opacity: 0; transition: opacity 0.12s ease; }
.sbcs-guide--safe { inset: var(--sbcs-safe, 10px); border: 1.5px dashed rgba(26, 167, 201, 0.9); border-radius: calc(var(--sbcs-r, 12px) * 0.6); }
.sbcs-card.is-moving .sbcs-guide--safe { opacity: 1; }
.sbcs-guide--v { left: 50%; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--sbcs-magenta); }
.sbcs-guide--h { top: 50%; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--sbcs-magenta); }
.sbcs-guide.is-on { opacity: 1; }

.sbcs-empty {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 12px;
	text-align: center;
	color: var(--sbcs-muted);
}
.sbcs-empty strong { font: 700 clamp(18px, 5vw, 26px)/1.1 var(--sbcs-display); color: var(--sbcs-ink); }
.sbcs-empty span { font-size: 14px; }

.sbcs-stagebar {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0 12px 10px;
}
.sbcs-stagebar__size { font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.sbcs button.sbcs-btn--chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 12px 0 10px;
	border-radius: 99px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}
.sbcs button.sbcs-btn--chip:hover { background: rgba(255, 255, 255, 0.22); }
.sbcs button.sbcs-btn--chip .sbcs-ico { width: 18px; height: 18px; }

/* ---- selection bar ---- */

.sbcs-ctx {
	flex: none;
	display: flex;
	align-items: stretch;
	gap: 2px;
	padding: 6px 8px;
	overflow-x: auto;
	background: var(--sbcs-ink);
	scrollbar-width: none;
}
.sbcs-ctx::-webkit-scrollbar { display: none; }
.sbcs button.sbcs-ctx__btn {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	min-width: 58px;
	padding: 6px 8px;
	border-radius: 10px;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
}
.sbcs button.sbcs-ctx__btn:hover { background: rgba(255, 255, 255, 0.12); }
.sbcs button.sbcs-ctx__btn .sbcs-ico { width: 20px; height: 20px; }
.sbcs-ctx__sep { flex: none; width: 1px; margin: 6px 4px; background: rgba(255, 255, 255, 0.22); }

/* ---- tool sheet ---- */

.sbcs-sheet {
	flex: none;
	display: flex;
	flex-direction: column;
	max-height: 46%;
	background: var(--sbcs-paper);
	border-bottom: 1px solid var(--sbcs-line);
}
.sbcs-sheet__head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 4px 16px; }
.sbcs .sbcs-sheet__title { font: 700 18px/1.2 var(--sbcs-display); }
.sbcs button.sbcs-btn--done { height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 700; color: var(--sbcs-magenta); }
.sbcs button.sbcs-btn--done:hover { background: var(--sbcs-wash); }
.sbcs-sheet__body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 16px 16px; display: grid; gap: 14px; align-content: start; -webkit-overflow-scrolling: touch; }

.sbcs-field { display: grid; gap: 6px; min-width: 0; }
.sbcs-field > span:first-child { font-size: 13px; font-weight: 600; color: var(--sbcs-muted); }
.sbcs-field--range { grid-template-columns: 118px 1fr; align-items: center; gap: 10px; }

.sbcs input.sbcs-input, .sbcs textarea.sbcs-input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--sbcs-wash);
	box-shadow: inset 0 0 0 1.5px var(--sbcs-line);
	color: var(--sbcs-ink);
	font-size: 16px; /* 16px stops iPhones zooming the page on focus */
	line-height: 1.3;
	cursor: text;
}
.sbcs textarea.sbcs-input--area { resize: none; white-space: pre-wrap; overflow-wrap: break-word; }
.sbcs input.sbcs-input:focus, .sbcs textarea.sbcs-input:focus { box-shadow: inset 0 0 0 2px var(--sbcs-cyan); background: #fff; }
.sbcs input.sbcs-input.is-bad { box-shadow: inset 0 0 0 2px var(--sbcs-magenta); }
.sbcs input.sbcs-input::placeholder { color: #93a39f; }
.sbcs input.sbcs-input--code { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sbcs input.sbcs-input--code::placeholder { font-weight: 500; }

.sbcs-phone { display: flex; align-items: stretch; gap: 8px; }
.sbcs-phone b { flex: none; display: grid; place-items: center; padding: 0 12px; border-radius: 12px; background: var(--sbcs-ink); color: #fff; font-weight: 600; font-size: 16px; }

.sbcs-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px 2px; margin: 0 -16px 0 -2px; scrollbar-width: none; }
.sbcs-chips::-webkit-scrollbar { display: none; }
.sbcs button.sbcs-chip {
	flex: none;
	height: 40px;
	padding: 0 14px;
	border-radius: 99px;
	background: var(--sbcs-wash);
	box-shadow: inset 0 0 0 1.5px var(--sbcs-line);
	font-size: 15px;
	white-space: nowrap;
	color: var(--sbcs-ink);
}
.sbcs button.sbcs-chip.is-on, .sbcs button.sbcs-toggle.is-on { background: var(--sbcs-ink); box-shadow: none; color: #fff; }

.sbcs-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sbcs button.sbcs-swatch, .sbcs .sbcs-swatch--pick {
	position: relative;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: inset 0 0 0 1.5px rgba(22, 48, 43, 0.2);
}
.sbcs button.sbcs-swatch--wide { width: 62px; border-radius: 12px; }
.sbcs button.sbcs-swatch.is-on { box-shadow: 0 0 0 2.5px var(--sbcs-paper), 0 0 0 5px var(--sbcs-ink); }
.sbcs .sbcs-swatch--pick { display: block; overflow: hidden; cursor: pointer; background: conic-gradient(#e8452c, #ffc93c, #2e9e5b, #1aa7c9, #1f4fbf, #6b3fa0, #d81e6a, #e8452c); }
.sbcs .sbcs-swatch--pick input { position: absolute; inset: -8px; width: 60px; height: 60px; opacity: 0; cursor: pointer; padding: 0; border: 0; }

.sbcs-row { display: flex; align-items: center; gap: 8px; }
.sbcs-row__gap { flex: 1; }
.sbcs button.sbcs-toggle {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--sbcs-wash);
	box-shadow: inset 0 0 0 1.5px var(--sbcs-line);
	font-size: 18px;
	color: var(--sbcs-ink);
}
.sbcs button.sbcs-toggle b { font-weight: 800; }
.sbcs button.sbcs-toggle i { font-style: italic; font-family: Georgia, serif; }

.sbcs button.sbcs-btn--line {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 46px;
	border-radius: 12px;
	box-shadow: inset 0 0 0 1.5px var(--sbcs-ink);
	font-weight: 600;
	color: var(--sbcs-ink);
}
.sbcs button.sbcs-btn--line:hover { background: var(--sbcs-wash); }

.sbcs-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.sbcs button.sbcs-shape { display: grid; place-items: center; height: 64px; border-radius: 14px; background: var(--sbcs-wash); box-shadow: inset 0 0 0 1.5px var(--sbcs-line); color: var(--sbcs-ink); }
.sbcs button.sbcs-shape:hover { background: #e4eeea; }

.sbcs .sbcs-note { font-size: 13.5px; line-height: 1.45; color: var(--sbcs-muted); }
.sbcs .sbcs-note--center { text-align: center; }
.sbcs a.sbcs-link { color: var(--sbcs-magenta); font-weight: 600; text-decoration: underline; }

/* range slider */
.sbcs input.sbcs-range { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.sbcs input.sbcs-range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: var(--sbcs-line); }
.sbcs input.sbcs-range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--sbcs-line); }
.sbcs input.sbcs-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--sbcs-ink); border: 4px solid #fff; box-shadow: 0 1px 4px rgba(8, 32, 27, 0.4); }
.sbcs input.sbcs-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--sbcs-ink); border: 4px solid #fff; box-shadow: 0 1px 4px rgba(8, 32, 27, 0.4); }
.sbcs input.sbcs-range:focus-visible { outline: 3px solid var(--sbcs-cyan); outline-offset: 2px; border-radius: 8px; }

/* ---- dock ---- */

.sbcs-dock {
	flex: none;
	display: flex;
	justify-content: space-around;
	gap: 2px;
	padding: 6px 6px max(6px, env(safe-area-inset-bottom));
	background: var(--sbcs-paper);
}
.sbcs button.sbcs-dock__btn {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	max-width: 110px;
	padding: 8px 2px 7px;
	border-radius: 12px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--sbcs-ink);
}
.sbcs button.sbcs-dock__btn:hover { background: var(--sbcs-wash); }
.sbcs button.sbcs-dock__btn.is-on { background: var(--sbcs-wash); }
.sbcs button.sbcs-dock__btn.is-on::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 2px; height: 3px; border-radius: 99px; background: var(--sbcs-magenta); }

/* ---- toast ---- */

.sbcs-toast {
	position: absolute;
	left: 50%;
	top: 70px;
	z-index: 8;
	transform: translateX(-50%);
	max-width: min(92%, 420px);
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--sbcs-ink);
	color: #fff;
	font-size: 14.5px;
	font-weight: 500;
	text-align: center;
	box-shadow: 0 10px 26px rgba(8, 32, 27, 0.4);
}

/* ---- print sheet ---- */

.sbcs-modal { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.sbcs-modal__scrim { position: absolute; inset: 0; background: rgba(8, 26, 22, 0.62); }
.sbcs-modal__box {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: 96%;
	overflow-y: auto;
	padding: 16px 18px max(18px, env(safe-area-inset-bottom));
	border-radius: 22px 22px 0 0;
	background: var(--sbcs-paper);
	animation: sbcs-rise 0.22s ease-out;
}
@keyframes sbcs-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.sbcs-print { display: grid; gap: 12px; }
.sbcs-print__head { display: flex; align-items: center; justify-content: space-between; margin-right: -8px; }
.sbcs .sbcs-print__head h3, .sbcs .sbcs-done h3 { font: 700 24px/1.1 var(--sbcs-display); }
.sbcs-print__preview { display: grid; place-items: center; padding: 14px; border-radius: 16px; background: var(--sbcs-mat); }
.sbcs-print__thumb { width: min(100%, 250px); aspect-ratio: 1006 / 640; border-radius: 9px; background: #fff center / cover no-repeat; box-shadow: 0 8px 18px rgba(8, 32, 27, 0.45); }
.is-portrait > .sbcs-print__thumb { width: auto; height: 190px; aspect-ratio: 640 / 1006; }
.sbcs .sbcs-error { padding: 10px 12px; border-radius: 10px; background: #fde8f0; color: #8d0f43; font-size: 14.5px; font-weight: 600; }

.sbcs-confirm { display: grid; gap: 12px; padding-top: 6px; }
.sbcs .sbcs-confirm h3 { font: 700 22px/1.15 var(--sbcs-display); }
.sbcs .sbcs-confirm .sbcs-note { font-size: 15px; margin-bottom: 4px; }
.sbcs-progress { display: grid; justify-items: center; gap: 18px; padding: 26px 0 30px; }
.sbcs-progress__card { position: relative; overflow: hidden; border-radius: 10px; box-shadow: 0 10px 22px rgba(8, 32, 27, 0.35); }
.sbcs-progress__card .sbcs-print__thumb { width: 250px; box-shadow: none; border-radius: 0; }
.sbcs-progress__card.is-portrait .sbcs-print__thumb { width: auto; height: 210px; }
.sbcs-progress__pass { position: absolute; top: 0; bottom: 0; left: 0; width: 34%; mix-blend-mode: multiply; animation: sbcs-pass 3.2s linear infinite; }
@keyframes sbcs-pass {
	0% { transform: translateX(-100%); background: var(--sbcs-yellow); }
	24.9% { transform: translateX(300%); background: var(--sbcs-yellow); }
	25% { transform: translateX(-100%); background: var(--sbcs-magenta); }
	49.9% { transform: translateX(300%); background: var(--sbcs-magenta); }
	50% { transform: translateX(-100%); background: var(--sbcs-cyan); }
	74.9% { transform: translateX(300%); background: var(--sbcs-cyan); }
	75% { transform: translateX(-100%); background: #39423f; }
	100% { transform: translateX(300%); background: #39423f; }
}
.sbcs .sbcs-progress__text { font-weight: 600; font-size: 16px; }

.sbcs-done { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 16px 0 4px; }
.sbcs-done__tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #2e9e5b; color: #fff; }
.sbcs-done__tick .sbcs-ico { width: 34px; height: 34px; stroke-width: 2.4; }
.sbcs .sbcs-done__order { font-size: 17px; }
.sbcs .sbcs-done__msg { max-width: 30ch; color: var(--sbcs-muted); margin-bottom: 6px; }

/* ------------------------------------------------------------------ *
 * Wide screens: tools on the left, card on the right
 * ------------------------------------------------------------------ */

@media (min-width: 900px) {
	.sbcs-top { padding: 10px 16px; }
	.sbcs-body { display: grid; grid-template-columns: 96px auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
	.sbcs-dock { grid-column: 1; grid-row: 1 / 3; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 12px 8px; border-right: 1px solid var(--sbcs-line); }
	.sbcs button.sbcs-dock__btn { flex: none; max-width: none; padding: 12px 2px 10px; }
	.sbcs button.sbcs-dock__btn.is-on::after { left: 0; right: auto; top: 22%; bottom: 22%; width: 3px; height: auto; }
	.sbcs-sheet { grid-column: 2; grid-row: 1 / 3; width: 348px; max-height: none; border-bottom: 0; border-right: 1px solid var(--sbcs-line); }
	.sbcs-stage { grid-column: 3; grid-row: 1; }
	.sbcs-ctx { grid-column: 3; grid-row: 2; justify-content: center; }
	.sbcs-modal { align-items: center; }
	.sbcs-modal__box { border-radius: 22px; }
	.sbcs-toast { top: 78px; }
}

@media (max-width: 380px) {
	.sbcs button.sbcs-btn--icon { width: 38px; height: 40px; }
	.sbcs button.sbcs-btn--quiet { padding: 0 8px; }
	.sbcs button.sbcs-btn--print { padding: 0 12px; }
	.sbcs-field--range { grid-template-columns: 96px 1fr; }
	.sbcs-stagebar__size { display: none; }
}

/* Phones: give the card the room while a tool panel is open. */
@media (max-width: 899px) {
	.sbcs[data-panel] .sbcs-stagebar { display: none; }
}
@media (max-width: 899px) and (max-height: 720px) {
	.sbcs[data-panel] .sbcs-ctx { display: none; }
	.sbcs-print__preview { padding: 10px; }
	.sbcs-print__thumb { width: min(100%, 150px); }
	.is-portrait > .sbcs-print__thumb { height: 118px; }
	.sbcs-print { gap: 9px; }
	.sbcs .sbcs-note--center { display: none; }
}

@media (max-height: 520px) and (max-width: 899px) {
	.sbcs-stagebar { display: none; }
	.sbcs-sheet { max-height: 56%; }
}

@media (prefers-reduced-motion: reduce) {
	.sbcs-modal__box { animation: none; }
	.sbcs-progress__pass { animation: none; display: none; }
	.sbcs-landing .sbcs-landing__start { transition: none; }
}
