:root {
  --wein: #7a1f2b;
  --wein-hell: #f6eaec;
  --text: #1d1d1f;
  --grau: #5f6368;
  --linie: #dcdcdf;
  --flaeche: #fafaf8;
  --gut: #2e7d4f;
  --warn: #b3261e;
  --rund: 12px;
  font-size: 17px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--flaeche); line-height: 1.55; }
a { color: var(--wein); }
main { max-width: 760px; margin: 0 auto; padding: 0 1rem 3rem; }

.kopf { background: #fff; border-bottom: 1px solid var(--linie); padding: .7rem 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; max-width: 100%; }
.marke { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--text); display: flex; align-items: center; }
.marke span:last-child { color: var(--wein); }
.glas { margin-right: .45rem; width: 18px; height: 22px; background: url(/favicon.svg) center/contain no-repeat; display: inline-block; }
.kopf nav { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .92rem; }
.kopf nav a { text-decoration: none; color: var(--grau); padding: .2rem 0; }
.kopf nav a[aria-current] { color: var(--wein); font-weight: 600; border-bottom: 2px solid var(--wein); }

h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.6rem 0 .6rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
h2 small { display: block; font-size: .9rem; font-weight: 400; color: var(--grau); }
.intro p { font-size: 1.05rem; }

.rechner { background: #fff; border: 1px solid var(--linie); border-radius: var(--rund); padding: 1rem 1.1rem 1.2rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; }
legend { font-weight: 700; margin-bottom: .6rem; font-size: 1.05rem; }
.person { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; }
.person legend { grid-column: 1 / -1; }
.person label { display: flex; flex-direction: column; font-size: .9rem; color: var(--grau); position: relative; }
.person .einheit { position: absolute; right: .7rem; bottom: .62rem; color: var(--grau); font-size: .85rem; }
input { font: inherit; padding: .5rem .6rem; border: 1px solid var(--linie); border-radius: 8px; width: 100%; background: #fff; color: var(--text); }
input:focus { outline: 2px solid var(--wein); outline-offset: 1px; }
.wahl { grid-column: 1 / -1; display: flex; gap: .5rem; }
.wahl label { flex-direction: row; align-items: center; gap: .4rem; border: 1px solid var(--linie); border-radius: 8px; padding: .45rem .9rem; color: var(--text); cursor: pointer; }
.wahl input { width: auto; }
.wahl label:has(input:checked) { border-color: var(--wein); background: var(--wein-hell); }

.getraenke ul { list-style: none; margin: 0; padding: 0; }
.getraenke li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid #eee; }
.getraenke .name { flex: 1; }
.getraenke small { display: block; color: var(--grau); font-size: .8rem; }
.getraenke .eigen label { width: 5.2rem; }
.zaehler { display: flex; align-items: center; gap: .25rem; }
.zaehler input { width: 3rem; text-align: center; padding: .4rem .2rem; }
.zaehler button { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--linie); background: #fff; font-size: 1.15rem; cursor: pointer; color: var(--wein); }
.zaehler button:hover { background: var(--wein-hell); }
.zeit label { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.zeit input { width: 4.5rem; }
.uhrzeiten { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.uhrzeiten legend { width: 100%; }
.uhrzeiten input[type=time] { width: 7.5rem; }
.los, .knopf { display: inline-block; background: var(--wein); color: #fff; border: 0; border-radius: 999px; padding: .7rem 1.6rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.los { width: 100%; }

.ergebnis { background: #fff; border: 2px solid var(--wein); border-radius: var(--rund); padding: 1rem 1.2rem; margin-top: 1.2rem; }
.ergebnis h2 { margin-top: .2rem; }
.ergebnis dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: .4rem 0; }
.ergebnis dt { color: var(--grau); }
.ergebnis dd { margin: 0; font-weight: 600; }
.ergebnis dd.gross { font-size: 1.5rem; color: var(--wein); }
.skala { position: relative; height: 34px; margin: 1rem 0 .4rem; background: linear-gradient(90deg, #e8f3ec 0 15%, #fff4e0 15% 25%, #fde6e4 25% 55%, #f8d0cc 55%); border-radius: 6px; }
.skala-band { position: absolute; top: 4px; bottom: 12px; background: var(--wein); border-radius: 4px; opacity: .85; }
.skala span { position: absolute; bottom: -1.2rem; transform: translateX(-50%); font-size: .75rem; color: var(--grau); }
.skala span::before { content: ""; position: absolute; left: 50%; bottom: 1.25rem; height: 34px; border-left: 1px dashed #999; }
.zeiten dd { font-weight: 600; }
.fehler { color: var(--warn); font-weight: 600; }
.warnung { background: var(--wein-hell); border-left: 4px solid var(--wein); padding: .6rem .8rem; border-radius: 0 8px 8px 0; }
.klein { font-size: .88rem; color: var(--grau); }

.text details { background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .9rem; margin: .5rem 0; }
.text summary { font-weight: 600; cursor: pointer; }
.formel { background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: .7rem .9rem; font-family: ui-monospace, Menlo, monospace; font-size: .9rem; overflow-x: auto; }
pre { background: #1d1d1f; color: #f5f5f5; padding: .8rem 1rem; border-radius: 8px; overflow-x: auto; font-size: .82rem; }
code { font-family: ui-monospace, Menlo, monospace; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .92rem; margin: .8rem 0; display: block; overflow-x: auto; }
th, td { padding: .45rem .55rem; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
thead th { background: var(--wein-hell); font-size: .85rem; }
tbody th { font-weight: 600; }
.grenze { background: #fff; border: 1px solid var(--linie); border-left: 5px solid var(--wein); border-radius: 8px; padding: .2rem 1rem .4rem; margin: .8rem 0; }
.grenze h2 { margin-top: .6rem; }
.werkzeug { background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: .1rem 1rem .3rem; margin: .6rem 0; }

.fuss { border-top: 1px solid var(--linie); background: #fff; padding: 1.2rem 1rem 2rem; font-size: .9rem; color: var(--grau); }
.fuss > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.fuss nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .8rem auto; }

@media (max-width: 520px) {
  h1 { font-size: 1.55rem; }
  .kopf nav { font-size: .85rem; }
}
