/* Schrift liegt auf dem eigenen Server (keine Verbindung zu Google) */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Schnapszahl – Tokens wie in der WG-App („WG App“-Design). Hell und dunkel, folgt dem Gerät. */
:root {
    color-scheme: light;
    --bg: #f6f5f1;
    --surface: #ffffff;
    --surface-2: #eeece6;
    --ink: #1a1d1b;
    --muted: #5f6661;
    --line: #e2dfd7;
    --accent: #1f6b4a;
    --accent-ink: #ffffff;
    --accent-soft: #e3f1e9;
    --hi: #f08a4b;
    --hi-ink: #2a1406;
    --hi-soft: #fdeee3;
    --hi-text: #a3460f;
    --neg: #b42f25;
    --neg-soft: #fbe7e4;
    --warn: #a3460f;
    --warn-soft: #fdeee3;
    --shadow: 0 1px 2px rgba(26,29,27,0.06), 0 4px 16px rgba(26,29,27,0.05);
    --shadow-float: 0 8px 24px rgba(26,29,27,0.14);
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7;
    --radius: 22px;
    --radius-md: 14px;
    --tabs-h: 76px;
    --ease: cubic-bezier(.2,.7,.3,1);
    --glass-demo: color-mix(in srgb, #f0b23c 75%, transparent);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #121413;
        --surface: #1b1e1c;
        --surface-2: #0d0f0e;
        --ink: #eef0ec;
        --muted: #a3aaa5;
        --line: #2c302d;
        --accent: #5cc893;
        --accent-ink: #0b1f15;
        --accent-soft: #173326;
        --hi: #f5a06b;
        --hi-ink: #2a1406;
        --hi-soft: #3a2416;
        --hi-text: #f5a06b;
        --neg: #ff7a6e;
        --neg-soft: #3a1a17;
        --warn: #f5a06b;
        --warn-soft: #3a2416;
        --shadow: 0 1px 2px rgba(0,0,0,0.4);
        --shadow-float: 0 8px 24px rgba(0,0,0,0.5);
        --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/22px "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
h2 { font-size: 22px; line-height: 28px; }
h3 { font-size: 17px; line-height: 24px; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon { width: 22px; height: 22px; flex: none; stroke-width: 1.9; }
.icon.xs { width: 16px; height: 16px; }
.drink-art { flex: none; color: var(--ink); }

/* ------------------------------------------------------------ Rahmen */
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; }
.top {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; gap: 8px;
    padding: calc(env(safe-area-inset-top) + 24px) 16px 12px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.top h1 { flex: 1; min-width: 0; font-size: clamp(24px, 7.5vw, 32px); line-height: 38px; font-weight: 800; letter-spacing: -0.02em; }
.round-btn { width: 44px; height: 44px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); }
.round-btn[aria-current] { background: var(--accent-soft); color: var(--accent); }

#view { padding: 8px 16px calc(var(--tabs-h) + env(safe-area-inset-bottom) + 40px); }
.view { display: flex; flex-direction: column; gap: 12px; }

.tabs {
    position: fixed; bottom: calc(env(safe-area-inset-bottom) + 12px); left: 50%; transform: translateX(-50%); z-index: 10;
    width: calc(100% - 24px); max-width: 536px;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px; border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow-float); border: 1px solid var(--line);
}
.tabs a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 6px 0; border-radius: var(--radius-md); min-height: 52px;
    color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 600;
    transition: background .16s var(--ease), color .16s var(--ease);
}
.tabs a[aria-current] { color: var(--accent); background: var(--accent-soft); }

.loading { color: var(--muted); text-align: center; padding: 32px 0; }
.empty { color: var(--muted); text-align: center; padding: 24px 16px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--line); }

/* ------------------------------------------------------------ Text */
.section { margin-top: 12px; font-size: 22px; line-height: 28px; font-weight: 700; }
.meta { color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500; }
.label { color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; }
.hint { color: var(--muted); font-size: 12px; line-height: 17px; font-weight: 500; }
.lead { color: var(--muted); }
.lead strong { color: var(--ink); }
.warn-text { color: var(--warn); font-weight: 700; }
.ok-text { color: var(--accent); font-weight: 700; }
.center { text-align: center; align-items: center; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.split-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* ------------------------------------------------------------ Karten */
.card { display: block; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); border: 0; }
.card.stack { display: flex; }

.hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 22px 16px 18px; transition: background .3s var(--ease); }
.figure { font-size: 28px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figure.big { font-size: 64px; line-height: 70px; font-weight: 800; }
.figure .of { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.hero.level-low .figure { color: var(--accent); }
.hero.level-mid { background: var(--warn-soft); }
.hero.level-mid .figure { color: var(--warn); }
.hero.level-high { background: var(--neg-soft); }
.hero.level-high .figure { color: var(--neg); }
.hero > .btn, .profile-chips { margin-top: 8px; }
.profile-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; border: 0; background: none; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .figure { font-size: 22px; line-height: 28px; }

.basis summary { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; list-style: none; color: var(--muted); }
.basis summary::-webkit-details-marker { display: none; }
.basis p { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 19px; }
.basis strong { color: var(--ink); }

/* ------------------------------------------------------------ Diagramme */
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .tick.strong { fill: var(--ink); }
.chart .tick.warn { fill: var(--warn); }
.chart .tick.neg { fill: var(--neg); }
.chart .total { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.chart .limit { stroke-width: 1.4; stroke-dasharray: 5 4; }
.chart .limit.warn { stroke: var(--warn); }
.chart .limit.neg { stroke: var(--neg); }
.chart .now { stroke: var(--ink); stroke-width: 1.4; }
.chart .marker { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 3; }
.chart .marker-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .drink-tick { stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; }
.chart .bar { fill: var(--accent); }
.chart .bar.over { fill: var(--hi); }

.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut { width: 128px; height: 128px; flex: none; }
.donut .donut-big { fill: var(--ink); font-size: 20px; font-weight: 800; }
.donut .tick { fill: var(--muted); font-size: 10px; font-weight: 600; }
.legend-list { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; font-size: 13px; }
.legend-list li { display: flex; align-items: center; gap: 8px; }
.legend-list i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-list .grow { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 360px) { .donut-wrap { flex-direction: column; align-items: stretch; } .donut { align-self: center; } }

.sober-lines { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.slider { gap: 4px; }
.slider-label { text-align: center; color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------ Listen */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
    display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 10px;
    background: var(--surface); box-shadow: var(--shadow); border-radius: var(--radius-md);
}
.row strong { font-weight: 600; }
.row .time { white-space: nowrap; }
.row-art { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); flex: none; }
.sheet .row { box-shadow: none; background: var(--bg); }

.link-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left;
    background: var(--surface); box-shadow: var(--shadow); border-radius: var(--radius-md); color: var(--ink); border: 0;
}
.link-row > .icon:last-child { color: var(--muted); }
.link-row strong { font-weight: 600; }
.tile-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }

.evening { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.evening-arts { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }

/* ------------------------------------------------------------ Getränkekacheln */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 480px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 14px 6px 12px; border: 0; border-radius: var(--radius-md);
    background: var(--surface); box-shadow: var(--shadow); text-align: center;
    transition: transform .12s var(--ease);
}
.tile:active { transform: scale(0.96); }
.tile strong { font-size: 14px; line-height: 18px; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }
.tile.add { border: 1.5px dashed var(--line); box-shadow: none; background: none; color: var(--muted); justify-content: center; }
.tile.add .icon { width: 28px; height: 28px; margin: 8px 0; }
.fav-dot { position: absolute; top: 8px; right: 8px; color: var(--hi); }
.fav-dot .icon { fill: currentColor; }

/* ------------------------------------------------------------ Knöpfe */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 18px; border-radius: var(--radius-md);
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 15px;
    transition: transform .12s var(--ease), background .16s var(--ease);
}
.btn:active, .chip-btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.hi { background: var(--hi); border-color: var(--hi); color: var(--hi-ink); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--neg); }
.btn.primary.danger { background: var(--neg); border-color: var(--neg); color: var(--surface); }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }

.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.icon-btn:active { background: var(--surface-2); }
.icon-btn.fav.on { color: var(--hi); }
.icon-btn.fav.on .icon { fill: currentColor; }

.chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 13px; line-height: 18px; font-weight: 600;
}
.chip.warn, .chip.level-mid { background: var(--warn-soft); color: var(--warn); }
.chip.level-high { background: var(--neg-soft); color: var(--neg); }
.chip.level-low { background: var(--accent-soft); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
    display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px 6px 10px;
    border-radius: 999px; border: 0; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700;
}

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--radius-md); background: var(--surface-2); }
.segmented > button, .segmented > label > span {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 8px; border: 0; border-radius: 10px; background: none;
    color: var(--muted); font-weight: 600; font-size: 13px; line-height: 18px; white-space: nowrap;
}
.segmented > label { display: block; cursor: pointer; }
.segmented > label > input { position: absolute; opacity: 0; pointer-events: none; }
.segmented > [aria-current], .segmented > label > input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segmented > label > input:focus-visible + span { outline: 2px solid var(--accent); }

.choice { cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 14px; color: var(--ink); }
.choice input:checked + span { background: var(--accent); color: var(--accent-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.art-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.art-pick label { cursor: pointer; }
.art-pick input { position: absolute; opacity: 0; pointer-events: none; }
.art-pick span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); border: 2px solid transparent; }
.art-pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------ Formulare */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); }
label output { color: var(--ink); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.disabled { opacity: .5; }
input, select {
    width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-md);
    border: 1px solid transparent; background: var(--surface-2); color: var(--ink); font-size: 16px; font-weight: 400;
}
input[type="range"] { min-height: 32px; padding: 0; border: 0; background: none; accent-color: var(--accent); }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent); flex: none; }
input[type="date"] { text-align: center; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; font-weight: 400; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.form-error { color: var(--neg); font-size: 13px; font-weight: 600; }

/* Uhrzeit-Räder */
.wheels { display: flex; justify-content: center; align-items: center; gap: 6px; }
.wheel {
    height: 120px; width: 84px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none;
    border-radius: var(--radius-md); background: var(--surface-2);
    -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
    mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.wheel::-webkit-scrollbar { display: none; }
.wheel > div { height: 40px; display: grid; place-items: center; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; scroll-snap-align: center; }
.wheel > .pad { scroll-snap-align: none; }
.colon { font-size: 22px; font-weight: 800; }

/* ------------------------------------------------------------ Sheet */
.sheet {
    width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0;
    border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink);
    box-shadow: var(--shadow-float); animation: rise 0.22s ease-out;
}
.sheet { overflow-y: auto; overscroll-behavior: contain; }
.sheet::backdrop { background: rgb(0 0 0 / 45%); }
.sheet form { display: flex; flex-direction: column; gap: 16px; padding: 18px 18px calc(env(safe-area-inset-bottom) + 18px); }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet header h2 { flex: 1; }
.sheet-title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.sheet footer { display: flex; gap: 10px; }
.sheet footer .primary { flex: 1; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 620px) { .sheet { margin: auto; border-radius: 22px; } }

/* ------------------------------------------------------------ Toast */
#toasts {
    position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 20px); z-index: 100;
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none;
}
.toast {
    max-width: 480px; padding: 12px 16px; border-radius: 12px;
    background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13px;
    box-shadow: 0 6px 24px rgb(0 0 0 / 25%); animation: rise 0.2s ease-out;
}
.toast.error { background: var(--neg); color: var(--surface); }

/* ------------------------------------------------------------ Selbst mischen */
.section-sm { margin-top: 4px; font-size: 15px; line-height: 20px; font-weight: 700; color: var(--muted); }
.mix-hero {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 14px 14px 10px;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%);
}
.mix-hero strong { font-size: 19px; line-height: 24px; font-weight: 800; letter-spacing: -0.01em; }
.mix-hero > .icon { color: var(--accent); }
.mix-hero-art { display: flex; align-items: flex-end; gap: 0; flex: none; }
.mix-hero-art .mx-svg { margin-right: -6px; }
.recent-mixes { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
.recent-mixes::-webkit-scrollbar { display: none; }
.recent-mix {
    flex: none; width: 112px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px 10px;
    border: 0; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); scroll-snap-align: start;
}
.mix-recipe { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-2); font-size: 14px; }
.mix-recipe li { display: flex; align-items: center; gap: 10px; }
.mix-recipe i { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent); }
.sheet-title h2 { font-size: 20px; line-height: 26px; }
.tile .mx-svg { margin: -3px 0; }
.recent-mix-wrap { position: relative; flex: none; scroll-snap-align: start; }
.recent-x {
    position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 28px; height: 28px;
    border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted);
}
.recent-x:active { background: var(--neg-soft); color: var(--neg); }
.recent-mix strong { margin-top: 6px; font-size: 13px; line-height: 17px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Glas */
.mx-svg { display: block; flex: none; overflow: visible; }
.mx-glass { fill: none; stroke: var(--ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.mx-svg.big .mx-glass { stroke-width: 2.6; }
.mx-svg.big .mx-handle { stroke-width: 5; }
.mx-svg.big .mx-stem { stroke-width: 3.4; }
.mx-glass.mx-base { fill: color-mix(in srgb, var(--ink) 14%, transparent); }
.mx-tint { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.mx-ridge { stroke: var(--ink); stroke-opacity: .3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.mx-tick { stroke: var(--ink); stroke-opacity: .5; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.mx-tick-label { fill: var(--ink); fill-opacity: .6; font-size: 7px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-art .mx-svg, .evening-arts .mx-svg { margin: 0 4px; }

.glass-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 480px) { .glass-grid { grid-template-columns: repeat(4, 1fr); } }
.glass-tile {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px 10px;
    border: 2px solid transparent; border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink);
    transition: transform .12s var(--ease);
}
.glass-tile:active { transform: scale(0.96); }
.glass-tile.on { border-color: var(--accent); }
.glass-tile strong { margin-top: 8px; font-size: 13px; line-height: 17px; font-weight: 700; }

/* Mischer */
.mixer { gap: 14px !important; }
.mix-name-field { gap: 6px; }
.mix-name-wrap { position: relative; display: block; }
.mix-name-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.mix-name { padding-left: 38px; font-size: 17px; font-weight: 700; }
.mix-name::placeholder { color: var(--muted); font-weight: 600; }
.mix-summary { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); }
.mix-abv { display: flex; align-items: baseline; gap: 4px; color: var(--accent); }
.mix-abv span { font-size: 46px; line-height: 50px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mix-abv small { font-size: 14px; font-weight: 700; }
.mix-facts { display: flex; flex-direction: column; font-size: 13px; line-height: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mix-facts strong { color: var(--ink); font-size: 15px; }

.stage { position: relative; display: grid; grid-template-columns: 72px 1fr 72px; height: var(--stage-h); margin: 4px 0 22px; user-select: none; -webkit-user-select: none; }
.mx-stage-glass { display: flex; justify-content: center; touch-action: none; cursor: ns-resize; }
.mx-stage-glass.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.vslider { position: relative; touch-action: none; cursor: ns-resize; border-radius: 12px; }
.vslider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vs-cap { position: absolute; left: 0; right: 0; bottom: -24px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.vs-track { position: absolute; left: 50%; width: 12px; transform: translateX(-50%); border-radius: 6px; }
.vs-abv .vs-track { top: 8px; bottom: 8px; background: linear-gradient(to top, #a7d4f2, #f0cd56 30%, #e8a326 55%, #c0392b); }
.vs-fill .vs-track { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.vs-level {
    position: absolute; left: 0; right: 0; border-radius: 6px;
    bottom: calc(var(--fill-from) * 100%); top: calc((1 - var(--fill-pos)) * 100%);
    background: var(--layer-color); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 20%, transparent);
}
.vs-thumb {
    position: absolute; left: 50%; transform: translate(-50%, 50%);
    display: grid; place-items: center; min-width: 60px; height: 32px; padding: 0 8px; border-radius: 999px;
    background: var(--surface); color: var(--ink); border: 2px solid var(--accent); box-shadow: var(--shadow-float);
    font-size: 13px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums;
    transition: transform .12s var(--ease);
}
.vs-abv .vs-thumb { bottom: calc(var(--abv-pos) * 100%); }
.vs-fill .vs-thumb { bottom: calc(var(--fill-pos) * 100%); }
.vslider.dragging .vs-thumb { transform: translate(-50%, 50%) scale(1.1); }
.vs-fill .vs-thumb::before { content: ""; position: absolute; right: 100%; top: 50%; width: 10px; border-top: 2px dashed var(--accent); }

.glass-change { align-self: center; margin-top: -6px; background: var(--surface-2); color: var(--ink); font-weight: 700; }
.glass-change span { color: var(--accent); margin-left: 6px; }

.layers { display: flex; flex-direction: column; gap: 6px; }
.layer {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 4px 4px 12px; cursor: pointer;
    border-radius: 12px; background: var(--surface-2); border: 2px solid transparent; color: var(--ink);
}
.layer.on { border-color: var(--accent); background: var(--accent-soft); }
.layer strong { flex: 1; min-width: 0; font-weight: 700; }
.layer i, .ing i { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent); }
.layer.add { justify-content: center; gap: 6px; background: none; border: 1.5px dashed var(--line); color: var(--muted); font-weight: 700; font-size: 14px; padding: 4px 12px; }
.icon-btn.small { width: 36px; height: 36px; }

.ingredients { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; scrollbar-width: none; }
.ingredients::-webkit-scrollbar { display: none; }
.ing {
    flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 0; border-radius: 999px;
    background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 700;
}
.ing span { color: var(--muted); font-weight: 600; }
.ing.on { background: var(--accent); color: var(--accent-ink); }
.ing.on span { color: inherit; opacity: .8; }

.when { border-radius: var(--radius-md); background: var(--surface-2); }
.when summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; list-style: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.when summary::-webkit-details-marker { display: none; }
.when summary strong { margin-left: auto; color: var(--ink); }
.when[open] summary { padding-bottom: 4px; }
.when .field { padding: 8px 14px 14px; }
.when .wheel, .when input { background: var(--surface); }
.chart .series { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .series.future { stroke-dasharray: 4 4; opacity: .7; }
.chart .series-dot { stroke: var(--surface); stroke-width: 2; }

/* ------------------------------------------------------------ Gefühl */
.feel-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.feel-scale button {
    aspect-ratio: 1; min-height: 30px; border: 0; border-radius: 10px; font-weight: 800; font-size: 14px; color: #fff;
    background: hsl(calc(140 - var(--feel) * 14) 60% 42%); transition: transform .12s var(--ease);
}
.feel-scale button:active { transform: scale(0.9); }
.feel-chip { background: hsl(calc(140 - var(--feel) * 14) 60% 42% / .18); color: hsl(calc(140 - var(--feel) * 14) 55% 38%); }
.feel-text { color: hsl(calc(140 - var(--feel) * 14) 55% 40%); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .feel-chip { color: hsl(calc(140 - var(--feel) * 14) 65% 65%); }
    :root:not([data-theme="light"]) .feel-text { color: hsl(calc(140 - var(--feel) * 14) 65% 65%); }
}

/* ------------------------------------------------------------ Freunde */
.icon.xl { width: 48px; height: 48px; color: var(--accent); }
.back-link { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-weight: 700; font-size: 14px; margin-top: -4px; }
.code-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 75%); }
.code { display: block; font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.add-bar { display: flex; gap: 8px; }
.add-bar input { background: var(--surface); box-shadow: var(--shadow); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.add-bar input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; }
.add-bar .btn { flex: none; width: 52px; padding: 0; }
.avatar {
    position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
    background: var(--c, var(--accent-soft)); color: var(--c, var(--accent)); font-weight: 800; font-size: 16px; text-transform: uppercase;
}
.avatar[style] { color: #fff; }
.avatar.small { width: 28px; height: 28px; font-size: 12px; }
.avatars { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.avatars .meta { margin-left: 6px; }
.avatars.big .avatar { width: 44px; height: 44px; font-size: 18px; box-shadow: 0 0 0 3px var(--surface); }
.home-badge { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-style: normal; }
.home-badge .icon { width: 12px; height: 12px; }
.friend-row { color: var(--ink); padding: 8px 12px 8px 8px; }
.friend-row > .icon:last-child { color: var(--muted); }
.muted-rows .row { background: transparent; box-shadow: none; }
.party-card { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.party-hero .tile-icon.big { width: 52px; height: 52px; border-radius: 16px; }
.party-hero .tile-icon.big .icon { width: 28px; height: 28px; }
.invite { box-shadow: inset 0 0 0 2px var(--hi), var(--shadow); }
.invite > .split-line .icon { color: var(--hi); }
.chip.accent { background: var(--hi-soft); color: var(--hi-text); align-self: flex-start; }
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.party-head { display: flex; flex-direction: column; gap: 14px; }
.party-actions .btn { padding: 0 10px; font-size: 14px; }
.round-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; box-shadow: inset 0 0 0 2px var(--hi), var(--shadow); }
.round-card .grow { min-width: 150px; }
.level-low-text { color: var(--accent); }
.level-mid-text { color: var(--warn); }
.level-high-text { color: var(--neg); }
.member-card { border-left: 5px solid var(--c); }
.member-name { display: flex; align-items: center; gap: 8px; }
.member-card .amount { font-size: 20px; }
.recap { background: linear-gradient(135deg, var(--hi-soft), var(--surface) 80%); }
.recap h3 { display: flex; align-items: center; gap: 6px; }
.recap h3 .icon { color: var(--hi); }
.recap-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.recap-photos button, .gallery-item { padding: 0; border: 0; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.recap-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 480px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery-item { position: relative; display: block; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.gallery-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 12px; font-weight: 700; color: #fff; text-align: left; background: linear-gradient(transparent, rgb(0 0 0 / 60%)); }
.photo-view img { width: 100%; border-radius: var(--radius-md); }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.check.pick { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-weight: 600; }
.round-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.round-option { cursor: pointer; }
.round-option input { position: absolute; opacity: 0; pointer-events: none; }
.round-option > span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--surface-2); border: 2px solid transparent; color: var(--ink); text-align: center; }
.round-option strong { font-size: 13px; }
.round-option input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.banner-card { display: flex; align-items: center; gap: 12px; color: var(--ink); box-shadow: inset 0 0 0 2px var(--hi), var(--shadow); }
.banner-card.active { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.banner-card > .icon:last-child { color: var(--muted); }
[data-social-banner]:empty { display: none; }
.evening-row { padding: 10px 12px; }

/* ------------------------------------------------------------ Kamera */
.camera .cam-frame { position: relative; overflow: hidden; border-radius: var(--radius); background: #000; aspect-ratio: 3 / 4; display: grid; place-items: center; }
.camera video, .camera img { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.camera video { transform: scaleX(-1); }
.cam-msg { grid-area: 1 / 1; z-index: 1; padding: 20px; color: #fff; text-align: center; font-weight: 600; }
.cam-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.cam-actions[data-review] { display: flex; }
.cam-actions[data-review] .btn { flex: 1; }
.cam-actions[hidden] { display: none !important; }
.cam-file { justify-self: start; cursor: pointer; }
.shutter {
    width: 72px; height: 72px; border-radius: 50%; border: 5px solid var(--ink); background: var(--hi);
    box-shadow: inset 0 0 0 4px var(--surface); transition: transform .1s var(--ease);
}
.shutter:active { transform: scale(0.9); }
.shutter:disabled { opacity: .35; }
.camera.flash .cam-frame::after, .flash .cam-frame::after { content: ""; position: absolute; inset: 0; background: #fff; animation: flash .25s ease-out forwards; }
@keyframes flash { to { opacity: 0; } }

/* ------------------------------------------------------------ Profilbilder, eigene Fotos, Runde */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 72px; height: 72px; font-size: 28px; }
.avatar-wrap { position: relative; display: inline-flex; }
.avatars.big .avatar-wrap .avatar { width: 44px; height: 44px; font-size: 18px; box-shadow: 0 0 0 3px var(--surface); }
.avatar-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar-card .grow { min-width: 140px; }
.avatar-actions { display: flex; gap: 6px; }
.round-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.round-btn:has(img) { padding: 0; overflow: hidden; }
.gallery.small { grid-template-columns: repeat(3, 1fr); }
.gallery.small .gallery-item img { aspect-ratio: 1; }
.camera.square .cam-frame { aspect-ratio: 1; border-radius: 50%; }
.round-sheet .round-options { grid-template-columns: repeat(3, 1fr); }
.round-sheet .round-option > span { padding: 8px 4px; }
.round-sheet .round-option strong { font-size: 12px; line-height: 15px; }
.round-config { background: var(--surface-2); box-shadow: none; }
.round-config .sheet-title strong { font-size: 15px; }
.round-sheet footer { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); margin: 0 -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(env(safe-area-inset-bottom) + 18px); background: var(--surface); box-shadow: 0 -8px 16px color-mix(in srgb, var(--surface) 80%, transparent); }

/* Schwebender Knopf auf der Übersicht: schnell das nächste Getränk eintragen */
.fab {
    position: fixed; z-index: 11; right: max(16px, calc(50% - 280px + 16px));
    bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 28px);
    display: inline-flex; align-items: center; gap: 6px; height: 56px; padding: 0 20px 0 16px; border-radius: 999px;
    background: var(--hi); color: var(--hi-ink); font-weight: 800; font-size: 16px;
    box-shadow: var(--shadow-float); transition: transform .12s var(--ease);
}
.fab:active { transform: scale(0.95); }
.fab .icon { width: 24px; height: 24px; stroke-width: 2.4; }
.feel-scale button { min-width: 0; padding: 0; }
/* Fenster nie seitlich scrollen lassen: Kacheln dürfen schmaler als ihr Inhalt werden, lange Namen brechen um */
.sheet { overflow-x: hidden; }
.round-options, .round-sheet .round-options, .glass-grid, .tiles { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.round-sheet .round-options, .glass-grid, .tiles { --cols: 3; }
@media (min-width: 480px) { .glass-grid, .tiles { --cols: 4; } }
.round-option > span, .tile, .glass-tile { min-width: 0; }
.round-option strong, .tile strong, .glass-tile strong { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.round-sheet footer { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
/* Versteckte Auswahlfelder hinter Kacheln und Chips: ohne Breite, sonst schieben sie das Fenster seitlich auf */
.round-option input, .choice input, .art-pick input, .segmented > label > input { width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; }
.round-option, .choice, .art-pick label, .segmented > label { position: relative; }

/* ------------------------------------------------------------ Unsicherheit */
.chart .band { fill: var(--ink); opacity: .1; }
.cert-chips > label > span { padding: 8px 4px; }
.range-text { color: var(--muted); font-size: 13px; font-weight: 600; }
.cert-mark { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border: 0; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-weight: 800; font-size: 13px; }
.cert-mark.unknown { background: var(--neg-soft); color: var(--neg); }

/* ------------------------------------------------------------ +1 */
.again { display: flex; gap: 8px; }
.again-main { flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; text-align: left; box-shadow: inset 0 0 0 2px var(--hi), var(--shadow); }
.again-main strong { font-size: 17px; }
.again-main > .icon { color: var(--hi); width: 26px; height: 26px; stroke-width: 2.4; }
.again-main .grow { min-width: 0; }
.again-main .grow strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.again-water { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 76px; padding: 8px 4px; font-size: 12px; font-weight: 700; }

/* ------------------------------------------------------------ Scanner */
.scan-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--ink); }
.scan-card > .icon:last-child { color: var(--muted); }
.scan-frame { position: relative; overflow: hidden; border-radius: var(--radius); background: #000; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.scan-frame video { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.scan-frame .cam-msg { grid-area: 1 / 1; }
.scan-line { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--hi); box-shadow: 0 0 12px var(--hi); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; } }
.scanner .add-bar input { background: var(--surface-2); box-shadow: none; text-transform: none; letter-spacing: .04em; }

/* ------------------------------------------------------------ Uhrzeit (eingeklappt) */
.time-row { border-radius: var(--radius-md); background: var(--surface-2); }
.time-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; border: 0; background: none; color: var(--muted); font-size: 14px; text-align: left; }
.time-toggle strong { color: var(--ink); }
.time-toggle .meta { color: var(--accent); font-weight: 700; font-size: 13px; }
.time-panel { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.time-panel .wheel, .time-panel input { background: var(--surface); }
.time-panel .chip-btn { align-self: center; }

/* ------------------------------------------------------------ Suche */
.drink-search { position: relative; flex-direction: row; align-items: center; }
.drink-search .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.drink-search input { padding-left: 38px; background: var(--surface); box-shadow: var(--shadow); }
[data-search-results] .search-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ------------------------------------------------------------ Abend-Code, Personen */
.party-code { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; border: 0; border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 700; }
.party-code strong { font-size: 18px; letter-spacing: .08em; }
.party-code > span:last-child { color: var(--accent); }
.party-code > .icon { color: var(--accent); }
button.avatar-wrap { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
button.avatar-wrap:active { transform: scale(.94); }
.avatar.xxl { width: 96px; height: 96px; font-size: 38px; }
.person-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.person header { margin-bottom: -10px; }
.center-chips { justify-content: center; }
.person footer { flex-direction: column; }
.person footer .btn { width: 100%; }

/* ------------------------------------------------------------ Mischer in Schritten */
.sheet:has(.mx2) { height: 94dvh; }
.mx2 { min-height: 100%; gap: 14px !important; }
.mx2-head { position: sticky; top: -18px; z-index: 2; margin: -18px -18px 0; padding: 14px 10px 10px; background: var(--surface); }
.mx2-head h2 { font-size: 20px; line-height: 26px; text-align: center; }
.mx2-dots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.mx2-dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--surface-2); transition: background .2s var(--ease); }
.mx2-dots i.on { background: var(--accent); }
.mx2-body { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.mx2-foot { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); margin: auto -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(env(safe-area-inset-bottom) + 18px); background: var(--surface); display: flex; gap: 10px; }
.mx2-foot:empty { display: none; }
.mx2-foot .grow-btn { flex: 1; }
.mx2[data-step] .mx2-body { animation: slide-in .22s var(--ease); }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } }

/* 1. Glas */
.mx2-glasses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mx2-glass { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-height: 148px; padding: 12px 6px 10px; border: 2px solid transparent; border-radius: 18px; background: var(--surface-2); color: var(--ink); transition: transform .12s var(--ease); }
.mx2-glass:active { transform: scale(.95); }
.mx2-glass.on { border-color: var(--accent); background: var(--accent-soft); }
.mx2-glass strong { margin-top: 6px; font-size: 13px; line-height: 16px; }

/* 2. Einschenken */
.mx2-stage { position: relative; display: flex; justify-content: center; padding: 6px 0; border-radius: 22px; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--layer-color, var(--accent)) 22%, transparent), transparent 65%); }
.mx2-glass-area { touch-action: none; cursor: ns-resize; }
.mx2-total { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; align-items: flex-end; padding: 8px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-float); }
.mx2-total span { font-size: 30px; line-height: 32px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.mx2-total small { font-size: 11px; font-weight: 700; color: var(--muted); }
.mx2-total em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.mx2-layers { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px; scrollbar-width: none; }
.mx2-layers::-webkit-scrollbar { display: none; }
.mx2-layer { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 2px solid transparent; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: 13px; }
.mx2-layer span { color: var(--muted); font-weight: 600; }
.mx2-layer.on { border-color: var(--accent); background: var(--accent-soft); }
.mx2-layer.add { border: 1.5px dashed var(--line); background: none; color: var(--accent); }
.mx2-layer i, .mx2-ing i, .mx2-recipe i { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent); }
.mx2-panel { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 20px; background: var(--surface-2); }
.mx2-ing { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); text-align: left; }
.mx2-ing i { width: 24px; height: 24px; }
.mx2-ing strong { flex: 1; font-size: 17px; }
.mx2-ing .meta { color: var(--accent); font-weight: 700; }
.mx2-change-glass { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.mx2-change-glass span { color: var(--accent); font-weight: 700; }

.big-range { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: 15px; font-weight: 700; }
.big-range output { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.big-range input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; min-height: 0; background: none; --fill: 0%; --track: linear-gradient(90deg, var(--layer-color, var(--accent)) var(--fill), var(--surface) var(--fill)); }
.abv-range input[type="range"] { --track: linear-gradient(90deg, #a7d4f2, #f0cd56 30%, #e8a326 55%, #c0392b); }
.big-range input[type="range"]::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; background: var(--track); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.big-range input[type="range"]::-moz-range-track { height: 14px; border-radius: 7px; background: var(--track); }
.big-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -10px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: var(--shadow-float); }
.big-range input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: var(--shadow-float); }

/* Zutat wählen */
.mx2-search { background: var(--surface-2); }
.mx2-ings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mx2-ing-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 10px; border: 2px solid transparent; border-radius: 16px; background: var(--surface-2); color: var(--ink); }
.mx2-ing-tile i { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 20%, transparent), 0 3px 8px rgb(0 0 0 / 15%); }
.mx2-ing-tile strong { font-size: 13px; line-height: 16px; max-width: 100%; overflow-wrap: anywhere; }
.mx2-ing-tile.on { border-color: var(--accent); background: var(--accent-soft); }
.mx2-ing-tile[hidden], .mx2-ings[hidden] { display: none; }

/* 3. Fertig */
.mx2-result { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 22px; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); }
.mx2-big { display: flex; align-items: baseline; gap: 4px; color: var(--accent); }
.mx2-big span { font-size: 52px; line-height: 54px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mx2-big small { font-size: 15px; font-weight: 700; }
.mx2-recipe { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.mx2-recipe li { display: flex; align-items: center; gap: 8px; }
.mx2-recipe span { margin-left: auto; color: var(--muted); }
.time-toggle .grow { display: block; }
.big-range[hidden] { display: none; }

/* Mischer: nur Glas, Wischen und ± */
.mx2-stage { min-height: calc(var(--glass-h, 320px) + 12px); align-items: center; }
.mx2-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 80%, transparent); color: var(--bg); font-size: 13px; font-weight: 700; pointer-events: none; animation: hint-bob 1.6s ease-in-out infinite; white-space: nowrap; }
.mx2-hint .icon { width: 18px; height: 18px; }
@keyframes hint-bob { 50% { transform: translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) { .mx2-hint { animation: none; } }
.mx2-amount { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; background: var(--surface-2); }
.mx2-amount .grow { align-items: center; text-align: center; }
.mx2-amount strong { font-size: 17px; }
.mx2-amount [data-active-ml] { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
.round-step { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.round-step:active { transform: scale(.92); }
.round-step .icon { width: 24px; height: 24px; stroke-width: 2.4; }
.mx2-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mx2-tools .chip-btn { background: var(--surface-2); color: var(--ink); }
.mx2-tools .chip-btn .mx-svg { margin: -2px 0; }
.chip-btn.danger-chip { color: var(--neg); }

/* Zutaten: Kategorien */
.mx2-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mx2-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 112px; padding: 14px; border: 0; border-radius: 20px; background: var(--surface-2); color: var(--ink); text-align: left; transition: transform .12s var(--ease); }
.mx2-cat:active { transform: scale(.96); }
.mx2-cat strong { margin-top: auto; font-size: 16px; line-height: 20px; }
.mx2-cat .dots { display: flex; }
.mx2-cat .dots i { width: 26px; height: 26px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--surface-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 15%, transparent); }
.mx2-cat.own { background: var(--accent-soft); }
.mx2-cat.own .dots { color: var(--accent); }
.mx2-cat[hidden], [data-cats][hidden], .mx2-ings[hidden], .back-link[hidden], h3[hidden] { display: none; }
.own-abv { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: var(--surface-2); }
.own-abv-row { display: flex; align-items: center; gap: 18px; }
.own-abv-row strong { min-width: 120px; text-align: center; font-size: 40px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.own-abv .chips { justify-content: center; }
.own-abv .chip-btn { background: var(--surface); color: var(--ink); }

/* Kategorien der Schnellauswahl */
.cat-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips button { flex: none; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--muted); font-weight: 700; font-size: 14px; }
.cat-chips button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

/* Zutaten-Symbole */
.ing-icon { flex: none; color: var(--ink); }
.ing-icon .ing-glass { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.mx2-layer .ing-icon { margin: -4px 0 -4px -4px; }
.mx2-recipe .ing-icon { margin: -2px 0; }
.mx2-cat .dots { gap: 2px; }
.mx2-cat .dots .ing-icon { margin-right: -6px; }
.mx2-ing-tile .ing-icon { margin-bottom: 2px; }
.active-ing { display: inline-flex; align-items: center; gap: 6px; }
.join-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--ink); }
.join-card > .icon:last-child { color: var(--muted); }
.code-input { font-size: 26px; font-weight: 800; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.mx2-ing-tile .ing-icon { margin: -6px 0 -2px; }
.mx2-cat .dots .ing-icon { margin-right: -10px; }

/* Eigene Zutat: Symbol wählen */
.own-icons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.own-icon { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 2px solid transparent; border-radius: 16px; background: var(--surface-2); color: var(--ink); font-size: 12px; font-weight: 700; }
.own-icon .ing-icon { margin: -4px 0; }
.own-icon.on { border-color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------ Hinweise, Rechtliches */
.estimate-note { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.danger-card { background: var(--neg-soft); box-shadow: inset 0 0 0 2px var(--neg); }
.danger-card h3 { display: flex; align-items: center; gap: 6px; color: var(--neg); }
.danger-card .btn { align-self: flex-start; }
.intro-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-top: 6px; }
.intro-head img { border-radius: 18px; box-shadow: var(--shadow-float); }
.intro-points { display: flex; flex-direction: column; gap: 14px; }
.intro-points li { display: flex; gap: 12px; align-items: flex-start; }
.intro-points p { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 19px; }
.tile-icon.warn { background: var(--warn-soft); color: var(--warn); }
.check.consent { align-items: flex-start; font-size: 13px; line-height: 19px; color: var(--muted); }
.check.consent input { margin-top: 2px; }
.legal p, .legal li { color: var(--ink); font-size: 14px; line-height: 21px; }
.legal .section { font-size: 18px; line-height: 24px; margin-top: 8px; }
.legal-list { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; list-style: disc; }
.emergency { box-shadow: inset 0 0 0 2px var(--neg), var(--shadow); }
.emergency h3 { display: flex; align-items: center; gap: 6px; color: var(--neg); }

/* Übersicht: Höchstwert, Heimweg, Wasserpause, Ziel */
.peak-chip { margin-top: 2px; }
.peak-chip .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.home-way { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.home-way h3 { display: flex; align-items: center; gap: 6px; }
.home-way .btn-row .btn { flex: 1; }
.water-break, .home-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.water-break { box-shadow: inset 0 0 0 2px #7cc3ec, var(--shadow); }
.water-break .grow { min-width: 160px; }
.water-chip { background: color-mix(in srgb, #7cc3ec 25%, transparent); color: var(--ink); }
.home-card .grow { min-width: 140px; }
.goal-card h3 { display: flex; align-items: center; gap: 6px; }
.goal-card h3 .icon { color: var(--hi); }
.goal-bar { display: block; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.goal-bar.over i { background: var(--hi); }
.goal-card.mini { gap: 8px; padding: 14px 16px; }
.chart .peak-dot { stroke: var(--surface); stroke-width: 2; }
.chart .peak-dot.level-low { fill: var(--accent); }
.chart .peak-dot.level-mid { fill: var(--warn); }
.chart .peak-dot.level-high { fill: var(--neg); }
.chart .peak-label { font-size: 10px; font-weight: 800; }
.chart .peak-label.level-low { fill: var(--accent); }
.chart .peak-label.level-mid { fill: var(--warn); }
.chart .peak-label.level-high { fill: var(--neg); }
.limit-card h3 { display: flex; align-items: center; gap: 6px; }
.limit-card.hit { box-shadow: inset 0 0 0 2px var(--hi), var(--shadow); }
.limit-card.mini { gap: 8px; padding: 14px 16px; }
.limit-hit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--hi-soft); color: var(--hi-text); font-weight: 600; font-size: 14px; }
.limit-hit span { flex: 1; min-width: 160px; }
.person footer .btn-row { width: 100%; }
.person footer .btn-row .btn { flex: 1; }
.photo-view footer { flex-wrap: wrap; }
.blocked-list summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.blocked-list .rows { margin-top: 10px; }

/* ------------------------------------------------------------ Schnapszahl+ */
:root { --plus: #f08a4b; --plus-ink: #2a1406; }
.plus-logo { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--plus); color: var(--plus-ink); font-weight: 900; font-size: 17px; line-height: 1; }
.plus-logo.big { width: 72px; height: 72px; border-radius: 22px; font-size: 52px; box-shadow: 0 10px 30px color-mix(in srgb, var(--plus) 45%, transparent); }
.plus-mark { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 5px; background: var(--plus); color: var(--plus-ink); font-weight: 900; font-size: 13px; line-height: 1; vertical-align: 2px; }
.plus-pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 9px; border: 2px solid var(--plus); border-radius: 999px; background: none; color: var(--plus); font-weight: 800; font-size: 14px; }
.plus-pill .plus-logo { width: 22px; height: 22px; }
.plus-pill.active { background: var(--plus); color: var(--plus-ink); padding: 0 12px 0 8px; }
.plus-pill.active .plus-logo { background: var(--plus-ink); color: var(--plus); }
.plus-chip { background: color-mix(in srgb, var(--plus) 22%, transparent); color: var(--hi-text); }
.plus-row { box-shadow: inset 0 0 0 2px var(--plus), var(--shadow); }
.plus-row .plus-logo { width: 40px; height: 40px; border-radius: 12px; font-size: 28px; }
.plus-tile { border: 2px dashed var(--plus); box-shadow: none; background: none; justify-content: center; }
.plus-tile .plus-logo { width: 40px; height: 40px; border-radius: 12px; font-size: 28px; margin-bottom: 6px; }
.plus-hint { cursor: pointer; }
.check.pick.disabled { opacity: .45; }

/* Verschwommene Vorschau */
.locked { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.locked-preview { filter: blur(6px) saturate(.8); opacity: .65; pointer-events: none; user-select: none; }
.locked-cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px; text-align: center; background: color-mix(in srgb, var(--bg) 35%, transparent); }
.locked-cta strong { font-size: 17px; }
.locked-cta > span:not(.plus-logo):not(.locked-btn) { color: var(--muted); font-size: 13px; }
.locked-btn { margin-top: 8px; padding: 9px 16px; border-radius: 999px; background: var(--plus); color: var(--plus-ink); font-weight: 800; font-size: 14px; }

/* Plus-Seite */
.plus-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin-top: -8px; }
.plus-hero h2 { font-size: 26px; }
.plus-features { display: flex; flex-direction: column; gap: 12px; }
.plus-features li { display: flex; gap: 12px; align-items: center; }
.plus-features .tile-icon { background: color-mix(in srgb, var(--plus) 20%, transparent); color: var(--hi-text); flex: none; }
.plus-features strong { display: block; }
.code-input.small { font-size: 18px; letter-spacing: .08em; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.code-row { padding: 6px 4px 6px 12px; }
.calib-line { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; }
.calib-dot { fill: hsl(calc(140 - var(--feel) * 14) 60% 45%); stroke: var(--surface); stroke-width: 2; }

/* Plus am Profilbild statt hinter dem Namen */
.avatar-ring { position: relative; display: inline-grid; flex: none; padding: 2px; border-radius: 50%; background: var(--plus); }
.avatar-ring > .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatar-plus { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--plus); color: var(--plus-ink); font-style: normal; font-weight: 900; font-size: 13px; line-height: 1; box-shadow: 0 0 0 2px var(--surface); }
.avatar-ring.small .avatar-plus { width: 14px; height: 14px; font-size: 11px; right: -4px; bottom: -4px; }
.avatar-ring.xxl .avatar-plus, .avatar-ring.xl .avatar-plus { width: 28px; height: 28px; font-size: 20px; right: 2px; bottom: 2px; }
.avatars.big .avatar-ring > .avatar { width: 40px; height: 40px; }
/* Code-Feld: Eingabe darf schrumpfen, Knopf bleibt daneben */
.add-bar input { min-width: 0; flex: 1; }
.add-bar .btn { flex: none; }
.plus-sheet .add-bar .btn { width: auto; padding: 0 16px; }
.avatar-ring { padding: 4px; }

/* Kein Gummiband-Effekt beim Über-Scrollen: auf dem iPhone (vor allem als App vom Home-Bildschirm)
   zieht er sonst die feste Leiste unten und die Kopfzeile mit nach oben bzw. unten */
html, body { overscroll-behavior: none; }
html { height: 100%; }
body { min-height: 100%; }
.tabs { will-change: transform; -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }

/* Kamera drehen, Licht beim Scannen */
.camera video { transform: none; }
.camera video.mirror { transform: scaleX(-1); }
.cam-flip { justify-self: end; }
.torch-btn { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgb(0 0 0 / 55%); color: #fff; }
.torch-btn.on { background: var(--hi); color: var(--hi-ink); }

/* ------------------------------------------------------------ Fester Rahmen
   Die Seite selbst scrollt nicht mehr. Kopfzeile und Leiste gehören zum Rahmen, nur der Inhalt (#view) scrollt.
   So kann die Leiste unten auf dem iPhone nicht mehr mitwandern. */
html, body { height: 100%; overflow: hidden; }
#app { position: relative; height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
.top { position: static; flex: none; }
#view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.tabs { position: absolute; }
.time-edit { border: 0; background: none; padding: 6px 4px; text-decoration: underline dotted; text-underline-offset: 3px; }
.toast { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.toast button { border: 0; background: none; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; padding: 0; }
.report-photo { width: 100%; max-height: 320px; object-fit: contain; border-radius: var(--radius-md); background: var(--surface-2); }

/* Kaufen in der iOS-App */
.buy-btn { display: flex; justify-content: center; align-items: baseline; gap: 8px; }
.buy-btn span { font-weight: 500; opacity: .85; }
