/**
 * Dress Size Calculator — .aunomay-sc
 */

.aunomay-sc {
	--sc-ink: #2c2420;
	--sc-muted: #7a6f66;
	--sc-line: #e8dfd4;
	--sc-surface: #fffcf8;
	--sc-blush: #9a6b66;
	--sc-gold: #b89b6a;
	--sc-sage: #8a9a86;
	--sc-serif: "Cormorant Garamond", Georgia, serif;
	--sc-sans: "Jost", "Segoe UI", system-ui, sans-serif;

	font-family: var(--sc-sans);
	color: var(--sc-ink);
	line-height: 1.55;
	max-width: 720px;
	margin: 0 auto;
	padding: 8px 0 36px;
	box-sizing: border-box;
}

.aunomay-sc *,
.aunomay-sc *::before,
.aunomay-sc *::after {
	box-sizing: border-box;
}

.aunomay-sc__header {
	text-align: center;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--sc-line);
}

.aunomay-sc__kicker {
	margin: 0 0 8px;
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--sc-blush);
}

.aunomay-sc__title {
	margin: 0 0 10px;
	font-family: var(--sc-serif);
	font-style: italic;
	font-weight: 600;
	font-size: clamp(1.85rem, 4vw, 2.5rem);
	line-height: 1.15;
}

.aunomay-sc__lead {
	margin: 0 auto 10px;
	max-width: 40rem;
	font-size: 1rem;
	font-weight: 300;
	color: var(--sc-muted);
}

.aunomay-sc__badge {
	margin: 0;
	display: inline-block;
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--sc-sage);
	border: 1px solid rgba(138, 154, 134, 0.4);
	padding: 4px 10px;
}

.aunomay-sc__fieldset {
	margin: 0 0 16px;
	padding: 16px;
	border: 1px solid var(--sc-line);
	background: var(--sc-surface);
}

.aunomay-sc__legend {
	padding: 0 4px;
	font-family: var(--sc-serif);
	font-style: italic;
	font-size: 1.25rem;
	font-weight: 600;
}

.aunomay-sc__hint {
	margin: 0 0 12px;
	font-size: 0.88rem;
	font-weight: 300;
	color: var(--sc-muted);
}

.aunomay-sc__units,
.aunomay-sc__fits {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.aunomay-sc__unit,
.aunomay-sc__fit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--sc-line);
	background: #fff;
	cursor: pointer;
	font-size: 0.92rem;
}

.aunomay-sc__unit:has(input:checked),
.aunomay-sc__fit:has(input:checked) {
	border-color: var(--sc-blush);
	background: #f3e8e4;
}

.aunomay-sc__unit input,
.aunomay-sc__fit input {
	width: 18px;
	height: 18px;
}

.aunomay-sc__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

@media (min-width: 560px) {
	.aunomay-sc__grid {
		grid-template-columns: 1fr 1fr;
	}
}

.aunomay-sc__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.aunomay-sc__label {
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sc-muted);
}

.aunomay-sc__req {
	color: var(--sc-blush);
}

.aunomay-sc__input-wrap {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--sc-line);
	background: #fff;
}

.aunomay-sc__input {
	flex: 1;
	min-height: 48px;
	border: 0;
	padding: 10px 12px;
	font: inherit;
	font-size: 1rem;
	min-width: 0;
}

.aunomay-sc__input:focus {
	outline: none;
}

.aunomay-sc__input-wrap:focus-within {
	outline: 2px solid var(--sc-gold);
	outline-offset: 2px;
}

.aunomay-sc__unit-suffix {
	display: inline-flex;
	align-items: center;
	padding: 0 12px;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--sc-muted);
	background: #f7f1ea;
	border-left: 1px solid var(--sc-line);
}

.aunomay-sc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}

.aunomay-sc__btn {
	appearance: none;
	border: 1px solid var(--sc-ink);
	background: var(--sc-ink);
	color: #fffcf8;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	min-height: 48px;
	padding: 12px 18px;
	cursor: pointer;
	touch-action: manipulation;
}

.aunomay-sc__btn:hover {
	background: var(--sc-blush);
	border-color: var(--sc-blush);
}

.aunomay-sc__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.aunomay-sc__btn:focus-visible,
.aunomay-sc__chip:focus-visible {
	outline: 2px solid var(--sc-gold);
	outline-offset: 2px;
}

.aunomay-sc__btn--ghost {
	background: transparent;
	color: var(--sc-ink);
	border-color: var(--sc-line);
}

.aunomay-sc__btn--ghost:hover {
	border-color: var(--sc-gold);
	background: rgba(184, 155, 106, 0.12);
}

.aunomay-sc__status {
	margin: 12px 0 0;
	min-height: 1.35em;
	font-size: 0.92rem;
	color: var(--sc-sage);
	font-weight: 500;
}

.aunomay-sc__status.is-error {
	color: var(--sc-blush);
}

.aunomay-sc__result {
	margin-top: 22px;
}

.aunomay-sc__result-card {
	padding: 20px 16px;
	border: 1px solid var(--sc-line);
	background: linear-gradient(180deg, #fffcf8 0%, #f7f1ea 100%);
}

.aunomay-sc__result-kicker {
	margin: 0 0 6px;
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--sc-blush);
}

.aunomay-sc__result-size {
	margin: 0 0 10px;
	font-family: var(--sc-serif);
	font-style: italic;
	font-size: clamp(2.2rem, 5vw, 3rem);
	font-weight: 600;
	line-height: 1.1;
}

.aunomay-sc__result-summary {
	margin: 0 0 14px;
	font-size: 1rem;
	font-weight: 300;
	color: var(--sc-muted);
}

.aunomay-sc__conflict {
	margin: 0 0 14px;
	padding: 12px;
	border: 1px solid rgba(154, 107, 102, 0.4);
	background: #f3e8e4;
}

.aunomay-sc__conflict-title {
	margin: 0 0 4px;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--sc-blush);
}

.aunomay-sc__conflict-body {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 300;
	color: var(--sc-ink);
}

.aunomay-sc__subhead {
	margin: 0 0 8px;
	font-family: var(--sc-serif);
	font-style: italic;
	font-size: 1.2rem;
	font-weight: 600;
}

.aunomay-sc__between p {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 300;
	color: var(--sc-muted);
}

.aunomay-sc__per {
	margin-top: 16px;
}

.aunomay-sc__per-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.aunomay-sc__per-item {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 8px;
	align-items: baseline;
	padding: 10px 12px;
	border: 1px solid var(--sc-line);
	background: #fff;
	font-size: 0.9rem;
}

.aunomay-sc__per-item.is-conflict {
	border-color: rgba(154, 107, 102, 0.45);
}

.aunomay-sc__per-size {
	font-weight: 600;
	font-family: var(--sc-serif);
	font-style: italic;
	font-size: 1.1rem;
}

.aunomay-sc__per-note {
	grid-column: 1 / -1;
	font-size: 0.8rem;
	color: var(--sc-muted);
	font-weight: 300;
}

.aunomay-sc__chart {
	margin-top: 28px;
}

.aunomay-sc__chart-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.aunomay-sc__chart-notes {
	margin: 0 0 10px;
	font-size: 0.88rem;
	color: var(--sc-muted);
	font-weight: 300;
}

.aunomay-sc__chip {
	appearance: none;
	border: 1px solid var(--sc-line);
	background: #fff;
	min-height: 36px;
	padding: 6px 12px;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
}

.aunomay-sc__chip.is-active {
	border-color: var(--sc-blush);
	background: #f3e8e4;
	color: var(--sc-blush);
}

.aunomay-sc__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--sc-line);
}

.aunomay-sc__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
	min-width: 520px;
}

.aunomay-sc__table th,
.aunomay-sc__table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--sc-line);
	text-align: left;
	white-space: nowrap;
}

.aunomay-sc__table thead th {
	background: #f7f1ea;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--sc-muted);
}

.aunomay-sc__table tbody th {
	font-family: var(--sc-serif);
	font-style: italic;
	font-weight: 600;
}

.aunomay-sc__howto {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--sc-line);
}

.aunomay-sc__howto-list {
	margin: 0;
	padding: 0 0 0 1.15em;
	font-size: 0.92rem;
	font-weight: 300;
	color: var(--sc-muted);
	line-height: 1.55;
}

.aunomay-sc__howto-list li {
	margin-bottom: 6px;
}

@media (prefers-reduced-motion: reduce) {
	.aunomay-sc__btn {
		transition: none;
	}
}
