.smart-launch,
.smart-dialog,
.smart-result {
	--smart-olive: #293321;
	--smart-deep: #252d20;
	--smart-cream: #f5e9d6;
	--smart-beige: #efe0ca;
	--smart-gold: #c5a063;
	--smart-border: #d8c5a8;
}
.smart-launch { margin: 0 0 20px; }
.smart-launch button,
.smart-navigation button:last-child,
.smart-result-actions button:first-child {
	background: var(--smart-olive);
	color: var(--smart-cream);
	border: 1px solid var(--smart-gold);
	padding: .65em 1em;
	transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.smart-launch button { width: min(100%, 25rem); letter-spacing: .015em; }
.smart-launch button span[aria-hidden] { color: #e4c38e; margin-inline-end: .25em; }
.smart-launch button:hover { background: var(--smart-deep); box-shadow: 0 4px 12px #49392230; transform: translateY(-1px); }
.smart-launch p { margin: .5em 0 0; font-size: .8em; color: #55492e; }

.smart-dialog {
	width: min(680px, calc(100% - 24px));
	max-height: calc(100dvh - 28px);
	overflow: auto;
	overscroll-behavior: contain;
	padding: clamp(17px, 4vw, 34px);
	border: 1px solid var(--smart-gold);
	border-radius: 14px;
	background: radial-gradient(ellipse at top, #fff6e8, transparent 75%), var(--smart-cream);
	color: var(--smart-deep);
	font: 17px/1.35 var(--serif);
	box-shadow: 0 20px 80px #17190e65;
}
.smart-dialog[open] { animation: smart-open .23s ease both; }
.smart-dialog::backdrop { background: #1a2017b0; }
.smart-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.smart-dialog-head p, .smart-kicker { margin: 0; font-size: .85rem; letter-spacing: .065em; color: #644928; }
.smart-dialog-head p span[aria-hidden] { color: #936d3b; }
.smart-close {
	width: 40px;
	min-height: 40px;
	background: transparent;
	color: var(--smart-deep);
	font-size: 24px !important;
}
.smart-dialog h2, .smart-result h2 { margin: 12px 0; font-size: clamp(28px, 5vw, 42px); }
.smart-dialog h2:focus, .smart-result h2:focus { outline: none; }
.smart-step-count { margin: 7px 0 5px; color: #644928; font-size: .82rem; }
.smart-steps { width: 100%; height: 6px; display: block; accent-color: var(--smart-olive); }
.smart-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.smart-options label { position: relative; display: flex; align-items: center; gap: 9px; min-height: 49px; padding: 8px 10px; }
.smart-options label, .smart-budget-presets button, .smart-result-actions button, .smart-navigation button {
	border: 1px solid var(--smart-border);
	border-radius: 8px;
	background: #fffbf360;
	color: var(--smart-deep);
}
.smart-options label { cursor: pointer; }
.smart-options label:hover { border-color: #a58455; }
.smart-options label:has(:checked), .smart-budget-presets button[aria-pressed=true] { background: var(--smart-olive); border-color: var(--smart-gold); color: var(--smart-cream); }
.smart-options label:has(:focus-visible) { outline: 2px solid #93682c; outline-offset: 2px; }
.smart-options label > input { position: absolute; opacity: 0; }
.smart-options label > span:first-of-type { flex: 0 0 1.25em; text-align: center; color: #8b6435; font-size: 1.15em; }
.smart-options label:has(:checked) > span:first-of-type { color: #e4c38e; }
.smart-budget-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.smart-budget-label output { font-size: 2rem; color: var(--smart-olive); }
.smart-dialog input[type=range] { width: 100%; margin: 5px 0 14px; accent-color: var(--smart-olive); }
.smart-budget-presets, .smart-extras div { display: flex; flex-wrap: wrap; gap: 7px; }
.smart-budget-presets button { padding: 6px 8px; font-size: .86em; }
.smart-dialog fieldset { min-width: 0; border: 1px solid var(--smart-border); border-radius: 8px; padding: 10px; margin: 13px 0; }
.smart-dialog legend { padding-inline: 4px; }
.smart-extras label { display: inline-flex; align-items: center; gap: 3px; font-size: .84em; }
.smart-dialog input[type=checkbox] { accent-color: var(--smart-olive); }
#smart-exclude { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
#smart-exclude label { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 5px 8px; border: 1px solid var(--smart-border); border-radius: 7px; cursor: pointer; font-size: .87em; overflow-wrap: anywhere; }
#smart-exclude label:has(:checked) { border-color: #93682c; background: #fff9ed; }
#smart-exclude input { flex: none; margin: 0; }
@media (max-width: 360px) {
	#smart-exclude { grid-template-columns: 1fr; }
}
.smart-help, .smart-dialog-status, .smart-result-status { margin: 8px 0; font-size: .82em; color: #604528; }
.smart-dialog-status:empty, .smart-result-status:empty { display: none; }
.smart-navigation { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; }
.smart-navigation button, .smart-result-actions button { padding: 8px 11px; min-height: 40px; }
.smart-result { margin: 0 0 12px; padding: clamp(12px, 2.5vw, 23px); border: 1px solid var(--smart-gold); border-radius: 10px; background: var(--smart-cream); }
.smart-result h2 { font-size: clamp(24px, 3vw, 36px); }
.smart-result p { margin-block: 6px; }
.smart-result-total { font-weight: 700; }
.smart-contents { margin: 9px 0; padding-inline-start: 20px; font-size: .88em; }
.smart-result-actions { display: flex; flex-wrap: wrap; gap: 7px; font-size: .83em; }
.gift-layer-enter { animation: smart-layer .32s ease both; animation-delay: var(--gift-layer-delay, 0ms); }
@keyframes smart-layer { from { opacity: 0; transform: translateY(-5px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes smart-open { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) {
	.smart-dialog { font-size: 15px; }
	.smart-options { gap: 5px; }
	.smart-options label { padding-inline: 6px; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
	.smart-launch button, .smart-dialog[open], .gift-layer-enter { animation: none; transition: none; }
}
@media (max-width: 640px) {
	.smart-navigation {
		position: sticky;
		bottom: -17px;
		margin-inline: -9px;
		padding: 8px 9px;
		background: var(--smart-cream);
		border-top: 1px solid var(--smart-border);
	}
}
.gift-scene-items:has(.gift-layer-enter)[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.smart-dialog textarea { display: block; width: 100%; resize: vertical; margin-top: 8px; padding: 9px 11px; border: 1px solid var(--smart-border); border-radius: 7px; background: #fff9ed; color: inherit; font: inherit; }
.smart-budget-charges { margin-block: 8px; font-weight: 600; font-size: .9em; }
.smart-selected-extras, .smart-result-message { margin: 6px 0; font-size: .9em; }
.smart-selected-extras dt, .smart-result-message dt { font-weight: 600; }
.smart-selected-extras dd, .smart-result-message dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.smart-result-message dd { white-space: pre-wrap; }
.gift-main-extras { min-width: 0; margin: 16px 0 0; padding: 9px 10px 10px; border: 1px solid #d8c5a8; border-radius: 9px; }
.gift-main-extras legend { padding-inline: 5px; font-size: .9em; }
.gift-main-extra-options { display: flex; flex-wrap: wrap; gap: 7px; }
.gift-main-extra-options label { display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 5px 9px; border: 1px solid #d8c5a8; border-radius: 7px; background: #fff9ed; cursor: pointer; font-size: .83em; }
.gift-main-extra-options label:has(:checked) { border-color: #93682c; background: #efe0ca; }
.gift-main-extra-options input { flex: none; margin: 0; accent-color: #293321; }
.gift-main-message { margin-top: 9px; font-size: .88em; }
.gift-main-message textarea { display: block; width: 100%; margin-top: 5px; padding: 7px 9px; resize: vertical; border: 1px solid #d8c5a8; border-radius: 7px; background: #fff9ed; color: inherit; font: inherit; }
