/* Wochenplaner – eigenständiges Styling, unabhängig vom Theme. */

:root {
    --wpl-bg: #f5f3ee;
    --wpl-surface: #ffffff;
    --wpl-surface-2: #f4f2ed;
    --wpl-surface-3: #eae7e0;
    --wpl-text: #1d1b18;
    --wpl-muted: #736d65;
    --wpl-faint: #a39e95;
    --wpl-line: rgba(29, 27, 24, 0.09);
    --wpl-accent: #0f7a55;
    --wpl-accent-ink: #ffffff;
    --wpl-accent-soft: rgba(15, 122, 85, 0.11);
    --wpl-hot: #cf3f2f;
    --wpl-warm: #b87700;
    --wpl-cool: #1f8a5a;
    --wpl-shadow: 0 1px 2px rgba(29, 27, 24, 0.04), 0 8px 24px -12px rgba(29, 27, 24, 0.14);
    --wpl-shadow-lg: 0 24px 60px -16px rgba(29, 27, 24, 0.4);
    --wpl-radius: 20px;
    --wpl-radius-sm: 14px;
    --wpl-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --wpl-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --wpl-bg: #131312;
        --wpl-surface: #1e1d1b;
        --wpl-surface-2: #272623;
        --wpl-surface-3: #322f2c;
        --wpl-text: #f3f1ec;
        --wpl-muted: #a59f96;
        --wpl-faint: #726d66;
        --wpl-line: rgba(255, 255, 255, 0.09);
        --wpl-accent: #3ecf8e;
        --wpl-accent-ink: #04200f;
        --wpl-accent-soft: rgba(62, 207, 142, 0.15);
        --wpl-hot: #ff8070;
        --wpl-warm: #f0b44a;
        --wpl-cool: #52cf95;
        --wpl-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
        --wpl-shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, 0.8);
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.wpl-body {
    margin: 0;
    min-height: 100dvh;
    background: var(--wpl-bg);
    color: var(--wpl-text);
    font: 16px/1.45 var(--wpl-font);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

:where(.wpl-body) button {
    font: inherit;
    color: inherit;
}

.wpl-body [hidden] {
    display: none !important;
}

.wpl-body :focus-visible {
    outline: 2.5px solid var(--wpl-accent);
    outline-offset: 2px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wpl-icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ------------------------------------------------------------------ Layout & Kopf */

.wpl {
    max-width: 640px;
    margin: 0 auto;
    padding:
        max(20px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        calc(48px + env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
}

.wpl-header {
    padding: 4px 4px 22px;
}

.wpl-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    margin: 0 0 22px -8px;
}

.wpl-header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.wpl-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    color: var(--wpl-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.wpl-header__actions .wpl-back {
    padding-left: 12px;
}

@media (hover: hover) {
    .wpl-back:hover {
        background: var(--wpl-surface-3);
        color: var(--wpl-text);
    }
}

.wpl-back svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wpl-eyebrow {
    margin: 0 0 6px;
    color: var(--wpl-accent);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.wpl-title {
    margin: 0;
    font-size: clamp(32px, 9vw, 44px);
    font-weight: 850;
    line-height: 1.02;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.wpl-note {
    color: var(--wpl-muted);
}

/* ------------------------------------------------------------------ Fortschritt & Vergangenheit */

.wpl-summary {
    margin: 0 4px 18px;
}

.wpl-summary__text {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 9px;
    color: var(--wpl-muted);
    font-size: 14px;
    font-weight: 500;
}

.wpl-summary__text strong {
    color: var(--wpl-text);
}

.wpl-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--wpl-surface-3);
}

.wpl-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--wpl-accent);
    transition: width 0.6s var(--wpl-ease);
}

.wpl-past-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 12px;
    padding: 11px 14px;
    border: 1.5px dashed color-mix(in srgb, var(--wpl-text) 15%, transparent);
    border-radius: var(--wpl-radius-sm);
    background: transparent;
    color: var(--wpl-muted);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

@media (hover: hover) {
    .wpl-past-toggle:hover {
        background: color-mix(in srgb, var(--wpl-text) 4%, transparent);
        color: var(--wpl-text);
    }
}

.wpl-past-toggle__chevron {
    margin-left: auto;
    transition: transform 0.3s var(--wpl-ease);
}

.wpl-past-toggle[aria-expanded="true"] .wpl-past-toggle__chevron {
    transform: rotate(180deg);
}

/* ------------------------------------------------------------------ Tage */

.wpl-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wpl-days--past {
    margin-bottom: 18px;
    animation: wpl-fade-down 0.35s var(--wpl-ease);
}

.wpl-day {
    position: relative;
    border-radius: var(--wpl-radius);
    background: var(--wpl-surface);
    box-shadow: var(--wpl-shadow);
    scroll-margin-top: 14px;
    transition: box-shadow 0.25s;
}

.wpl-day.is-today {
    box-shadow: 0 0 0 2px var(--wpl-accent), var(--wpl-shadow);
}

.wpl-day.is-past {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--wpl-line);
    opacity: 0.58;
    filter: grayscale(1);
}

.wpl-day__head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px 10px 10px;
}

.wpl-day__toggle {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin: 0;
    padding: 2px;
    border: 0;
    border-radius: 14px;
    background: none;
    text-align: left;
    cursor: pointer;
}

div.wpl-day__toggle {
    cursor: default;
}

.wpl-date {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 56px;
    border-radius: 15px;
    background: var(--wpl-surface-2);
    line-height: 1;
    transition: background 0.3s, color 0.3s;
}

.wpl-day.has-dish .wpl-date {
    background: color-mix(in srgb, var(--cat) 16%, transparent);
    color: color-mix(in srgb, var(--cat) 62%, var(--wpl-text));
}

.wpl-day.is-today .wpl-date {
    background: var(--wpl-accent);
    color: var(--wpl-accent-ink);
}

.wpl-day.is-saved .wpl-date {
    animation: wpl-saved 0.6s var(--wpl-ease);
}

.wpl-date__wd {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 0.8;
}

.wpl-date__num {
    margin-top: 4px;
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.wpl-day__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.wpl-day__label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    color: var(--wpl-muted);
    font-size: 13px;
    font-weight: 650;
}

.wpl-day.is-today .wpl-day__label {
    color: var(--wpl-accent);
}

.wpl-day__dish {
    display: -webkit-box;
    overflow: hidden;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.012em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    transition: opacity 0.2s;
}

.wpl-day__dish.is-empty {
    color: var(--wpl-faint);
    font-weight: 500;
}

.wpl-day.is-pending .wpl-day__dish {
    opacity: 0.55;
}

.wpl-day__chevron {
    color: var(--wpl-faint);
    transition: transform 0.35s var(--wpl-ease);
}

.wpl-day.is-open .wpl-day__chevron,
.wpl-cat.is-open .wpl-cat__chevron {
    transform: rotate(180deg);
}

/* ------------------------------------------------------------------ Auf- und Zuklappen */

.wpl-collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.38s var(--wpl-ease);
}

.is-open > .wpl-collapse {
    grid-template-rows: 1fr;
}

.wpl-collapse__inner {
    min-height: 0;
    overflow: hidden;
}

.wpl-collapse__inner > * {
    opacity: 0;
    transition: opacity 0.2s;
}

.is-open > .wpl-collapse > .wpl-collapse__inner > * {
    opacity: 1;
    transition-delay: 0.06s;
}

/* ------------------------------------------------------------------ Badges & Buttons */

.wpl-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px 2px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cat, var(--wpl-faint)) 16%, transparent);
    color: color-mix(in srgb, var(--cat, var(--wpl-faint)) 66%, var(--wpl-text));
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    white-space: nowrap;
}

.wpl-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cat, var(--wpl-faint));
}

.tone-hot {
    --tone: var(--wpl-hot);
}

.tone-warm {
    --tone: var(--wpl-warm);
}

.tone-cool {
    --tone: var(--wpl-cool);
}

.tone-never {
    --tone: var(--wpl-faint);
}

.wpl-ago {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tone) 13%, transparent);
    color: color-mix(in srgb, var(--tone) 82%, var(--wpl-text));
    font-size: 12px;
    font-weight: 650;
    line-height: 18px;
    white-space: nowrap;
}

.wpl-dice {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: var(--wpl-surface-2);
    color: var(--wpl-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

@media (hover: hover) {
    .wpl-dice:hover {
        background: var(--wpl-accent-soft);
        color: var(--wpl-accent);
    }
}

.wpl-dice:active {
    transform: scale(0.9);
}

.wpl-dice .wpl-icon {
    width: 22px;
    height: 22px;
}

.wpl-dice--sm {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: transparent;
}

.wpl-dice--sm .wpl-icon {
    width: 20px;
    height: 20px;
}

.wpl-dice.is-rolling .wpl-icon {
    animation: wpl-roll 0.55s var(--wpl-ease);
}

.wpl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.wpl-btn:active {
    transform: scale(0.97);
}

.wpl-btn .wpl-icon {
    width: 18px;
    height: 18px;
}

.wpl-btn--primary {
    background: var(--wpl-accent);
    color: var(--wpl-accent-ink);
}

@media (hover: hover) {
    .wpl-btn--primary:hover {
        background: color-mix(in srgb, var(--wpl-accent) 88%, #000);
    }
}

.wpl-btn--ghost {
    background: var(--wpl-surface);
    box-shadow: inset 0 0 0 1px var(--wpl-line);
}

@media (hover: hover) {
    .wpl-btn--ghost:hover {
        background: var(--wpl-surface-2);
    }
}

.wpl-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0;
    padding: 7px 12px 7px 9px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--wpl-muted);
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.wpl-link .wpl-icon {
    width: 16px;
    height: 16px;
}

@media (hover: hover) {
    .wpl-link:hover {
        background: color-mix(in srgb, var(--wpl-hot) 10%, transparent);
        color: var(--wpl-hot);
    }
}

/* ------------------------------------------------------------------ Kategorien */

.wpl-day__body {
    padding: 2px 12px 14px;
}

.wpl-cats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wpl-cat {
    border-radius: var(--wpl-radius-sm);
    background: var(--wpl-surface-2);
    transition: box-shadow 0.25s;
}

.wpl-cat.is-selected {
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cat) 55%, transparent);
}

.wpl-cat__head {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 4px 3px 0;
}

.wpl-cat__toggle {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 8px 10px 14px;
    border: 0;
    border-radius: 12px;
    background: none;
    text-align: left;
    cursor: pointer;
}

.wpl-cat__dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cat);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat) 20%, transparent);
}

.wpl-cat__text {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    min-width: 0;
}

.wpl-cat__name {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 15px;
    font-weight: 750;
}

.wpl-cat__count {
    color: var(--wpl-faint);
    font-size: 12px;
    font-weight: 650;
}

.wpl-cat__chevron {
    width: 18px;
    height: 18px;
    color: var(--wpl-faint);
    transition: transform 0.35s var(--wpl-ease);
}

.wpl-cat__body {
    padding: 0 8px 10px;
}

/* ------------------------------------------------------------------ Gerichte */

.wpl-dishes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.wpl-dish {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: var(--wpl-surface);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.2s, transform 0.15s;
}

@media (hover: hover) {
    .wpl-dish:hover {
        background: color-mix(in srgb, var(--cat) 7%, var(--wpl-surface));
    }
}

.wpl-dish:active {
    transform: scale(0.985);
}

.wpl-dish.is-selected {
    background: var(--wpl-accent-soft);
    box-shadow: inset 0 0 0 1.5px var(--wpl-accent);
}

.wpl-dish.is-new {
    animation: wpl-new 1.8s var(--wpl-ease);
}

.wpl-dish__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.wpl-dish__name {
    font-size: 15px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.wpl-dish__meta {
    color: color-mix(in srgb, var(--tone) 75%, var(--wpl-muted));
    font-size: 12px;
    font-weight: 550;
}

.wpl-dish__check {
    color: var(--wpl-accent);
    stroke-width: 2.6;
}

.wpl-empty {
    margin: 0 4px 10px;
    color: var(--wpl-muted);
    font-size: 14px;
}

.wpl-add {
    display: flex;
    gap: 6px;
    transition: opacity 0.2s;
}

.wpl-add input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1.5px dashed color-mix(in srgb, var(--wpl-text) 17%, transparent);
    border-radius: 12px;
    background: transparent;
    color: var(--wpl-text);
    font: inherit;
    font-size: 16px; /* verhindert Auto-Zoom auf iOS */
    transition: border-color 0.2s, background 0.2s;
}

.wpl-add input::placeholder {
    color: var(--wpl-faint);
}

.wpl-add input:focus {
    border-style: solid;
    border-color: var(--wpl-accent);
    outline: none;
    background: var(--wpl-surface);
}

.wpl-add__btn {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--wpl-text);
    color: var(--wpl-bg);
    cursor: pointer;
    transition: transform 0.15s;
}

.wpl-add__btn:active {
    transform: scale(0.92);
}

.wpl-add.is-busy {
    opacity: 0.55;
    pointer-events: none;
}

/* ------------------------------------------------------------------ Zufallsvorschlag */

.wpl-suggest {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 12px 12px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--wpl-accent) 28%, transparent);
    border-radius: 16px;
    background: linear-gradient(140deg, var(--wpl-accent-soft), color-mix(in srgb, var(--wpl-accent) 3%, transparent));
    animation: wpl-pop 0.35s var(--wpl-ease);
}

.wpl-cat .wpl-suggest {
    margin: 0 8px 10px;
}

.wpl-suggest__close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--wpl-muted);
    cursor: pointer;
}

@media (hover: hover) {
    .wpl-suggest__close:hover {
        background: color-mix(in srgb, var(--wpl-text) 7%, transparent);
        color: var(--wpl-text);
    }
}

.wpl-suggest__close .wpl-icon {
    width: 18px;
    height: 18px;
}

.wpl-suggest__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 34px;
    animation: wpl-slot 0.4s var(--wpl-ease);
}

.wpl-suggest__eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--wpl-accent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.wpl-suggest__eyebrow .wpl-icon {
    width: 16px;
    height: 16px;
}

.wpl-suggest__name {
    font-size: 21px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.wpl-suggest__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.wpl-suggest__actions {
    display: flex;
    gap: 8px;
}

.wpl-suggest__actions .wpl-btn {
    flex: 1;
    padding: 0 12px;
}

/* ------------------------------------------------------------------ Dialog & Toast */

.wpl-sheet {
    width: 100%;
    max-width: min(460px, 100%);
    max-height: 100%;
    margin: auto auto 0;
    padding: 0;
    border: 0;
    border-radius: 26px 26px 0 0;
    background: var(--wpl-surface);
    color: var(--wpl-text);
    box-shadow: var(--wpl-shadow-lg);
}

.wpl-sheet[open] {
    animation: wpl-sheet-in 0.38s var(--wpl-ease);
}

.wpl-sheet::backdrop {
    background: rgba(20, 18, 15, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: wpl-fade 0.3s ease;
}

@media (min-width: 600px) {
    .wpl-sheet {
        margin: auto;
        border-radius: 26px;
    }

    .wpl-sheet[open] {
        animation-name: wpl-pop;
    }
}

.wpl-sheet__inner {
    padding: 26px 20px calc(20px + env(safe-area-inset-bottom));
    text-align: center;
}

.wpl-sheet__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 17px;
    background: var(--wpl-accent-soft);
    color: var(--wpl-accent);
}

.wpl-sheet__icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wpl-sheet__title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.wpl-sheet__text {
    margin: 0 0 22px;
    color: var(--wpl-muted);
}

.wpl-sheet__text strong {
    color: var(--wpl-text);
}

.wpl-sheet__actions {
    display: flex;
    gap: 10px;
}

.wpl-sheet__actions .wpl-btn {
    flex: 1;
    height: 50px;
}

.wpl-toast {
    position: fixed;
    z-index: 20;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 50%;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--wpl-text);
    color: var(--wpl-bg);
    box-shadow: var(--wpl-shadow-lg);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity 0.25s, transform 0.3s var(--wpl-ease);
}

.wpl-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------ Übersicht */

.wpl-plans {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.wpl-plan {
    display: flex;
    align-items: center;
    border-radius: var(--wpl-radius);
    background: var(--wpl-surface);
    box-shadow: var(--wpl-shadow);
    transition: transform 0.2s var(--wpl-ease), box-shadow 0.2s;
}

@media (hover: hover) {
    .wpl-plan:hover {
        transform: translateY(-2px);
    }
}

.wpl-plan__link {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px 4px 18px 20px;
    border-radius: var(--wpl-radius) 0 0 var(--wpl-radius);
    color: inherit;
    text-decoration: none;
}

.wpl-plan__more {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: 8px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: none;
    color: var(--wpl-faint);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

@media (hover: hover) {
    .wpl-plan__more:hover {
        background: var(--wpl-surface-2);
        color: var(--wpl-text);
    }
}

.wpl-plan__people {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    color: var(--wpl-muted);
    font-size: 13px;
    font-weight: 600;
}

.wpl-plan__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.wpl-plan__title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.wpl-plan__meta {
    color: var(--wpl-muted);
    font-size: 14px;
}

.wpl-plan__count {
    flex: none;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--wpl-surface-2);
    color: var(--wpl-muted);
    font-size: 13px;
    font-weight: 600;
}

.wpl-plan__count strong {
    color: var(--wpl-text);
}

.wpl-create {
    padding: 20px;
    border-radius: var(--wpl-radius);
    background: var(--wpl-surface);
    box-shadow: var(--wpl-shadow);
}

.wpl-create__title {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.wpl-create__hint {
    margin: 0 0 16px;
    color: var(--wpl-muted);
    font-size: 14px;
}

.wpl-create__error {
    margin: 10px 0 0;
    color: var(--wpl-hot);
    font-size: 14px;
    font-weight: 650;
}

.wpl-add--large input {
    height: 50px;
    border-style: solid;
    border-color: var(--wpl-line);
    background: var(--wpl-surface-2);
}

.wpl-add--large .wpl-btn {
    height: 50px;
}

/* ------------------------------------------------------------------ Konto-Button */

.wpl-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--wpl-surface);
    box-shadow: var(--wpl-shadow);
    color: var(--wpl-text);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

@media (hover: hover) {
    .wpl-avatar:hover {
        background: var(--wpl-accent-soft);
        color: var(--wpl-accent);
    }
}

.wpl-avatar:active {
    transform: scale(0.94);
}

@media (max-width: 420px) {
    .wpl-hide-sm {
        display: none;
    }
}

/* ------------------------------------------------------------------ Anmeldung & Registrierung */

.wpl--auth {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 440px;
    min-height: 100dvh;
}

.wpl-auth {
    animation: wpl-rise 0.5s var(--wpl-ease);
}

.wpl-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
    margin: 0 4px 30px;
    border-radius: 16px;
    color: var(--wpl-text);
    text-decoration: none;
}

.wpl-logo {
    display: block;
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    box-shadow: 0 12px 28px -12px rgba(15, 122, 85, 0.75);
    transform: rotate(-6deg);
    transition: transform 0.35s var(--wpl-ease);
}

@media (hover: hover) {
    .wpl-brand:hover .wpl-logo {
        transform: rotate(0deg) scale(1.04);
    }
}

.wpl-wordmark {
    font-size: 20px;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.wpl-wordmark span {
    color: var(--wpl-accent);
}

.wpl-auth > .wpl-alert {
    margin: 0 0 22px;
}

.wpl-auth__head {
    padding: 0 4px 24px;
}

.wpl-lead {
    margin: 12px 0 0;
    color: var(--wpl-muted);
    font-size: 16px;
    line-height: 1.5;
}

.wpl-lead strong {
    color: var(--wpl-text);
    overflow-wrap: anywhere;
}

.wpl-card,
.wpl-panel {
    padding: 22px 20px;
    border-radius: var(--wpl-radius);
    background: var(--wpl-surface);
    box-shadow: var(--wpl-shadow);
}

.wpl-card__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 17px;
    background: var(--wpl-accent-soft);
    color: var(--wpl-accent);
}

.wpl-card__icon .wpl-icon {
    width: 26px;
    height: 26px;
}

.wpl-card__text {
    margin: 0 0 18px;
    color: var(--wpl-muted);
    font-size: 15px;
    text-align: center;
}

.wpl-auth__foot {
    margin: 22px 0 0;
    color: var(--wpl-muted);
    font-size: 15px;
    text-align: center;
}

.wpl-textlink {
    border-radius: 4px;
    color: var(--wpl-accent);
    font-weight: 700;
    text-decoration: none;
}

@media (hover: hover) {
    .wpl-textlink:hover {
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

.wpl-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: var(--wpl-faint);
    font-size: 13px;
    font-weight: 650;
}

.wpl-divider::before,
.wpl-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--wpl-line);
}

/* ------------------------------------------------------------------ Formulare */

.wpl-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wpl-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px 12px;
}

.wpl-form__actions {
    display: flex;
    justify-content: flex-end;
}

.wpl-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.wpl-label {
    font-size: 14px;
    font-weight: 700;
}

.wpl-label__optional {
    color: var(--wpl-faint);
    font-weight: 550;
}

.wpl-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.wpl-label-row .wpl-textlink {
    font-size: 14px;
}

.wpl-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1.5px solid var(--wpl-line);
    border-radius: 12px;
    background: var(--wpl-surface-2);
    color: var(--wpl-text);
    font: inherit;
    font-size: 16px; /* verhindert Auto-Zoom auf iOS */
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.wpl-input::placeholder {
    color: var(--wpl-faint);
}

.wpl-input:focus {
    border-color: var(--wpl-accent);
    outline: none;
    background: var(--wpl-surface);
    box-shadow: 0 0 0 4px var(--wpl-accent-soft);
}

.wpl-input[aria-invalid="true"] {
    border-color: var(--wpl-hot);
}

.wpl-input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--wpl-hot) 14%, transparent);
}

.wpl-input-wrap {
    position: relative;
}

.wpl-input-wrap .wpl-input {
    padding-right: 52px;
}

.wpl-reveal {
    position: absolute;
    top: 3px;
    right: 3px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--wpl-faint);
    cursor: pointer;
    transition: color 0.2s;
}

@media (hover: hover) {
    .wpl-reveal:hover {
        color: var(--wpl-text);
    }
}

.wpl-reveal[aria-pressed="false"] .wpl-reveal__hide,
.wpl-reveal[aria-pressed="true"] .wpl-reveal__show {
    display: none;
}

.wpl-field__hint,
.wpl-field__error {
    margin: 0;
    font-size: 13px;
}

.wpl-field__hint {
    color: var(--wpl-muted);
}

.wpl-field__error {
    color: var(--wpl-hot);
    font-weight: 650;
}

.wpl-check {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    font-size: 15px;
    font-weight: 550;
    cursor: pointer;
}

.wpl-check input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--wpl-accent);
    cursor: pointer;
}

.wpl-btn--block {
    width: 100%;
    height: 50px;
}

.wpl-btn[disabled],
.wpl-btn.is-busy {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.wpl-btn--danger {
    background: var(--wpl-hot);
    color: #fff;
}

@media (hover: hover) {
    .wpl-btn--danger:hover {
        background: color-mix(in srgb, var(--wpl-hot) 88%, #000);
    }
}

a.wpl-btn {
    text-decoration: none;
}

.wpl-btn--ghost {
    color: var(--wpl-text);
}

.wpl-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    animation: wpl-pop 0.3s var(--wpl-ease);
}

.wpl-alert--after {
    margin: 12px 0 0;
}

.wpl-alert--error {
    background: color-mix(in srgb, var(--wpl-hot) 11%, transparent);
    color: color-mix(in srgb, var(--wpl-hot) 78%, var(--wpl-text));
}

.wpl-alert--info {
    background: var(--wpl-accent-soft);
    color: color-mix(in srgb, var(--wpl-accent) 70%, var(--wpl-text));
}

.wpl-alert--success {
    background: color-mix(in srgb, var(--wpl-cool) 12%, transparent);
    color: color-mix(in srgb, var(--wpl-cool) 70%, var(--wpl-text));
}

.wpl-alert a {
    color: inherit;
    font-weight: 750;
    text-underline-offset: 3px;
}

/* Honeypot gegen Spam-Registrierungen */
.wpl-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ------------------------------------------------------------------ Konto */

.wpl-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wpl-panel__title {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.wpl-panel__hint {
    margin: 0 0 18px;
    color: var(--wpl-muted);
    font-size: 14px;
}

.wpl-panel > .wpl-field__hint {
    margin-bottom: 12px;
}

.wpl-keys {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.wpl-key {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px 10px 10px;
    border-radius: var(--wpl-radius-sm);
    background: var(--wpl-surface-2);
}

.wpl-key__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--wpl-accent-soft);
    color: var(--wpl-accent);
}

.wpl-key__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.wpl-key__name {
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.wpl-key__meta {
    color: var(--wpl-muted);
    font-size: 13px;
}

.wpl-key form {
    margin: 0;
}

.wpl-icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--wpl-faint);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

@media (hover: hover) {
    .wpl-icon-btn:hover {
        background: color-mix(in srgb, var(--wpl-hot) 10%, transparent);
        color: var(--wpl-hot);
    }
}

.wpl-sheet__icon--danger {
    background: color-mix(in srgb, var(--wpl-hot) 12%, transparent);
    color: var(--wpl-hot);
}

.wpl-sheet__icon .wpl-icon {
    width: 26px;
    height: 26px;
}

/* ------------------------------------------------------------------ Mitglieder & Einladungen */

.wpl-face {
    --face: var(--wpl-faint);
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--face) 22%, var(--wpl-surface));
    color: color-mix(in srgb, var(--face) 75%, var(--wpl-text));
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.wpl-faces {
    display: inline-flex;
    flex: none;
}

.wpl-faces .wpl-face {
    box-shadow: 0 0 0 2.5px var(--wpl-bg);
}

.wpl-faces .wpl-face + .wpl-face {
    margin-left: -8px;
}

.wpl-panel .wpl-faces .wpl-face,
.wpl-card .wpl-faces .wpl-face,
.wpl-plan .wpl-faces .wpl-face {
    box-shadow: 0 0 0 2.5px var(--wpl-surface);
}

.wpl-faces--small .wpl-face {
    width: 22px;
    height: 22px;
    font-size: 10.5px;
}

.wpl-faces--small .wpl-face + .wpl-face {
    margin-left: -6px;
}

.wpl-faces--large {
    display: flex;
    justify-content: center;
    margin: 4px 0 16px;
}

.wpl-faces--large .wpl-face {
    width: 48px;
    height: 48px;
    font-size: 19px;
}

.wpl-faces--large .wpl-face + .wpl-face {
    margin-left: -12px;
}

.wpl-people {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
}

.wpl-people__who {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-left: -6px;
    padding: 5px 12px 5px 6px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--wpl-muted);
    font-size: 14px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

@media (hover: hover) {
    .wpl-people__who:hover {
        background: var(--wpl-surface-3);
        color: var(--wpl-text);
    }
}

.wpl-people__names {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpl-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--wpl-accent-soft);
    color: var(--wpl-accent);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.wpl-chip .wpl-icon {
    width: 18px;
    height: 18px;
}

@media (hover: hover) {
    .wpl-chip:hover {
        background: color-mix(in srgb, var(--wpl-accent) 20%, transparent);
    }
}

.wpl-chip:active {
    transform: scale(0.96);
}

.wpl-invitation {
    margin-bottom: 14px;
    box-shadow: 0 0 0 2px var(--wpl-accent), var(--wpl-shadow);
}

.wpl-invitation__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.wpl-invitation__head .wpl-eyebrow {
    margin: 0;
}

.wpl-answer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wpl-answer form {
    margin: 0;
}

.wpl-stack--tight {
    gap: 10px;
}

/* Sheet mit Mitgliederliste */

.wpl-sheet__inner--start {
    text-align: left;
}

.wpl-sheet__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.wpl-sheet__head .wpl-sheet__title {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
}

.wpl-sheet__head form {
    margin: -4px -6px 0 0;
}

.wpl-sheet__label {
    margin: 18px 0 8px;
    color: var(--wpl-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.wpl-sheet__hint {
    margin: -2px 0 12px;
    color: var(--wpl-muted);
    font-size: 14px;
}

.wpl-sheet__status {
    margin: 8px 0 0;
    color: var(--wpl-cool);
    font-size: 13px;
    font-weight: 650;
}

.wpl-sheet__inner--start > .wpl-btn--block {
    margin-top: 12px;
}

.wpl-sheet__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--wpl-line);
}

.wpl-sheet__foot form {
    margin: 0;
}

.wpl-members {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wpl-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 15px;
    font-weight: 650;
}

.wpl-member .wpl-face {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

.wpl-member__name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.wpl-member__you {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--wpl-surface-2);
    color: var(--wpl-muted);
    font-size: 12px;
    font-weight: 700;
}

.wpl-invite {
    display: flex;
    gap: 6px;
}

.wpl-invite__url {
    height: 46px;
    color: var(--wpl-muted);
    font-size: 14px;
    text-overflow: ellipsis;
}

.wpl-icon-btn--soft {
    width: 46px;
    height: 46px;
    background: var(--wpl-surface-2);
    color: var(--wpl-text);
}

@media (hover: hover) {
    .wpl-icon-btn--soft:hover {
        background: var(--wpl-surface-3);
        color: var(--wpl-text);
    }
}

.wpl-textbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--wpl-muted);
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.wpl-textbtn .wpl-icon {
    width: 17px;
    height: 17px;
}

@media (hover: hover) {
    .wpl-textbtn:hover {
        background: var(--wpl-surface-2);
        color: var(--wpl-text);
    }

    .wpl-textbtn--danger:hover {
        background: color-mix(in srgb, var(--wpl-hot) 10%, transparent);
        color: var(--wpl-hot);
    }
}

.wpl-textbtn--danger {
    color: var(--wpl-hot);
}

.wpl-sheet__foot .wpl-textbtn:first-child {
    margin-left: -10px;
}

.wpl-sheet__foot form:last-child .wpl-textbtn {
    margin-right: -10px;
}

/* ------------------------------------------------------------------ Erinnerungen & App */

.wpl-push {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.wpl-push:has(> :not([hidden])) {
    margin-bottom: 20px;
}

.wpl-push .wpl-alert {
    width: 100%;
    margin: 0;
}

.wpl-push__status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 700;
}

.wpl-push__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wpl-cool);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--wpl-cool) 20%, transparent);
}

.wpl-push__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wpl-push__time {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-top: 16px;
    border-top: 1px solid var(--wpl-line);
}

.wpl-push__row {
    display: flex;
    gap: 8px;
}

.wpl-push__row .wpl-btn {
    height: 50px;
}

.wpl-select {
    max-width: 200px;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23918b82' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 18px;
    appearance: none;
    cursor: pointer;
}

.wpl-install__hint {
    margin: 0;
    color: var(--wpl-muted);
    font-size: 15px;
}

.wpl-install__hint strong {
    color: var(--wpl-text);
}

/* ------------------------------------------------------------------ Marke, Mahlzeit, Rechtliches */

/* "Woche planen" – immer gleich hervorgehoben, wie ein Textmarker */
.wpl-mark {
    padding: 0 0.12em;
    border-radius: 0.2em;
    background: linear-gradient(transparent 58%, color-mix(in srgb, var(--wpl-accent) 22%, transparent) 58%);
    color: var(--wpl-accent);
    font-weight: 750;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/*
 * Überschrift auf der Startseite: "Abendessen?" ⇄ "Mittagessen?"
 * Die Buchstaben gleiten einzeln aus einer unsichtbaren Kante herauf (Maske = overflow),
 * danach zieht ein Textmarker-Strich unter dem Wort durch – wie bei "Woche planen".
 */
.wpl-rotator {
    --wpl-rotate-ease: cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-grid;
    overflow: hidden;
    /* Platz für Unterlängen (g) und den Strich, ohne die Zeilenhöhe zu ändern */
    margin: -0.08em 0 -0.2em;
    padding: 0.08em 0.04em 0.2em 0;
    color: var(--wpl-accent);
}

.wpl-rotator__word {
    position: relative;
    grid-area: 1 / 1;
    white-space: nowrap;
    isolation: isolate;
}

/* Ohne JavaScript (oder vor dem Aufteilen) ist nur das aktive Wort zu sehen. */
.wpl-rotator__word:not(.is-active, .is-leaving) {
    visibility: hidden;
}

.wpl-rotator__char {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(105%) rotate(6deg);
    transform-origin: left bottom;
    transition:
        transform 0.9s var(--wpl-rotate-ease) calc(0.12s + var(--i) * 0.035s),
        opacity 0.5s ease calc(0.12s + var(--i) * 0.035s),
        filter 0.6s ease calc(0.12s + var(--i) * 0.035s);
}

.wpl-rotator__word.is-active .wpl-rotator__char {
    opacity: 1;
    filter: none;
    transform: none;
}

.wpl-rotator__word.is-leaving .wpl-rotator__char {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(-105%) rotate(-4deg);
    transition-duration: 0.55s, 0.35s, 0.4s;
    transition-delay: calc(var(--i) * 0.022s);
    transition-timing-function: cubic-bezier(0.7, 0, 0.84, 0), ease, ease;
}

/* Textmarker-Strich: zieht nach den Buchstaben von links ein, geht nach rechts wieder raus */
.wpl-rotator__word::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: 0.06em;
    bottom: 0.02em;
    left: 0;
    height: 0.3em;
    border-radius: 0.15em;
    background: color-mix(in srgb, var(--wpl-accent) 22%, transparent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s cubic-bezier(0.7, 0, 0.84, 0);
}

.wpl-rotator__word.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.8s var(--wpl-rotate-ease) 0.55s;
}

/* Zurücksetzen nach dem Ausblenden, ohne sichtbare Rückwärts-Animation */
.wpl-rotator__word.is-reset .wpl-rotator__char,
.wpl-rotator__word.is-reset::after {
    transition: none;
}

.wpl-brand--small {
    gap: 10px;
    margin: 0;
}

.wpl-brand--small .wpl-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    box-shadow: 0 8px 18px -10px rgba(15, 122, 85, 0.75);
}

.wpl-brand--small .wpl-wordmark {
    font-size: 16px;
}

.wpl-header__bar .wpl-brand--small {
    margin-left: 8px;
}

.wpl-eyebrow--icon {
    display: flex;
    align-items: center;
    gap: 7px;
}

.wpl-eyebrow--icon .wpl-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
}

.wpl-meal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 6px;
    padding: 1px 8px 1px 6px;
    border-radius: 999px;
    background: var(--wpl-accent-soft);
    color: var(--wpl-accent);
    font-size: 12px;
    font-weight: 750;
    line-height: 18px;
    vertical-align: 1px;
}

.wpl-meal .wpl-icon {
    width: 13px;
    height: 13px;
    stroke-width: 2.5;
}

/* Umschalter Mittag/Abend */
.wpl-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 12px;
    padding: 4px;
    border: 0;
    border-radius: 14px;
    background: var(--wpl-surface-2);
}

.wpl-segment__option {
    position: relative;
    cursor: pointer;
}

.wpl-segment__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wpl-segment__option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    border-radius: 10px;
    color: var(--wpl-muted);
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.wpl-segment__option .wpl-icon {
    width: 17px;
    height: 17px;
}

.wpl-segment__option input:checked + span {
    background: var(--wpl-surface);
    box-shadow: var(--wpl-shadow);
    color: var(--wpl-accent);
}

.wpl-segment__option input:focus-visible + span {
    outline: 2.5px solid var(--wpl-accent);
    outline-offset: 2px;
}

.wpl-sheet .wpl-segment {
    background: var(--wpl-surface-2);
}

.wpl-form__note {
    margin: -4px 0 0;
    color: var(--wpl-muted);
    font-size: 13px;
    text-align: center;
}

/* Fußzeile mit Impressum & Datenschutz */
.wpl-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin-top: 36px;
    color: var(--wpl-faint);
    font-size: 13px;
    font-weight: 600;
}

.wpl-footer a {
    color: var(--wpl-muted);
    text-decoration: none;
}

@media (hover: hover) {
    .wpl-footer a:hover {
        color: var(--wpl-text);
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

.wpl--auth .wpl-footer {
    margin-top: 28px;
}

/* Konto löschen */
.wpl-danger {
    margin-top: 10px;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--wpl-line);
}

.wpl-danger__summary {
    color: var(--wpl-hot);
    font-weight: 750;
    list-style: none;
    cursor: pointer;
}

.wpl-danger__summary::-webkit-details-marker {
    display: none;
}

.wpl-danger[open] .wpl-danger__summary {
    margin-bottom: 8px;
}

/* Impressum & Datenschutz */
.wpl--doc {
    max-width: 720px;
}

.wpl--doc .wpl-header .wpl-brand--small {
    margin: 0 4px;
}

.wpl-prose {
    padding: 28px 24px 30px;
    font-size: 15.5px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.wpl-prose h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 7vw, 36px);
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.wpl-prose h2 {
    margin: 30px 0 8px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.wpl-prose p,
.wpl-prose ul {
    margin: 0 0 12px;
}

.wpl-prose ul {
    padding-left: 20px;
}

.wpl-prose li + li {
    margin-top: 6px;
}

.wpl-prose a {
    color: var(--wpl-accent);
    font-weight: 650;
    text-underline-offset: 3px;
}

.wpl-prose__lead {
    color: var(--wpl-muted);
    font-size: 17px;
}

.wpl-prose__meta {
    margin-top: 28px !important;
    color: var(--wpl-faint);
    font-size: 13px;
}

/* Noch auszufüllende Angaben – fallen absichtlich auf */
.wpl-todo {
    padding: 1px 6px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--wpl-hot) 16%, transparent);
    color: var(--wpl-hot);
    font-weight: 750;
}

@media (prefers-reduced-motion: reduce) {
    .wpl-rotator__char,
    .wpl-rotator__word::after {
        transition: none !important;
    }
}

/* ------------------------------------------------------------------ Animationen */

@keyframes wpl-roll {
    0% { transform: rotate(0) scale(1); }
    45% { transform: rotate(200deg) scale(0.78); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes wpl-pop {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
}

@keyframes wpl-slot {
    from { opacity: 0; transform: translateY(-10px); }
}

@keyframes wpl-fade {
    from { opacity: 0; }
}

@keyframes wpl-rise {
    from { opacity: 0; transform: translateY(12px); }
}

@keyframes wpl-fade-down {
    from { opacity: 0; transform: translateY(-8px); }
}

@keyframes wpl-sheet-in {
    from { transform: translateY(100%); }
}

@keyframes wpl-saved {
    35% { transform: scale(1.12); }
}

@keyframes wpl-new {
    0%, 30% {
        background: color-mix(in srgb, var(--cat) 22%, var(--wpl-surface));
        box-shadow: inset 0 0 0 1.5px var(--cat);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
