:root {
  color-scheme: light;
  --bg: #f4f3ed;
  --surface: #fffefa;
  --ink: #19332f;
  --muted: #647570;
  --border: #dce2d9;
  --primary: #176557;
  --soft: #e6eee6;
  --gold: #bd7435;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101f21;
  --surface: #1b2f30;
  --ink: #f1f0e5;
  --muted: #a4b9b1;
  --border: #39514e;
  --primary: #267c69;
  --soft: #263d39;
  --gold: #f4cc78;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0 auto; max-width: 1600px; padding: 28px clamp(16px, 3vw, 48px); background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
header, .section-title, .header-actions, .actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
header { margin-bottom: 24px; }
h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -2px; font-weight: 750; line-height: 1.2; }
h2 { font-size: 22px; margin: 8px 0 16px; letter-spacing: -.5px; }
h3 { margin-top: 30px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--muted); }
.accent { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
a { color: var(--primary); font-weight: 650; }
:root[data-theme="dark"] a { color: #a5dac7; }
button, input { font: inherit; }
button { cursor: pointer; min-height: 48px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 18px; background: var(--surface); color: var(--ink); font-weight: 650; touch-action: manipulation; }
button:hover { filter: brightness(.96); }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #d49c49; outline-offset: 3px; }
button.primary { background: var(--primary); color: white; border-color: var(--primary); }
button.quiet { background: transparent; padding: 8px 12px; font-size: 14px; }
.status { background: var(--soft); border-radius: 12px; padding: 12px 18px; margin-bottom: 20px; font-size: 14px; overflow-wrap: anywhere; }
.status.warning { background: #f6e8cd; color: #674016; }
.error { border: 1px solid #bf614e; border-radius: 12px; background: #fff0e9; color: #802c22; padding: 16px; overflow-wrap: anywhere; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(18px, 2.5vw, 28px); margin-bottom: 24px; }
.narrow { max-width: 540px; margin: 50px auto; }
.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .85fr); gap: 28px; margin-top: 28px; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product { min-height: 150px; padding: 20px; display: flex; align-items: flex-start; flex-direction: column; text-align: left; border: 1px solid var(--border); border-top: 4px solid #a34942; gap: 8px; }
.product span { font-size: 19px; }
.product strong { font-size: 29px; letter-spacing: -.5px; }
.product small { color: var(--muted); font-weight: 450; }
.product.kakao { border-top-color: #9c7049; }
.product.kinderpunsch { border-top-color: #c79a2e; }
.product.schuss { border-top-color: #658f82; }
.return-button { background: var(--soft); display: flex; width: 100%; justify-content: space-between; margin-top: 16px; min-height: 72px; align-items: center; font-size: 18px; }
.cart { align-self: start; position: sticky; top: 20px; }
.cart-lines { min-height: 140px; max-height: 43vh; overflow-y: auto; }
.cart-row { display: grid; grid-template-columns: 1fr auto 44px; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-row strong { white-space: nowrap; font-size: 15px; }
button.minus { padding: 4px; min-width: 44px; min-height: 44px; font-size: 24px; }
.empty { padding: 30px 0; color: var(--muted); }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 12px; font-size: 14px; }
.totals > :nth-child(even) { text-align: right; }
.grand-total { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; gap: 10px; }
.grand-total strong { font-size: clamp(30px, 4vw, 44px); letter-spacing: -1px; white-space: nowrap; }
.book { width: 100%; min-height: 70px; font-size: 18px; }
footer { color: var(--muted); font-size: 12px; margin: 28px 0 8px; text-align: center; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 650; }
input { border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--ink); min-height: 46px; padding: 8px 10px; min-width: 0; }
input[type="checkbox"] { width: 24px; min-height: 24px; accent-color: var(--primary); }
form:not(.filter) > button { margin-top: 16px; }
.filter { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 24px; }
.metrics > div { background: var(--soft); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.metrics span { font-size: 13px; color: var(--muted); }
.metrics strong { font-size: 26px; letter-spacing: -.5px; }
canvas { width: 100%; height: 320px; display: block; }
.legend { display: flex; gap: 12px 24px; flex-wrap: wrap; font-size: 14px; font-weight: 700; margin: 12px 0 24px; }
.day-0 { color: #167267; } .day-1 { color: #b85a2c; } .day-2 { color: #405fb6; } .day-3 { color: #9c4c84; } .day-4 { color: #717020; } .day-5 { color: #554395; } .day-6 { color: #a53b3b; } .day-7 { color: #267d96; }
.table-wrap { overflow-x: auto; margin-bottom: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
th { color: var(--muted); font-size: 12px; font-weight: 750; }
td, th { padding: 14px 12px; border-bottom: 1px solid var(--border); }
td input[type="text"] { min-width: 190px; width: 100%; }
td input[type="number"] { width: 110px; }
summary { cursor: pointer; padding: 10px 0; }
.pairing-code { font-size: 24px; font-weight: 750; letter-spacing: 2px; color: var(--primary); overflow-wrap: anywhere; }
#history { font-size: 14px; max-height: 340px; overflow: auto; }
@media (min-width: 1400px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .checkout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cart { position: static; }
  .product { min-height: 125px; }
  .header-actions { gap: 10px; font-size: 13px; }
  .section-title .muted { font-size: 12px; }
  body { padding: 18px 14px; }
}
