.stw {
	--st-accent: #d6246e;
	--st-line: color-mix(in srgb, currentColor 16%, transparent);
	--st-soft: color-mix(in srgb, currentColor 5%, transparent);
	margin: 2rem 0;
	font: inherit;
	color: inherit;
}
.stw *, .stw *::before, .stw *::after { box-sizing: border-box; }
.stw-loading { padding: 2rem 0; opacity: .7; }
.stw-meta { margin: 0 0 1rem; font-size: 1.05em; font-weight: 600; }

.stw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .stw-grid { grid-template-columns: minmax(0, 1fr); } }

/* Legende */
.stw-legend { list-style: none; margin: 0 0 .9rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .88em; }
.stw-legend li { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }
.stw-sw { display: inline-block; width: 13px; height: 13px; border-radius: 50%; flex: none; border: 1px solid rgba(0, 0, 0, .25); }
.stw-sw--mine { background: var(--st-accent); border-color: #fff; box-shadow: 0 0 0 1px var(--st-accent); }
.stw-sw--held { background: repeating-linear-gradient(45deg, #f3e3b3 0 2px, #d9a441 2px 4px); border-color: #b88a2a; }
.stw-sw--sold { background: #c3c9cf; border-color: transparent; }
.stw-sw--wc { border-radius: 3px; background: transparent; border: 2px solid currentColor; }
.stw-hint { font-size: .85em; opacity: .7; margin: .7rem 0 0; }

/* Warenkorb */
.stw-cart {
	border: 1px solid var(--st-line);
	border-radius: 8px;
	padding: 1.2rem;
	position: sticky; top: 24px;
}
@media (max-width: 900px) { .stw-cart { position: static; } }
.stw-cart h3 { margin: 0 0 .8rem; font-size: 1.15em; }
.stw-empty { margin: 0; opacity: .75; }
.stw-timer { font-size: .85em; margin: -.3rem 0 .9rem; opacity: .8; font-variant-numeric: tabular-nums; }
.stw-timer.is-low { color: #b42318; opacity: 1; font-weight: 600; }
.stw-err { background: #fdecea; color: #7a1c14; border-left: 3px solid #b42318; padding: .6rem .8rem; margin: 0 0 .9rem; font-size: .92em; border-radius: 0 4px 4px 0; }
.stw-err[hidden] { display: none; }

.stw-lines { list-style: none; margin: 0 0 1rem; padding: 0; }
.stw-lines li { padding: .65rem 0; border-top: 1px solid var(--st-line); margin: 0; }
.stw-lines li:first-child { border-top: 0; padding-top: 0; }
.stw-line { display: flex; align-items: center; gap: .65rem; }
.stw-line-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.stw-line-t span { font-size: .85em; opacity: .7; }
.stw-line-p { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stw-x { background: none; border: 0; color: inherit; font-size: 1.4rem; line-height: 1; padding: 0 .25rem; cursor: pointer; opacity: .55; }
.stw-x:hover { opacity: 1; }
.stw-lines select { width: 100%; margin-top: .5rem; }
.stw-hintline { display: block; margin-top: .3rem; opacity: .7; }

.stw-voucher { margin: 0 0 1rem; font-size: .92em; }
.stw-voucher summary { cursor: pointer; }
.stw-row { display: flex; gap: .5rem; margin-top: .6rem; }
.stw-row input { flex: 1; min-width: 0; }

.stw-sum { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; margin: 0 0 1.1rem; font-variant-numeric: tabular-nums; }
.stw-sum dt, .stw-sum dd { margin: 0; }
.stw-sum dd { text-align: right; }
.stw-sum .stw-total { font-weight: 700; font-size: 1.15em; padding-top: .55rem; border-top: 1px solid var(--st-line); }

/* Formular */
.stw-form { display: grid; gap: .8rem; }
.stw-f { display: grid; gap: .25rem; font-size: .9em; }
.stw input[type=text], .stw input[type=email], .stw input[type=tel], .stw select {
	width: 100%; padding: .55rem .65rem; font: inherit; color: inherit;
	background: transparent; border: 1px solid color-mix(in srgb, currentColor 32%, transparent); border-radius: 5px;
}
.stw input:focus-visible, .stw select:focus-visible, .stw-btn:focus-visible, .stw-x:focus-visible, .stw summary:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.stw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.stw-pay { border: 1px solid var(--st-line); border-radius: 5px; padding: .5rem .8rem .7rem; margin: 0; }
.stw-pay legend { padding: 0 .3rem; font-size: .9em; }
.stw-radio, .stw-check { display: flex; gap: .55rem; align-items: flex-start; font-size: .92em; margin: .3rem 0 0; }
.stw-check { margin: 0; }
.stw-radio input, .stw-check input { margin-top: .25rem; accent-color: var(--st-accent); }

.stw-btn {
	display: inline-block; text-align: center; text-decoration: none;
	background: var(--st-accent); color: #fff; border: 1px solid var(--st-accent);
	border-radius: 6px; padding: .75rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; width: 100%;
}
.stw-btn:hover { filter: brightness(.93); }
.stw-btn:disabled { opacity: .6; cursor: wait; }
.stw-btn--ghost { width: auto; background: transparent; color: inherit; border-color: color-mix(in srgb, currentColor 35%, transparent); padding: .5rem .9rem; font-weight: 500; }
.stw-btn--link { background: none; border: 0; color: inherit; font-weight: 400; text-decoration: underline; padding: .2rem; }

/* Meldungen nach Rückkehr */
.stw-note { display: grid; gap: .5rem; padding: 1rem 1.2rem; margin: 0 0 1.5rem; border-radius: 6px; border-left: 4px solid; }
.stw-note .stw-btn { width: auto; justify-self: start; }
.stw-note--ok { background: #ebf7ee; border-color: #1a7f37; color: #12391d; }
.stw-note--warn { background: #fff7e6; border-color: #b7791f; color: #4a3410; }
.stw-note--err { background: #fdecea; border-color: #b42318; color: #5b1710; }

@media (prefers-reduced-motion: no-preference) { .stw-cart .stw-lines li { animation: stw-in .18s ease-out; } }
@keyframes stw-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
