/*
 * Booth Builder page (BOOTH-4). Tokens from the Claude Design export in
 * docs/booth-builder/design/ (BuildTiles, PhoneSheet), which uses tightent.shop's own:
 * blue #00366F, accent #298DFF, CTA green #30D935, LINE green #06C755, Prompt.
 * Every element toggled with [hidden] that sets display has its own [hidden] rule (gotcha 33).
 */
.bb {
	--bb-blue: #00366F;
	--bb-accent: #298DFF;
	--bb-ink: #1f2937;
	--bb-text: #4b5563;
	--bb-muted: #6b7280;
	--bb-bg: #f4f6f9;
	--bb-line: #d9dee6;
	--bb-rule: #e5e9ef;
	--bb-rule-soft: #eef1f5;
	--bb-chip: #f1f4f8;
	--bb-thumb: #E9EEF5;
	--bb-cta: #30D935;
	--bb-cta-ink: #0b2a12;
	--bb-line-green: #06C755;
	--bb-float: rgba(255, 255, 255, .94);
	--bb-float-shadow: 0 2px 8px rgba(0, 0, 0, .08);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	block-size: 100vh;
	block-size: 100dvh;
	overflow: hidden;
	background: var(--bb-bg);
	color: var(--bb-ink);
	font-family: 'Prompt', system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}
.bb *, .bb *::before, .bb *::after { box-sizing: inherit; }
.bb [hidden] { display: none !important; }
:where(.bb) button { font: inherit; color: inherit; }   /* zero specificity: every component sets its own size */
.bb button:disabled { cursor: default; opacity: .45; }
.bb h2, .bb h3 { margin: 0; }
.bb .bb-narrow, .bb .bb-land { display: none; }   /* .bb-land: landscape phone only */

/* ---------------------------------------------------------------- header */
.bb-head {
	flex: 0 0 64px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 32px;
	background: #fff;
	border-block-end: 1px solid var(--bb-rule);
}
.bb-head__brand, .bb-head__actions { display: flex; align-items: center; gap: 10px; }
.bb-head__logo { font-weight: 700; font-size: 18px; letter-spacing: .04em; color: var(--bb-blue); }
.bb-head__rule { inline-size: 1px; block-size: 24px; margin: 0 8px; background: var(--bb-rule); }
.bb-head__title { font-size: 15px; font-weight: 600; }
.bb-head__state { font-size: 13px; color: var(--bb-muted); }
.bb-btn {
	block-size: 36px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1px solid var(--bb-line);
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}
.bb-btn:not(:disabled):hover { border-color: var(--bb-accent); }
.bb-btn--lg { block-size: 44px; padding: 0 16px; border-radius: 10px; font-weight: 600; }
.bb-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 40px;
	block-size: 40px;
	border-radius: 9px;
	border: 1px solid var(--bb-line);
	background: #fff;
	cursor: pointer;
}
.bb-icon--float { inline-size: 36px; block-size: 36px; border: 0; background: var(--bb-float); box-shadow: var(--bb-float-shadow); }

/* ---------------------------------------------------------------- scene + aside */
.bb-main {
	flex: 1 1 auto;
	min-block-size: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 440px;
	gap: 16px;
	padding: 16px 32px 0;
}
.bb-stage {
	position: relative;
	min-block-size: 0;
	border-radius: 14px;
	overflow: hidden;
	background: #eaf4fb;
	border: 1px solid var(--bb-line);
}
.bb-scene {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
}
.bb-stage__tl, .bb-stage__tr { position: absolute; z-index: 3; top: 14px; display: flex; gap: 8px; align-items: center; }
/* the front view (v2b): view only, its own svg over the stage; the view toggle and full screen stay on top */
.bb-front { position: absolute; inset: 0; z-index: 2; background: #e6e7e9; }
.bb-front__svg { display: block; inline-size: 100%; block-size: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in; }
.bb-front__load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 14px; border-radius: 10px; background: var(--bb-float); box-shadow: var(--bb-float-shadow); font-size: 13px; font-weight: 500; color: var(--bb-text); pointer-events: none; }
.bb-front__edit { position: absolute; z-index: 3; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; background: var(--bb-float); box-shadow: var(--bb-float-shadow); border-color: var(--bb-blue); color: var(--bb-blue); }
.bb.is-front .bb-bgseg, .bb.is-front .bb-stage__tl [data-act="floor"], .bb.is-front .bb-stage__tl .bb-state, .bb.is-front .bb-stage__tr [data-act="reset"],
.bb.is-front .bb-stage__tr [data-act="help"], .bb.is-front .bb-stage__tr [data-act="undo"], .bb.is-front .bb-stage > [data-act="floor"], .bb.is-front .bb-hint,
.bb.is-front .bb-tools, .bb.is-front .bb-pos, .bb.is-front .bb-q__ro { display: none !important; }
.bb-q__view { position: absolute; z-index: 3; right: 14px; top: 14px; }
.bb-stage__tl { left: 14px; }
.bb-stage__tr { right: 14px; gap: 6px; }
.bb-seg { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bb-float); box-shadow: var(--bb-float-shadow); }
.bb-seg button {
	block-size: 32px;
	padding: 0 12px;
	border-radius: 7px;
	border: 0;
	background: transparent;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.bb-seg button[aria-pressed="true"] { background: var(--bb-blue); color: #fff; }
.bb-chip-float {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	block-size: 40px;
	padding: 0 12px;
	border-radius: 10px;
	background: var(--bb-float);
	box-shadow: var(--bb-float-shadow);
	font-size: 13px;
	font-weight: 600;
}
.bb-chip-float { border: 0; cursor: pointer; }
.bb-chip-float[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--bb-accent), var(--bb-float-shadow); }
.bb-pop {
	position: absolute;
	z-index: 4;
	left: 14px;
	top: 64px;
	inline-size: 264px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--bb-line);
	box-shadow: 0 10px 30px rgba(0, 54, 111, .14);
}
.bb-pop__title { font-size: 13px; font-weight: 700; color: var(--bb-blue); }
.bb-pop__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bb-pop__grid button {
	block-size: 36px;
	border-radius: 8px;
	border: 1px solid var(--bb-line);
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}
.bb-pop__grid button:hover { border-color: var(--bb-accent); }
.bb-pop__grid button[aria-pressed="true"] { background: var(--bb-blue); border-color: var(--bb-blue); color: #fff; font-weight: 600; }
.bb-pop__custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bb-pop__custom label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--bb-muted); }
.bb-pop__custom input {
	block-size: 36px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid var(--bb-line);
	font: inherit;
	font-size: 14px;
	color: var(--bb-ink);
}
.bb-pop__custom input:focus { outline: 0; border-color: var(--bb-accent); }
.bb-tools {
	position: absolute;
	z-index: 3;
	display: flex;
	gap: 2px;
	padding: 4px;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(0, 54, 111, .16), 0 0 0 1px var(--bb-rule);
}
.bb-tools button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 36px;
	block-size: 36px;
	border-radius: 7px;
	border: 0;
	background: transparent;
	color: var(--bb-ink);
	cursor: pointer;
}
.bb-tools button:hover { background: var(--bb-chip); color: var(--bb-blue); }
.bb-tools [data-act="remove"]:hover { color: #b3202b; }
.bb-pos {
	position: absolute;
	z-index: 3;
	padding: 4px 9px;
	border-radius: 7px;
	background: var(--bb-blue);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	pointer-events: none;
	font-variant-numeric: tabular-nums;
}
.bb-hint {
	position: absolute;
	z-index: 1;
	left: 14px;
	bottom: 14px;
	padding: 7px 11px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .92);
	font-size: 12px;
	color: var(--bb-text);
	pointer-events: none;
}

.bb-side {
	display: flex;
	flex-direction: column;
	min-block-size: 0;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--bb-line);
	overflow: hidden;
}
.bb-side__handle { display: none; }
.bb-side__head, .bb-chips { flex: 0 0 auto; }
.bb-side__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 10px;
	border-block-end: 1px solid var(--bb-rule-soft);
}
.bb-side__head h2 { font-size: 15px; font-weight: 700; color: var(--bb-blue); }
.bb-search {
	display: flex;
	align-items: center;
	gap: 8px;
	inline-size: 180px;
	block-size: 34px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid var(--bb-line);
	color: var(--bb-muted);
}
.bb-search:focus-within { border-color: var(--bb-accent); }
.bb-search input {
	flex: 1;
	min-inline-size: 0;
	border: 0;
	outline: 0;
	padding: 0;
	background: transparent;
	font: inherit;
	font-size: 13px;
	color: var(--bb-ink);
}
.bb-chips {
	display: flex;
	flex-wrap: wrap;   /* a computer: every category on view, two rows if need be - a mouse cannot swipe a hidden one in (owner, 23 Oct) */
	gap: 6px;
	padding: 10px 16px;
	border-block-end: 1px solid var(--bb-rule-soft);
}
.bb-chip {
	flex: 0 0 auto;
	padding: 5px 10px;
	border-radius: 999px;
	border: 0;
	background: var(--bb-chip);
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}
.bb-chip[aria-pressed="true"] { background: var(--bb-blue); color: #fff; font-weight: 600; }
.bb-list {
	position: relative;
	flex: 1 1 auto;
	min-block-size: 0;
	overflow-y: auto;
	padding: 12px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.bb-group { display: flex; flex-direction: column; gap: 8px; }
.bb-group h3 { font-size: 12px; font-weight: 600; color: var(--bb-muted); letter-spacing: .04em; text-transform: uppercase; }
.bb-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bb-tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 10px;
	border-radius: 10px;
	border: 1px solid var(--bb-line);
	background: #fff;
	text-align: start;
	cursor: pointer;
}
.bb-tile:hover { border-color: var(--bb-accent); }
.bb-tile:active { transform: scale(.98); }
.bb-tile__thumb {
	position: relative;
	display: block;
	inline-size: 100%;
	block-size: 64px;
	border-radius: 6px;
	background: var(--bb-thumb);
	overflow: hidden;
}
.bb-tile__thumb img {
	position: absolute;
	inset: 4px;
	inline-size: calc(100% - 8px);
	block-size: calc(100% - 8px);
	object-fit: contain;
}
.bb-tile__name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.bb-tile__tag { font-size: 12px; line-height: 1.4; color: var(--bb-muted); }
.bb-tile__price { font-size: 12px; color: var(--bb-text); }
.bb-lead {
	padding: 2px 7px;
	border-radius: 999px;
	background: #EEF6EA;
	color: #1e5a2e;
	font-size: 12px;
	font-weight: 600;
}
.bb-lead--slow { background: #FFF4E0; color: #7a4b00; }
.bb-empty { margin: 0; font-size: 13px; color: var(--bb-muted); }
.bb-tiles--presets { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.bb-preset {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--bb-line);
	background: #fff;
	text-align: start;
	cursor: pointer;
}
.bb-preset:hover { border-color: var(--bb-accent); }
.bb-preset__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bb-preset__top strong { font-size: 14px; font-weight: 600; color: var(--bb-blue); }
.bb-preset__price { font-size: 13px; font-weight: 700; color: var(--bb-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bb-preset__tag { font-size: 12px; color: var(--bb-text); }
.bb-preset__meta { font-size: 12px; color: var(--bb-muted); }
.bb-preset__confirm { display: none; font-size: 12px; font-weight: 600; color: #9b1c1c; }
.bb-preset.is-confirm { border-color: #9b1c1c; background: #FDF1F1; }
.bb-preset.is-confirm .bb-preset__confirm { display: block; }

/* ---------------------------------------------------------------- option panel (BOOTH-4 run 2) */
.bb-browse, .bb-panel { flex: 1 1 auto; min-block-size: 0; display: flex; flex-direction: column; }
.bb-panel__head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-block-end: 1px solid var(--bb-rule-soft);
}
.bb-panel__head .bb-icon { flex: 0 0 34px; inline-size: 34px; block-size: 34px; border-radius: 8px; }
.bb-panel__head div { min-inline-size: 0; }
.bb-panel__head h2 { font-size: 15px; font-weight: 700; color: var(--bb-blue); line-height: 1.35; }
.bb-panel__head h2 span { font-weight: 500; }
.bb-panel__head p { margin: 0; font-size: 12px; color: var(--bb-muted); }
.bb-panel__body {
	flex: 1 1 auto;
	min-block-size: 0;
	overflow-y: auto;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.bb-panel__none { margin: 0; font-size: 13px; color: var(--bb-text); }
.bb-opt { display: flex; flex-direction: column; gap: 8px; }
.bb-opt__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bb-opt h3 { font-size: 12px; font-weight: 600; color: var(--bb-muted); letter-spacing: .04em; text-transform: uppercase; }
.bb-opt__head span { font-size: 12px; color: var(--bb-muted); }
.bb-opt h4 { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--bb-text); }
.bb-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.bb-pick {
	block-size: 34px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid var(--bb-line);
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}
.bb-pick:hover { border-color: var(--bb-accent); }
.bb-pick[aria-pressed="true"] { border: 2px solid var(--bb-blue); padding: 0 11px; background: #F3F7FC; color: var(--bb-blue); font-weight: 700; }
.bb-pick--wide { align-self: flex-start; }
.bb-seg2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 10px; background: var(--bb-chip); }
.bb-seg2 button {
	min-block-size: 40px;
	padding: 4px 8px;
	border-radius: 8px;
	border: 0;
	background: transparent;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}
.bb-seg2 button span { font-weight: 400; color: var(--bb-muted); }
.bb-seg2 button[aria-pressed="true"] { background: #fff; color: var(--bb-blue); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .10); }
.bb-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.bb-swatch { inline-size: 34px; block-size: 34px; border-radius: 50%; border: 2px solid var(--bb-line); padding: 0; cursor: pointer; }
.bb-swatch[aria-pressed="true"] { border-color: #fff; outline: 3px solid var(--bb-accent); }
.bb-plan { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; align-items: start; }
.bb-plan__dia { position: sticky; top: 0; }
.bb-plan__dia svg { display: block; }
.bb-roof { display: grid; gap: 4px; font-size: 12px; }
.bb-roof .bb-pick { block-size: auto; min-block-size: 32px; padding: 5px 8px; border-radius: 6px; font-size: 12px; line-height: 1.35; text-align: start; }
.bb-roof .bb-pick span { color: var(--bb-muted); }
.bb-roof .bb-pick[aria-pressed="true"] span { color: inherit; }
.bb-opt__hint { margin: 6px 0 0; font-size: 12px; color: var(--bb-muted); }
.bb-rows { display: flex; flex-direction: column; gap: 6px; }
.bb-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-block-size: 44px;
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid var(--bb-line);
	font-size: 13px;
}
.bb-row em { font-style: normal; font-size: 12px; color: var(--bb-muted); }
.bb-legflag { display: flex; flex-direction: column; gap: 8px; margin: -2px 0 4px; padding: 10px; border-radius: 8px; background: var(--bb-soft, #f4f6f9); }
.bb-legflag h4 { margin: 2px 0 0; }
.bb-row__end { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.bb-row__price { color: var(--bb-text); white-space: nowrap; }
.bb-step { display: inline-flex; align-items: center; gap: 8px; }
.bb-step strong { min-inline-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.bb-step button, .bb-add {
	inline-size: 28px;
	block-size: 28px;
	border-radius: 6px;
	border: 1px solid var(--bb-line);
	background: #fff;
	cursor: pointer;
}
.bb-step button { font-size: 16px; font-weight: 600; line-height: 1; color: var(--bb-blue); }
.bb-add { inline-size: auto; padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--bb-blue); }
.bb-step button:not(:disabled):hover, .bb-add:hover { border-color: var(--bb-accent); }
.bb-rush {
	display: flex;
	align-items: center;
	gap: 12px;
	min-block-size: 48px;
	padding: 8px 12px;
	border-radius: 10px;
	border: 1px solid var(--bb-line);
	background: #fff;
	font-size: 13px;
	text-align: start;
	cursor: pointer;
}
.bb-rush:hover { border-color: var(--bb-accent); }
.bb-rush b { font-weight: 600; }
.bb-rush b span { font-weight: 400; color: var(--bb-muted); }
.bb-rush__switch { position: relative; flex: 0 0 36px; block-size: 20px; border-radius: 999px; background: var(--bb-line); transition: background .15s; }
.bb-rush__switch::after { content: ""; position: absolute; inset-block-start: 2px; inset-inline-start: 2px; inline-size: 16px; block-size: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.bb-rush[aria-pressed="true"] { border-color: var(--bb-blue); background: #F3F7FC; }
.bb-rush[aria-pressed="true"] .bb-rush__switch { background: var(--bb-blue); }
.bb-rush[aria-pressed="true"] .bb-rush__switch::after { transform: translateX(16px); }
.bb-break__rush { font-style: normal; color: #7a4b00; }
.bb-panel__foot {
	flex: 0 0 auto;
	display: flex;
	gap: 6px;
	padding: 10px 16px;
	border-block-start: 1px solid var(--bb-rule-soft);
}
.bb-panel__foot button {
	flex: 1;
	block-size: 36px;
	border-radius: 8px;
	border: 0;
	background: #F3F7FC;
	color: var(--bb-blue);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.bb-panel__foot .bb-danger { background: #FDF1F1; color: #9b1c1c; }
.bb-cta.bb-cta--done { background: var(--bb-blue); color: #fff; }

/* ---------------------------------------------------------------- bar */
.bb-bar {
	flex: 0 0 76px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin: 12px 32px 16px;
	padding: 0 20px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--bb-line);
	box-shadow: 0 10px 30px rgba(0, 54, 111, .10);
}
.bb-bar__sum { display: flex; align-items: center; gap: 28px; min-inline-size: 0; }
.bb-bar__total { display: flex; flex-direction: column; gap: 2px; }
.bb-bar__count { font-size: 12px; color: var(--bb-muted); }
.bb-bar__price { font-size: 24px; font-weight: 700; color: var(--bb-blue); line-height: 1.1; }
.bb-bar__excl { font-size: 13px; font-weight: 500; color: var(--bb-muted); }
.bb-bar__rule { inline-size: 1px; block-size: 40px; background: var(--bb-rule); }
.bb-bar__lead { font-size: 13px; color: var(--bb-text); }
.bb-bar__lead:empty { display: none; }
.bb-bar__actions { display: flex; align-items: center; gap: 10px; }
.bb-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	block-size: 44px;
	padding: 0 22px;
	border-radius: 10px;
	border: 0;
	background: var(--bb-cta);
	color: var(--bb-cta-ink);
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}
.bb-cta--line { background: var(--bb-line-green); color: #fff; }

/* ---------------------------------------------------------------- price bar and breakdown (BOOTH-4 run 3) */
.bb-bar__total {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 4px 8px;
	margin: -4px -8px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	text-align: start;
	cursor: pointer;
}
.bb-bar__total:not(:disabled):hover, .bb-bar__total[aria-expanded="true"] { background: var(--bb-chip); }
.bb-bar__total:disabled { opacity: 1; cursor: default; }
.bb-bar__num { transition: opacity .15s; }
.bb.is-pricing .bb-bar__num { opacity: .45; }
.bb-bar__lead { display: flex; flex-direction: column; gap: 2px; }
.bb-bar__lead strong { color: var(--bb-ink); font-weight: 600; }
.bb-bar__lead1 { font-size: 12px; color: var(--bb-text); }
.bb-bar__note { font-size: 12px; color: var(--bb-muted); }
.bb-bar__note.is-bad { color: #9b1c1c; }
.bb-bar__note:empty { display: none; }
.bb-panel__head p b { color: var(--bb-ink); font-weight: 600; }
.bb-panel__head .bb-panel__tag { color: var(--bb-text); }
.bb-break {
	position: fixed;
	z-index: 5;
	left: 32px;
	bottom: 104px;
	inline-size: min(520px, calc(100vw - 64px));
	max-block-size: min(70vh, 640px);
	display: flex;
	flex-direction: column;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--bb-line);
	box-shadow: 0 18px 40px rgba(0, 54, 111, .18);
	overflow: hidden;
}
.bb-break__head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-block-end: 1px solid var(--bb-rule-soft); }
.bb-break__head h2 { font-size: 15px; font-weight: 700; color: var(--bb-blue); }
.bb-break__head .bb-icon { inline-size: 34px; block-size: 34px; font-size: 20px; line-height: 1; }
.bb-break__list { flex: 1 1 auto; min-block-size: 0; overflow-y: auto; margin: 0; padding: 6px 8px; list-style: none; }
.bb-break__row {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	gap: 10px;
	inline-size: 100%;
	padding: 10px 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	text-align: start;
	font-size: 13px;
	cursor: pointer;
}
.bb-break__row:hover { background: var(--bb-chip); }
.bb-break__list li + li .bb-break__row { border-block-start: 1px solid var(--bb-rule-soft); border-radius: 0 0 8px 8px; }
.bb-break__n { color: var(--bb-muted); font-variant-numeric: tabular-nums; }
.bb-break__what { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.bb-break__what strong { font-weight: 600; }
.bb-break__what span { font-size: 12px; color: var(--bb-text); }
.bb-break__what b { font-weight: 600; color: var(--bb-ink); }
.bb-break__lead { color: var(--bb-muted) !important; }
.bb-break__err { color: #9b1c1c !important; }
.bb-break__row.is-bad .bb-break__price { color: #9b1c1c; }
.bb-break__price { font-weight: 700; color: var(--bb-blue); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bb-break__foot { flex: 0 0 auto; display: flex; align-items: baseline; justify-content: space-between; padding: 12px 16px 4px; border-block-start: 1px solid var(--bb-rule); font-size: 13px; color: var(--bb-muted); }
.bb-break__foot strong { font-size: 20px; font-weight: 700; color: var(--bb-blue); }
.bb-break__note { margin: 0; padding: 0 16px 14px; font-size: 12px; color: var(--bb-muted); }

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1100px) {
	.bb-head, .bb-main { padding-inline: 16px; }
	.bb-main { grid-template-columns: minmax(0, 1fr) 340px; }
	.bb-bar { margin-inline: 16px; }
	.bb-search { inline-size: 140px; }
}

/* ---------------------------------------------------------------- phone, portrait: scene on top, sheet below
   (the same query as PORTRAIT in booth-ui.js; a phone on its side is design mode, below) */
@media (max-width: 760px) and (min-height: 501px) {
	.bb .bb-wide { display: none; }
	.bb .bb-narrow { display: revert; }
	.bb-head { flex-basis: 56px; padding: 0 16px; }
	.bb-head__logo, .bb-head__rule, .bb-head__state { display: none; }
	.bb-head__brand { gap: 8px; }
	.bb-head__brand svg { inline-size: 22px; block-size: 17px; }
	.bb-head__title { font-size: 15px; font-weight: 700; color: var(--bb-blue); }
	.bb-head__actions { gap: 6px; }
	.bb-head .bb-btn { block-size: 40px; padding: 0 12px; }
	.bb-main { display: flex; flex-direction: column; gap: 0; padding: 0; }
	.bb-stage { flex: 0 0 var(--bb-stage-h, 300px); border: 0; border-radius: 0; }   /* booth-ui.js sizes it to the content */
	.bb-stage__tl, .bb-stage__tr { top: 10px; }
	.bb-stage__tl { left: 10px; }
	.bb-stage__tr { right: 10px; }
	.bb-seg { padding: 3px; border-radius: 9px; }
	.bb-seg button { block-size: 30px; padding: 0 10px; font-size: 12px; }
	.bb-chip-float { block-size: 30px; padding: 0 10px; border-radius: 8px; font-size: 12px; }
	.bb-chip-float.bb-narrow { display: inline-flex; }
	.bb-pop { left: auto; right: 10px; top: 48px; }
	.bb-tools button { inline-size: 40px; block-size: 40px; }
	.bb-hint { left: 10px; bottom: 24px; padding: 5px 9px; border-radius: 7px; font-size: 12px; }
	.bb-side {
		position: relative;
		z-index: 2;
		flex: 1 1 auto;
		margin-block-start: -14px;
		padding-block-end: 84px;
		border: 0;
		border-radius: 18px 18px 0 0;
		box-shadow: 0 -8px 30px rgba(0, 54, 111, .12);
	}
	.bb-side__handle { display: block; align-self: center; inline-size: 40px; block-size: 5px; margin: 8px 0 4px; border-radius: 999px; background: var(--bb-line); }
	.bb-side__head { padding: 4px 16px 10px; border: 0; }
	.bb-search { inline-size: 36px; block-size: 36px; padding: 0; justify-content: center; color: var(--bb-ink); }   /* no width transition: Thai typed while it grew from 0 landed before the previous letter (audit, 24 Oct) */
	.bb-search input { flex: 0 0 0; inline-size: 0; }
	.bb-search:focus-within { inline-size: 200px; padding: 0 10px; justify-content: flex-start; }
	.bb-search:focus-within input { flex: 1; }
	.bb-chips { padding: 0 16px 10px; border: 0; }
	.bb-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); }
	.bb-chips::-webkit-scrollbar { display: none; }
	.bb-chips:hover { scrollbar-width: thin; }
	.bb-chips:hover::-webkit-scrollbar { display: block; block-size: 4px; }
	.bb-chips:hover::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--bb-line); }
	.bb-chip { padding: 7px 12px; }
	.bb-list { padding: 0 16px 16px; }
	.bb-tiles { gap: 10px; }
	.bb-tile__thumb { block-size: 70px; }
	.bb-bar {
		position: fixed;
		z-index: 3;
		left: 0;
		right: 0;
		bottom: 0;
		block-size: 84px;
		margin: 0;
		padding: 12px 16px;
		gap: 12px;
		border: 0;
		border-block-start: 1px solid var(--bb-rule);
		border-radius: 0;
		box-shadow: 0 -6px 20px rgba(0, 54, 111, .10);
	}
	.bb-bar__count { font-size: 12px; }
	.bb-bar__price { font-size: 20px; }
	.bb-cta { block-size: 48px; padding: 0 16px; gap: 8px; font-size: 14px; }
	.bb-cta.bb-narrow, .bb-icon.bb-narrow { display: inline-flex; }
	.bb-panel__head { padding: 6px 16px 10px; }
	.bb-panel__head .bb-icon { flex-basis: 40px; inline-size: 40px; block-size: 40px; }
	.bb-panel__body { padding: 12px 16px 16px; gap: 14px; }
	.bb-pick { block-size: 40px; padding: 0 14px; font-size: 14px; }
	.bb-pick[aria-pressed="true"] { padding: 0 13px; }
	.bb-seg2 button { min-block-size: 44px; font-size: 14px; }
	.bb-swatches { justify-content: space-between; }
	.bb-swatch { inline-size: 44px; block-size: 44px; }
	.bb-roof .bb-pick { min-block-size: 40px; }
	.bb-step button, .bb-add { inline-size: 36px; block-size: 36px; }
	.bb-add { inline-size: auto; }
	.bb-panel__foot { display: none; }
	.bb-bar__total { gap: 1px; }
	.bb-bar__total .bb-narrow { display: inline; }
	.bb-bar__note { position: absolute; left: 16px; top: -26px; padding: 2px 8px; border-radius: 6px; background: #fff; box-shadow: var(--bb-float-shadow); font-size: 12px; }
	.bb-break { left: 0; right: 0; bottom: 84px; inline-size: auto; max-block-size: 70vh; border-radius: 18px 18px 0 0; border: 0; box-shadow: 0 -8px 30px rgba(0, 54, 111, .18); }
}

/* ---------------------------------------------------------------- phone, landscape: design mode (design frame 7)
   No header: scene left, the list or the panel in a 290 px card right, a 56 px bar below. */
@media (max-height: 500px) and (orientation: landscape) {
	.bb-head { display: none; }
	.bb .bb-icon.bb-land { display: inline-flex; }   /* the header's Start over, on the scene */
	.bb-main { grid-template-columns: minmax(0, 1fr) 290px; gap: 8px; padding: 8px 8px 0; }
	.bb-stage { border-radius: 12px; }
	.bb-stage__tl, .bb-stage__tr { top: 8px; }
	.bb-stage__tl { left: 8px; }
	.bb-stage__tr { right: 8px; }
	.bb-seg { padding: 3px; border-radius: 9px; }
	.bb-seg button { block-size: 30px; padding: 0 10px; font-size: 12px; }
	.bb-chip-float { block-size: 36px; padding: 0 10px; font-size: 12px; }
	.bb-icon--float { inline-size: 36px; block-size: 36px; }
	.bb-pop { left: 8px; top: 52px; }
	.bb-hint { display: none; }
	.bb-tools button { inline-size: 40px; block-size: 40px; }
	.bb-side { border-radius: 12px; }
	.bb-side__head { padding: 10px 12px 8px; }
	.bb-side__head h2 { font-size: 14px; }
	.bb-search { inline-size: 110px; block-size: 32px; }
	.bb-chips { padding: 8px 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 20px), transparent); }
	.bb-list { padding: 10px 12px 12px; gap: 12px; }
	.bb-tile { padding: 8px; }
	.bb-tile__thumb { block-size: 52px; }
	.bb-tile__tag { display: none; }
	.bb-panel__head { padding: 8px 12px; }
	.bb-panel__body { padding: 10px 12px; gap: 12px; }
	.bb-panel__foot { padding: 8px 12px; }
	.bb-bar { flex-basis: 56px; gap: 12px; margin: 8px; padding: 0 8px 0 14px; border-radius: 12px; }
	.bb-bar__sum { gap: 16px; }
	.bb-bar__total { flex-direction: row; align-items: center; gap: 10px; }
	.bb-bar__count { order: 2; font-size: 12px; }
	.bb-bar__price { font-size: 20px; }
	.bb-bar__excl { display: none; }
	.bb-bar__rule { block-size: 24px; }
	.bb-bar__lead { font-size: 12px; }
	.bb-bar__lead strong { font-weight: 500; }
	.bb-bar__lead span + span { display: none; }
	.bb-bar__actions [data-act="copy"], .bb-bar__actions [data-act="send"] { display: none; }
	.bb .bb-cta.bb-narrow { display: inline-flex; }
	.bb-cta { block-size: 40px; padding: 0 16px; font-size: 14px; }
	.bb-break { left: 8px; bottom: 72px; inline-size: min(480px, calc(100vw - 16px)); max-block-size: calc(100dvh - 88px); }
}

/* ---------------------------------------------------------------- toolbar docked to the scene's foot: the hint gives way */
.bb.is-docked .bb-hint { display: none; }
/* no clear place for the floating bar on a phone: the panel's footer carries the same actions */
.bb.is-toolless .bb-panel__foot { display: flex; }

/* ---------------------------------------------------------------- toast (shared scene notes, BOOTH-5) */
.bb-toast {
	position: fixed;
	z-index: 11;   /* above the send dialog (9) and the rotate hint (10): "Message copied" is said from inside it */
	left: 50%;
	bottom: 112px;
	transform: translateX(-50%);
	max-inline-size: min(560px, calc(100vw - 32px));
	padding: 10px 16px;
	border-radius: 10px;
	background: var(--bb-blue);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 10px 30px rgba(0, 54, 111, .25);
	pointer-events: none;
}
@media (max-width: 760px) and (min-height: 501px) { .bb-toast { bottom: 100px; } }
@media (max-height: 500px) and (orientation: landscape) { .bb-toast { bottom: 76px; } }

/* ---------------------------------------------------------------- "Send to our team" (design frame 8, BOOTH-5) */
.bb-send {
	position: fixed;
	z-index: 9;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(17, 24, 39, .45);
}
.bb-send__card {
	inline-size: min(760px, 100%);
	max-block-size: calc(100dvh - 48px);
	overflow-y: auto;
	padding: 28px 32px 32px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.bb-send__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-block-end: 20px; }
.bb-send__head h2 { font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--bb-blue); }
.bb-send__head p { margin: 4px 0 0; font-size: 14px; color: var(--bb-text); }
.bb-send__head .bb-icon { flex: 0 0 36px; inline-size: 36px; block-size: 36px; font-size: 22px; line-height: 1; }
.bb-send__body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.bb-send__qr {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 18px;
	border-radius: 12px;
	border: 1px solid var(--bb-line);
	background: #f8fafc;
}
.bb-send__qr svg { display: block; inline-size: 220px; block-size: 220px; background: #fff; }
.bb-send__qr figcaption { font-size: 12px; color: var(--bb-muted); }
.bb-send__side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-inline-size: 0; }
.bb-send__side h3 { margin-block-start: 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bb-muted); }
.bb-send__row { display: flex; gap: 8px; inline-size: 100%; }
.bb-send__link {
	flex: 1;
	min-inline-size: 0;
	display: flex;
	align-items: center;
	block-size: 44px;
	padding: 0 14px;
	border-radius: 10px;
	border: 1px solid var(--bb-line);
	background: #f8fafc;
	color: var(--bb-blue);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.bb-send__copy { border-color: var(--bb-blue); color: var(--bb-blue); }
.bb-send__msg {
	inline-size: 100%;
	margin: 0;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--bb-line);
	background: #f8fafc;
	font: inherit;
	font-size: 13px;
	line-height: 1.55;
	color: var(--bb-ink);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.bb-send__note { margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; background: #FFF6D6; color: #6b4d00; font-size: 12px; }
@media (max-width: 760px) {
	.bb-send { padding: 12px; }
	.bb-send__card { padding: 20px; }
	.bb-send__body { grid-template-columns: minmax(0, 1fr); }
	.bb-send__qr { display: none; }   /* a phone does not scan its own screen */
}

/* ---------------------------------------------------------------- rotate hint (design frame 6), portrait phone, once */
.bb-rot, .bb-big {
	position: fixed;
	z-index: 10;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(17, 24, 39, .45);
}
.bb-rot__card {
	inline-size: min(342px, 100%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 24px 24px 20px;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
	text-align: center;
}
.bb-rot__card h2 { font-size: 19px; font-weight: 700; line-height: 1.35; color: var(--bb-blue); }
.bb-rot__card p { margin: 0 0 4px; font-size: 14px; color: var(--bb-text); }
.bb-rot__ok {
	inline-size: 100%;
	block-size: 48px;
	border: 0;
	border-radius: 10px;
	background: var(--bb-blue);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
/* Start over and Help on the scene carry their words (owner, 23 Oct); undo and fit stay icons. Phones: icons, named by aria-label. */
.bb .bb-icon--float.bb-labelled { inline-size: auto; gap: 6px; padding: 0 12px 0 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
@media (max-width: 760px), (max-height: 500px) {
	.bb .bb-icon--float.bb-labelled { inline-size: 36px; padding: 0; }
	.bb-labelled__text { display: none; }
}
.bb-picks--col { flex-direction: column; align-items: stretch; }
.bb-picks--col .bb-pick { text-align: start; }
.bb-clear { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--bb-accent); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bb-big .bb-btn { inline-size: 100%; block-size: 44px; justify-content: center; }
.bb-big { z-index: 350; }   /* over the site header on the page, under the cookie card */
.bb-rot__keep { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bb-muted); cursor: pointer; }
.bb-rot__keep input { inline-size: 18px; block-size: 18px; margin: 0; accent-color: var(--bb-blue); }

/* ---------------------------------------------------------------- quotation view (design frame 9, BOOTH-5) */
.bb.bb-quote { display: block; block-size: auto; min-block-size: 100dvh; overflow: visible; }
.bb-q__top {
	display: flex;
	align-items: center;
	gap: 10px;
	block-size: 64px;
	padding: 0 48px;
	background: #fff;
	border-block-end: 1px solid var(--bb-rule);
}
.bb-q__chat { margin-inline-start: auto; block-size: 40px; padding: 0 18px; font-size: 14px; text-decoration: none; }
.bb-q { max-inline-size: 1440px; margin: 0 auto; padding: 28px 48px 48px; }
.bb-q__intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-block-end: 20px; }
.bb-q__chip { display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; background: #E8F1FB; color: var(--bb-blue); font-size: 12px; font-weight: 500; }
.bb-q__chip strong { font-weight: 700; }
.bb-q h1 { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.3; color: var(--bb-blue); }
.bb-q__intro p { margin: 4px 0 0; font-size: 14px; color: var(--bb-text); }
.bb-q__intro .bb-q__note { margin-block-start: 8px; padding: 6px 10px; border-radius: 8px; background: #FFF6D6; color: #6b4d00; font-size: 13px; }
.bb-q__actions { flex: 0 0 auto; display: flex; gap: 10px; }
.bb-q__edit { display: inline-flex; align-items: center; gap: 8px; border-color: var(--bb-blue); color: var(--bb-blue); }
.bb-q__stage {
	position: relative;
	block-size: min(58vh, 560px);
	border-radius: 14px;
	overflow: hidden;
	background: #eaf4fb;
	border: 1px solid var(--bb-line);
}
.bb-q .bb-q__scene { touch-action: auto; }   /* read-only: a finger on it scrolls the page */
.bb-q__ro { position: absolute; left: 14px; top: 14px; padding: 5px 10px; border-radius: 8px; background: var(--bb-float); box-shadow: var(--bb-float-shadow); font-size: 12px; font-weight: 600; pointer-events: none; }
.bb-q__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; margin-block-start: 20px; }
.bb-q__table { inline-size: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--bb-line); border-radius: 14px; background: #fff; overflow: hidden; font-size: 14px; }
.bb-q__table th { padding: 12px 16px; border-block-end: 1px solid var(--bb-rule); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bb-muted); text-align: start; }
.bb-q__table td { padding: 14px 16px; vertical-align: top; }
.bb-q__table tbody tr + tr td { border-block-start: 1px solid var(--bb-rule-soft); }
.bb-q__table td strong { display: block; font-weight: 600; color: var(--bb-ink); }
.bb-q__table td strong { overflow-wrap: break-word; }
.bb-q__qty { font-style: normal; font-weight: 700; color: var(--bb-blue); white-space: nowrap; }
.bb-q__table td span { display: block; margin-block-start: 2px; font-size: 13px; color: var(--bb-text); }
.bb-q__n { inline-size: 40px; color: var(--bb-muted); }
.bb-q__lead { white-space: nowrap; color: var(--bb-text); }
.bb-q .bb-q__price { text-align: end; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.bb-q__side { display: flex; flex-direction: column; gap: 16px; }
.bb-q__total { padding: 22px; border-radius: 14px; background: var(--bb-blue); color: #fff; }
.bb-q__total h2, .bb-q__next h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.bb-q__total > strong { display: block; margin-block-start: 6px; font-size: 36px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bb-q__total p { margin: 6px 0 0; padding-block-end: 14px; border-block-end: 1px solid rgba(255, 255, 255, .2); font-size: 13px; opacity: .85; }
.bb-q__total ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.bb-q__next { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--bb-line); background: #fff; }
.bb-q__next h2 { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--bb-ink); }
.bb-q__next ol { margin: 10px 0 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--bb-text); }
@media (max-width: 1100px) {
	.bb-q__top { padding: 0 16px; }
	.bb-q { padding: 20px 16px 32px; }
	.bb-q__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.bb-q__top { block-size: 56px; }
	.bb-q__intro { flex-direction: column; align-items: stretch; }
	.bb-q h1 { font-size: 24px; }
	.bb-q__actions { flex-direction: column-reverse; }
	.bb-q__actions > * { justify-content: center; }
	.bb-q__stage { block-size: 280px; }
	.bb-q__table thead { display: none; }
	.bb-q__table, .bb-q__table tbody, .bb-q__table tr { display: block; }
	.bb-q__table tr { display: grid; grid-template-columns: 24px minmax(0, 1fr) max-content; column-gap: 14px; padding: 12px 14px; }
	.bb-q__table td { padding: 0; }
	.bb-q__table tbody tr + tr { border-block-start: 1px solid var(--bb-rule-soft); }
	.bb-q__table tbody tr + tr td { border: 0; }
	.bb-q__lead { grid-column: 2; grid-row: 2; margin-block-start: 4px; font-size: 12px; }
	.bb-q .bb-q__price { grid-column: 3; grid-row: 1; }
	.bb-q__total > strong { font-size: 30px; }
}

/* ---------------------------------------------------------------- the site page (BOOTH-6h-fix): no builder header.
   Start over and Help join undo/fit on the scene (as landscape design mode); the layout's state sits under the toggle.
   Last in the file: these must win over the layout queries above, at equal specificity. */
.bb .bb-state, .bb .bb-pg { display: none; }
.bb--page .bb-head { display: none; }
.bb--page .bb-stage__tl { display: grid; grid-template-columns: auto auto; justify-content: start; justify-items: start; }
.bb--page .bb-state { display: inline-flex; grid-column: 1 / -1; }
.bb--page .bb-icon.bb-land, .bb--page .bb-icon.bb-pg { display: inline-flex; }
.bb-state { padding: 4px 10px; border-radius: 8px; background: var(--bb-float); box-shadow: var(--bb-float-shadow); font-size: 12px; color: var(--bb-muted); white-space: nowrap; }
@media (max-width: 760px) and (min-height: 501px) {
	.bb--page .bb-stage__tr.bb-wide { display: flex; flex-direction: column; top: 48px; }   /* under the floor chip */
	.bb--page .bb-icon--float, .bb--page .bb-icon--float.bb-labelled { inline-size: 34px; block-size: 34px; }
}

/* The page on a computer or tablet (owner, 23 Oct): the site's own width, not the viewport's. 1440 px centred,
   a scene of about 62vh (520-760 px), a 420 px product column with two tile columns, the price bar in the same box.
   Phones keep their own layouts (the queries above), so this is fenced off from both. */
@media (min-width: 761px) and (min-height: 501px) {
	.bb--page { block-size: auto; max-inline-size: 1440px; margin-inline: auto; overflow: visible; background: transparent; }
	.bb--page .bb-main { flex: none; block-size: clamp(520px, 62vh, 760px); }
	.bb--page .bb-bar { flex: none; block-size: 76px; }
	div.bb-mount { min-block-size: calc(clamp(520px, 62vh, 760px) + 200px); }   /* strip + scene + bar: nothing below jumps when it mounts */
}
@media (min-width: 1024px) and (min-height: 501px) {
	.bb--page .bb-main { grid-template-columns: minmax(0, 1fr) 420px; }
}

/* How it works (BOOTH-6i): a strip above the page's builder, and the same three steps in the help dialog */
.bb-how { display: flex; align-items: center; gap: 24px; margin: 16px 32px 0; padding: 14px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--bb-line); }
.bb-how__title { flex: 0 0 auto; font-size: 15px; font-weight: 700; color: var(--bb-blue); }
.bb-steps { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.bb-steps li { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-inline-size: 0; font-size: 13px; line-height: 1.45; color: var(--bb-text); }
.bb-steps__n { flex: 0 0 24px; display: grid; place-items: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: var(--bb-blue); color: #fff; font-size: 12px; font-weight: 700; }
.bb-steps__ic { flex: 0 0 auto; display: inline-flex; color: var(--bb-accent); }
.bb-steps li:last-child .bb-steps__ic { color: var(--bb-line-green); }
@media (max-width: 1100px) { .bb-how { margin-inline: 16px; } .bb-how__title { display: none; } }
@media (max-width: 760px), (max-height: 500px) { .bb-how { display: none; } }   /* phones: unchanged; help stays on the button */

.bb-help { position: fixed; z-index: 350;   /* over the site header, under the cookie card (400) so a first visit can still answer it */ inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(17, 24, 39, .45); }
.bb-help__card { position: relative; inline-size: min(520px, 100%); max-block-size: calc(100dvh - 48px); overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 22px; border-radius: 18px; background: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .2); }
.bb-help__card h2 { padding-inline-end: 36px; font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--bb-blue); }
.bb-help__card h3 { margin: 4px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--bb-muted); }
.bb-help .bb-steps { flex-direction: column; gap: 10px; }
.bb-help .bb-steps li { font-size: 14px; color: var(--bb-ink); }
.bb-help__x { position: absolute; top: 16px; right: 16px; inline-size: 36px; block-size: 36px; border: 0; background: var(--bb-chip); font-size: 22px; line-height: 1; }
.bb-legend { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--bb-text); }
.bb-legend li { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; }
.bb-legend__ic { display: inline-flex; gap: 4px; align-items: center; color: var(--bb-ink); }
.bb-legend__ic svg { inline-size: 16px; block-size: 16px; }
.bb-legend kbd { padding: 1px 5px; border: 1px solid var(--bb-line); border-radius: 4px; background: var(--bb-chip); font: 600 10px/1.4 system-ui, sans-serif; }
.bb-legend__seg { padding: 2px 8px; border-radius: 6px; background: var(--bb-blue); color: #fff; font-size: 12px; font-weight: 600; }
.bb-help__note { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FFF8E1; color: #6b4e00; font-size: 13px; }

/* the page's H1 (its title): small, in the builder's own column, so the tool keeps the screen */
.tt-booth-title { box-sizing: border-box; max-inline-size: 1440px; margin: 14px auto 0; padding: 0 32px; font: 700 20px/1.4 Prompt, system-ui, sans-serif; color: #00366F; }
@media (max-width: 1100px) { .tt-booth-title { padding-inline: 16px; } }
@media (max-width: 760px), (max-height: 500px) { .tt-booth-title { margin-block: 8px 6px; font-size: 16px; } }

/* The page's mount point (BOOTH-6 run 3): a light first paint until booth-page.js mounts the builder.
   Same height as the builder so nothing below it jumps when it arrives. */
.bb-mount { min-block-size: min(820px, calc(100svh - 80px)); display: grid; place-items: center; padding: 24px 16px; color: #6b7280; font: 400 15px/1.6 Prompt, system-ui, sans-serif; text-align: center; }
.bb-mount p { margin: 0; }
/* the static first image (BOOTH-6l): the scene's first view, printed by the server; the text sits on it */
.bb-mount { position: relative; overflow: hidden; }
.bb-mount__poster { position: absolute; inset: 0; background: #8fae5a; }
.bb-mount__poster img, .bb-mount__poster svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
@media (max-width: 760px) { .bb-mount__poster { inset: 0 0 auto; block-size: 300px; } }   /* a phone: the strip the scene will take, so the 800 px file is enough */
.bb-mount > p, .bb-mount > noscript { position: relative; padding: 6px 14px; border-radius: 10px; background: rgba(255, 255, 255, .92); color: #374151; }
.bb-mount__failed { display: none; }
.bb-mount[data-failed] .bb-mount__loading { display: none; }
.bb-mount[data-failed] .bb-mount__failed { display: block; }

/* ---------------------------------------------------------------- full screen (BOOTH-6z): the scene fills the viewport,
   the option panel slides over it while an item is selected (from the right; a bottom sheet on a phone), the price bar
   stays at the foot. booth-ui.js full() sets .is-full and asks for the Fullscreen API on top. */
.bb.is-full { position: fixed; inset: 0; z-index: 100000; block-size: 100vh; block-size: 100dvh; max-inline-size: none; margin: 0; overflow: hidden; background: var(--bb-bg); }
.bb.is-full .bb-head, .bb.is-full .bb-how { display: none; }
.bb.is-full .bb-main { position: relative; display: block; flex: 1 1 auto; block-size: auto; min-block-size: 0; padding: 0; }
.bb.is-full .bb-stage { position: absolute; inset: 0; border: 0; border-radius: 0; }
.bb.is-full .bb-side {
	position: absolute;
	z-index: 4;
	top: 12px;
	right: 12px;
	bottom: 12px;
	inline-size: min(420px, calc(100% - 24px));
	box-shadow: 0 10px 40px rgba(0, 54, 111, .22);
	transition: transform .25s ease, visibility .25s;
}
.bb.is-full:not(.is-editing) .bb-side { transform: translateX(calc(100% + 24px)); visibility: hidden; }
.bb.is-full .bb-bar { flex: 0 0 76px; block-size: 76px; margin: 12px; }
.bb [data-act="full"][aria-pressed="true"] { background: var(--bb-blue); color: #fff; }
html.bb-full-lock, html.bb-full-lock body { overflow: hidden; }
@media (max-width: 760px) and (min-height: 501px) {
	.bb.is-full .bb-stage { inset: 0 0 84px; }   /* the bar is fixed at the foot, 84 px */
	.bb.is-full .bb-side { top: auto; left: 0; right: 0; bottom: 84px; inline-size: auto; max-block-size: 62%; margin: 0; padding-block-end: 0; border-radius: 18px 18px 0 0; }
	.bb.is-full:not(.is-editing) .bb-side { transform: translateY(100%); }
	.bb.is-full .bb-bar { margin: 0; block-size: 84px; }
}
@media (max-height: 500px) and (orientation: landscape) {
	.bb.is-full .bb-side { top: 8px; right: 8px; bottom: 8px; inline-size: 290px; }
	.bb.is-full .bb-bar { flex-basis: 56px; block-size: 56px; margin: 8px; }
}
@media (prefers-reduced-motion: reduce) { .bb.is-full .bb-side { transition: none; } }

/* ---------------------------------------------------------------- walls per bay (BOOTH-7c): a label over three picks */
.bb-row--bay { flex-direction: column; align-items: stretch; gap: 6px; }
.bb-bay { display: flex; gap: 6px; }
.bb-bay .bb-pick { flex: 1 1 0; min-inline-size: 0; padding: 0 8px; font-size: 13px; white-space: nowrap; }

/* Portrait (audit #3, 24 Oct): while the option panel is open the page does not scroll; booth-ui.js puts the
   scene at the top and sizes the panel's body to the room above the price bar (--bb-panel-max). */
html.bb-lock, html.bb-lock body { overflow: hidden; overscroll-behavior: none; }
@media (max-width: 760px) and (min-height: 501px) {
	html.bb-lock .bb.is-editing .bb-panel__body { max-block-size: var(--bb-panel-max, 50vh); overflow-y: auto; overscroll-behavior: contain; }
	html.bb-lock .bb.is-editing .bb-side { padding-block-end: 0; }
}

/* Phone on its side (audit #2, 24 Oct): the site header shrinks to a thin bar and the page title goes off screen
   (kept for screen readers), so the builder - scene, panel, price bar and LINE - fills the rest of the screen. */
@media (max-height: 500px) and (orientation: landscape) {
	.page-template-page-booth-builder .tt-header { --tt-h: 40px; padding-block: 0 !important; }
	.page-template-page-booth-builder .tt-header > .wp-block-group { min-block-size: 40px; padding-block: 0 !important; }
	.page-template-page-booth-builder .tt-header .wp-block-site-logo img { max-block-size: 26px; inline-size: auto; }
	.page-template-page-booth-builder .tt-booth-title { position: absolute; inline-size: 1px; block-size: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
	.page-template-page-booth-builder .wp-site-blocks > .tt-booth-main { margin-block-start: 0; padding-block-start: 0; }
	.page-template-page-booth-builder .tt-booth-main > *, .page-template-page-booth-builder .tt-booth-main .entry-content > * { margin-block-start: 0; }
	.bb--page { block-size: calc(100dvh - var(--bb-site-head, 46px)); }   /* booth-page.js measures where the builder starts */
	.bb--page .bb-how { display: none; }
}

/* Inside the builder (audit #5, 24 Oct): the site's floating menu button and the desktop LINE bubble stay away -
   the first covered the scene's corner and the breakdown's title, the second doubles the builder's own LINE button. */
.page-template-page-booth-builder .tt-floatburger, .page-template-page-booth-builder .tt-line-bubble { display: none !important; }

/* Touch targets on phones (audit #6, 24 Oct): every control takes a tap of at least 44 x 44 px through an invisible
   ::before; the controls look as they did. Elements that are already positioned keep their own position (:where). */
@media (max-width: 760px), (max-height: 500px) and (orientation: landscape) {
	:where(.bb) :where(.bb-seg button, .bb-chip-float, .bb-icon, .bb-tools button, .bb-pick, .bb-step button, .bb-add, .bb-chip, .bb-search, .bb-btn, .bb-swatch, .bb-seg2 button, .bb-clear, .bb-bar__total, .bb-cta, .bb-panel__foot button, .bb-rot__keep) { position: relative; }   /* zero specificity: any position a rule sets wins */
	.bb :is(.bb-seg button, .bb-chip-float, .bb-icon, .bb-tools button, .bb-pick, .bb-step button, .bb-add, .bb-chip, .bb-search, .bb-btn, .bb-swatch, .bb-seg2 button, .bb-clear, .bb-bar__total, .bb-cta, .bb-panel__foot button, .bb-rot__keep)::before {
		content: "";
		position: absolute;
		inset-block-start: 50%;
		inset-inline-start: 50%;
		inline-size: max(100%, 44px);
		block-size: max(100%, 44px);
		transform: translate(-50%, -50%);
	}
}

/* Folding panel sections (audit #11): the title is the summary, a chevron says which way it goes. */
.bb-opt > details > summary { list-style: none; cursor: pointer; min-block-size: 32px; align-items: center; }
.bb-opt > details > summary::-webkit-details-marker { display: none; }
.bb-opt > details > summary::after { content: ""; flex: 0 0 auto; inline-size: 8px; block-size: 8px; margin-inline-start: auto; border-inline-end: 2px solid var(--bb-muted); border-block-end: 2px solid var(--bb-muted); transform: rotate(45deg); transition: transform .15s; }
.bb-opt > details:not([open]) > summary::after { transform: rotate(-45deg); }
.bb-opt > details > summary h3 { margin: 0; }
.bb-opt > details > .bb-opt__body { display: flex; flex-direction: column; gap: 8px; margin-block-start: 8px; }
@media (max-width: 760px), (max-height: 500px) and (orientation: landscape) {
	.bb-opt > details > summary { min-block-size: 44px; }
}

/* Search on a portrait phone (audit #9): the sheet takes the screen while the field has the focus. */
@media (max-width: 760px) and (min-height: 501px) {
	.bb.is-searching .bb-side { position: fixed; z-index: 1001; inset: 0; margin: 0; padding-block-end: 0; border-radius: 0; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
	.bb.is-searching .bb-browse { flex: 1 1 auto; min-block-size: 0; display: flex; flex-direction: column; }
	.bb.is-searching .bb-list { flex: 1 1 auto; min-block-size: 0; overflow-y: auto; overscroll-behavior: contain; }
	.bb.is-searching .bb-side__handle { visibility: hidden; }
}

/* The front view's "in progress" note (owner, 24 Oct): until front/index.json says the catalogue is complete. */
.bb-front__note { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; background: #FFF6D6; color: #6b4d00; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: var(--bb-float-shadow); }
@media (max-width: 760px) { .bb-front__note { top: auto; bottom: 64px; } }

.bb-panel__pshort { display: none; }

/* Wall bays (owner, 24 Oct): the kind and its price on two lines in each chip, three to a row - a price is never clipped. */
.bb-bay { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bb .bb-bay .bb-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; block-size: auto; min-block-size: 44px; padding: 4px 6px; font-size: 13px; line-height: 1.25; white-space: normal; text-align: center; }
.bb-pick__price { font-size: 12px; font-weight: 500; color: var(--bb-text); }
.bb-pick[aria-pressed="true"] .bb-pick__price { color: var(--bb-blue); }

/* A phone on its side (owner, 24 Oct): room for the options. The header is one line - name, size, price, days -
   until its title is tapped; no Rotate / Duplicate / Delete footer (the scene's toolbar has them, Done is in the bar);
   one section open at a time (booth-ui.js), section headers 36 px. */
@media (max-height: 500px) and (orientation: landscape) {
	.bb-panel__head { padding: 3px 12px; gap: 8px; }
	.bb-panel__head .bb-icon { flex-basis: 32px; inline-size: 32px; block-size: 32px; }
	.bb-panel__id { min-inline-size: 0; display: flex; align-items: baseline; gap: 4px; white-space: nowrap; overflow: hidden; cursor: pointer; }
	.bb-panel__id h2 { flex: 0 0 auto; max-inline-size: 62%; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }   /* name and size first, then price and days */
	.bb-panel__id .bb-panel__meta { font-size: 12px; }
	.bb-panel__id:not(.is-more) .bb-panel__pfull { display: none; }
	.bb-panel__id:not(.is-more) .bb-panel__pshort { display: inline; }
	.bb-panel__id .bb-panel__meta { flex: 0 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.bb-panel__id .bb-panel__meta::before { content: "· "; }
	.bb-panel__id .bb-panel__tag, .bb-panel__id .bb-panel__of { display: none; }
	.bb-panel__id.is-more { display: block; white-space: normal; }
	.bb-panel__id.is-more .bb-panel__tag, .bb-panel__id.is-more .bb-panel__of { display: revert; }
	.bb-panel__id.is-more .bb-panel__meta { white-space: normal; }
	.bb-panel__id.is-more .bb-panel__meta::before { content: none; }
	.bb .bb-panel__foot { display: none; }
	.bb .bb-panel__body { gap: 6px; padding-block: 2px; }
	.bb-opt > details > summary { min-block-size: 36px; }
	.bb-opt > details > .bb-opt__body { margin-block-start: 2px; }
}
