/* Farben, Schriften und Logo aus dem Shop-Theme (ZtwTheme) */

@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-v17-latin-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-v17-latin-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Prompt"; src: url("../fonts/prompt-v10-latin-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
    /* Marke */
    --brand: #00652a;
    --brand-strong: #004c1f;
    --brand-soft: #e6f2ea;
    --brand-line: #b9dbc5;
    --yellow: #fddd00;

    /* Neutral */
    --ink: #17211b;
    --muted: #59645e;
    --line: #dde4df;
    --bg: #f3f5f2;
    --surface: #ffffff;
    --surface-2: #f7f9f7;

    /* Zustände */
    --danger: #b3261e;
    --danger-soft: #fdecea;
    --danger-line: #f3c4bf;

    --on-brand: #ffffff;
    --on-brand-soft: rgba(255, 255, 255, .85);
    --on-brand-faint: rgba(255, 255, 255, .15);
    --on-brand-line: rgba(255, 255, 255, .25);
    --camera: #0d1410;
    --scrim: rgba(0, 0, 0, .32);
    --overlay: rgba(13, 20, 16, .72);
    --switch-off: #c9d2cc;
    --disabled-bg: #e9edea;
    --disabled-ink: #8a958e;
    --skeleton: #edf1ee;

    --radius-xs: 4px;
    --radius-s: 6px;
    --radius: 8px;
    --radius-l: 12px;
    --radius-round: 50%;
    --radius-pill: 999px;
    --tap: 56px;
    --ease-out: cubic-bezier(.2, .8, .2, 1);
    --font-body: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Prompt", var(--font-body);

    color-scheme: light;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    min-height: 100dvh;
    font-size: 17px;
    line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: .01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
p { margin: 0; }
a { color: var(--brand); }
img { max-width: 100%; height: auto; }

.icon { width: 1.3em; height: 1.3em; flex: none; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 12px; top: -60px; padding: 10px 14px; background: var(--ink); color: var(--on-brand); border-radius: var(--radius-s); z-index: 100; }
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Kopfzeile */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top);
}

.topbar__inner {
    max-width: 640px;
    margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}

.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.topbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.topbar__brand img { width: 132px; height: auto; display: block; }

.topbar__app {
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: var(--radius-xs);
    padding: 3px 10px;
    white-space: nowrap;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    color: var(--muted);
    text-decoration: none;
    transition: background-color .15s, color .15s, transform .1s;
    touch-action: manipulation;
}

.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.icon-button:active { transform: scale(.94); }

/* Seite */
.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    display: grid;
    gap: 20px;
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-s);
    font-weight: 700;
}

.notice--success { background: var(--brand-soft); color: var(--brand-strong); }
.notice--error { background: var(--danger-soft); color: var(--danger); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}

.btn:active { transform: scale(.97); }
.btn--block { display: flex; width: 100%; }
.btn--large { min-height: var(--tap); font-size: 1.12rem; }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-strong); }
.btn--secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn--secondary:hover { background: var(--brand-soft); }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Start */
.hello { display: grid; gap: 2px; }
.hello__date { color: var(--muted); font-weight: 700; }
.hello h1 { font-size: 1.9rem; }

.tile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-l);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    touch-action: manipulation;
    transition: transform .1s, background-color .15s, border-color .15s;
}

.tile:active { transform: scale(.98); }
.tile:hover { border-color: var(--brand-line); }
.tile__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); }
.tile__icon .icon { width: 30px; height: 30px; }
.tile__text { display: grid; gap: 2px; min-width: 0; }
.tile__text strong { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; }
.tile__text span { color: var(--muted); }
.tile__chevron { color: var(--muted); }

.tile--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); padding: 22px 18px; }
.tile--primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.tile--primary .tile__icon { background: var(--on-brand-faint); color: var(--on-brand); width: 64px; height: 64px; }
.tile--primary .tile__icon .icon { width: 34px; height: 34px; }
.tile--primary .tile__text strong { font-size: 1.5rem; }
.tile--primary .tile__text span, .tile--primary .tile__chevron { color: var(--on-brand-soft); }

.tiles-soon { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile--disabled { background: var(--surface-2); border-style: dashed; color: var(--muted); cursor: not-allowed; }
.tile--disabled:active { transform: none; }
.tile--disabled:hover { border-color: var(--line); }
.tile--disabled .tile__icon { background: var(--disabled-bg); color: var(--disabled-ink); }
.tile--disabled .tile__text strong { color: var(--muted); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat:active { transform: scale(.98); }
.stat { display: grid; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.stat__value { font-family: var(--font-head); font-size: 2.2rem; line-height: 1.1; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted); font-weight: 700; }

.latest { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.latest .icon { margin-top: 2px; }
.latest strong { color: var(--ink); }

/* Hilfe */
.doc { display: grid; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.doc p { color: var(--ink); }
.doc-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.doc-steps li::marker { font-family: var(--font-head); color: var(--brand); }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th, .doc-table td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc-table th { width: 40%; padding-right: 12px; color: var(--muted); }
.doc-table tr:last-child th, .doc-table tr:last-child td { border-bottom: 0; }
.doc-list, .doc-faq { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.doc-list li { display: flex; gap: 12px; align-items: flex-start; }
.doc-list .icon { color: var(--brand); margin-top: 2px; }
.doc-faq li { padding-left: 14px; border-left: 3px solid var(--brand-line); }
.doc-tech summary { font-family: var(--font-head); cursor: pointer; }
.doc-tech[open] summary { margin-bottom: 4px; }
.doc code { font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: var(--radius-xs); }

/* Anmelden / Einrichten */
.page-auth { background: linear-gradient(180deg, var(--brand) 0, var(--brand) 34vh, var(--bg) 34vh); }
.page-auth .page { min-height: 100dvh; align-content: center; }

.auth { display: grid; gap: 18px; padding: 28px 24px; }
.auth__logo { width: 210px; margin: 0 auto 4px; display: block; }
.auth__title { text-align: center; }
.auth__title h1 { font-size: 1.5rem; }
.auth__title p { color: var(--muted); margin-top: 4px; }
.auth__foot { text-align: center; color: var(--muted); font-size: .85rem; }

/* Formulare */
.form, .field-list { display: grid; gap: 18px; }
.form > div, .field { display: grid; gap: 6px; }
.form label, .field__label { font-weight: 700; }

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    color: var(--ink);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

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

.form .help-text { color: var(--muted); font-size: .9rem; }
.form ul { margin: 0; padding: 0; list-style: none; color: var(--danger); font-size: .95rem; font-weight: 700; }

.password { position: relative; }
.password input { padding-right: 56px; }
.password__toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-s);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

/* Symfony rendert Radio und Label als Geschwister */
.form [id$="_role"] { display: grid; gap: 10px; }
.form [id$="_role"] input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.form [id$="_role"] label {
    position: relative;
    display: block;
    padding: 14px 14px 14px 50px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    font-weight: 400;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.form [id$="_role"] label::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 2px solid var(--line);
    border-radius: var(--radius-round);
    background: var(--surface);
}

.form [id$="_role"] input:checked + label { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.form [id$="_role"] input:checked + label::before { border-color: var(--brand); box-shadow: inset 0 0 0 4px var(--surface); background: var(--brand); }
.form [id$="_role"] input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }
.form [id$="_role"] input:disabled + label { cursor: not-allowed; opacity: .7; }

.form > div:has(> input[type="checkbox"]) { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 12px; }

.form input[type="checkbox"] {
    appearance: none;
    width: 52px;
    height: 32px;
    margin: 0;
    border-radius: var(--radius-pill);
    background: var(--switch-off);
    position: relative;
    cursor: pointer;
    transition: background-color .2s;
    flex: none;
}

.form input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-round);
    background: var(--surface);
    transition: transform .2s var(--ease-out);
}

.form input[type="checkbox"]:checked { background: var(--brand); }
.form input[type="checkbox"]:checked::before { transform: translateX(20px); }
.form input[type="checkbox"]:disabled { opacity: .6; cursor: not-allowed; }

/* Scanner */
.scanner { display: grid; gap: 12px; }

.scanner__view {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 62dvh;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--radius-l);
    overflow: hidden;
    background: var(--camera);
}

.scanner__view video { width: 100%; height: 100%; object-fit: cover; display: block; }

.scanner__frame {
    position: absolute;
    inset: 17%;
    border-radius: var(--radius-l);
    box-shadow: 0 0 0 999px var(--scrim);
    pointer-events: none;
}

.scanner__corner { position: absolute; width: 38px; height: 38px; border: 0 solid var(--on-brand); }
.scanner__corner--tl { top: 0; left: 0; border-top-width: 5px; border-left-width: 5px; border-top-left-radius: var(--radius-l); }
.scanner__corner--tr { top: 0; right: 0; border-top-width: 5px; border-right-width: 5px; border-top-right-radius: var(--radius-l); }
.scanner__corner--bl { bottom: 0; left: 0; border-bottom-width: 5px; border-left-width: 5px; border-bottom-left-radius: var(--radius-l); }
.scanner__corner--br { bottom: 0; right: 0; border-bottom-width: 5px; border-right-width: 5px; border-bottom-right-radius: var(--radius-l); }

.scanner__line {
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 2px;
    background: var(--on-brand);
    opacity: .8;
}

.scanner__hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 28px);
    padding: 8px 14px;
    border-radius: var(--radius-s);
    background: var(--overlay);
    color: var(--on-brand);
    font-size: .92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scanner__hint.is-error { white-space: normal; text-align: center; border-radius: var(--radius); }

.scanner[hidden], .result[hidden] { display: none; }

/* Ergebnis-Karten */
.result { display: grid; }

.result-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    overflow: hidden;
    animation: card-in .22s var(--ease-out);
}

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

.result-card__head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }

.result-card__badge {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-round);
    color: var(--on-brand);
    flex: none;
}

.result-card__badge .icon { width: 26px; height: 26px; }
.result-card__label { font-family: var(--font-head); font-size: 1.15rem; }

.result-card--ok .result-card__head { background: var(--brand-soft); }
.result-card--ok .result-card__badge { background: var(--brand); }
.result-card--ok .result-card__label { color: var(--brand-strong); }

.result-card--blocked .result-card__head { background: var(--danger-soft); }
.result-card--blocked .result-card__badge { background: var(--danger); }
.result-card--blocked .result-card__label { color: var(--danger); }

.result-card__body { display: grid; gap: 16px; padding: 20px; }

.order { display: grid; gap: 2px; }
.order__eyebrow { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.order__number { font-family: var(--font-head); font-size: 2.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.order__name { font-size: 1.2rem; }

.problems { display: grid; gap: 8px; margin: 0; padding: 14px; list-style: none; border-radius: var(--radius); background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.problems li { display: flex; gap: 10px; align-items: flex-start; }
.problems .icon { margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chips div { display: flex; gap: 6px; align-items: baseline; padding: 6px 12px; border-radius: var(--radius-xs); background: var(--surface-2); border: 1px solid var(--line); font-size: .92rem; }
.chips dt { color: var(--muted); }
.chips dd { margin: 0; font-weight: 700; }

.actions { display: grid; gap: 8px; }

.result-card--done { background: var(--brand); border-color: var(--brand); color: var(--on-brand); text-align: center; }
.result-card--done .result-card__body { justify-items: center; padding: 28px 20px 20px; }
.result-card--done .order__eyebrow { color: var(--on-brand-soft); }
.result-card--done .chips { justify-content: center; }
.result-card--done .chips div { background: var(--on-brand-faint); border-color: var(--on-brand-line); }
.result-card--done .chips dt { color: var(--on-brand-soft); }
.result-card--done .note { color: var(--on-brand-soft); font-size: .95rem; }
.result-card--done .actions { width: 100%; }
.result-card--done .btn--primary { background: var(--surface); color: var(--brand-strong); }
.result-card--done .btn--primary:hover { background: var(--brand-soft); }

.done-check {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: var(--radius-round);
    background: var(--surface);
    color: var(--brand);
    animation: pop .32s var(--ease-out);
}

.done-check .icon { width: 46px; height: 46px; stroke-width: 3; }
.done-title { font-family: var(--font-head); font-size: 1.8rem; }

@keyframes pop { from { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); } }

.result-card--loading .result-card__body { gap: 12px; }
.loading-row { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: var(--radius-round); border: 3px solid var(--brand-line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.skeleton { height: 14px; border-radius: var(--radius-xs); background: linear-gradient(90deg, var(--skeleton) 25%, var(--surface-2) 50%, var(--skeleton) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton--big { height: 34px; width: 55%; }
.skeleton--mid { width: 70%; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Heute versendet */
.today { display: grid; gap: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-link { font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--surface); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title .icon { color: var(--brand); }

.count {
    min-width: 30px;
    padding: 2px 10px;
    border-radius: var(--radius-xs);
    background: var(--brand);
    color: var(--on-brand);
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.shipment {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2px 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.shipment:last-child { border-bottom: 0; }
.shipment__icon { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-round); background: var(--brand-soft); color: var(--brand); }
.shipment__icon .icon { width: 20px; height: 20px; }
.shipment__main { min-width: 0; }
.shipment__order { font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 6px; }
.shipment__name { overflow-wrap: anywhere; }
.shipment__time { color: var(--muted); font-variant-numeric: tabular-nums; }
.shipment__user { grid-column: 2 / -1; color: var(--muted); font-size: .85rem; }

.empty { display: flex; align-items: center; gap: 12px; padding: 18px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Benutzer */
.user-row a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: background-color .15s;
}

.list li:last-child.user-row a { border-bottom: 0; }
.user-row a:hover { background: var(--surface-2); }
.user-row.is-inactive { opacity: .6; }

.avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius-round); background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
.user-row__main { min-width: 0; display: grid; gap: 2px; }
.user-row__name { font-weight: 700; }
.user-row__meta { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.user-row__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.user-row .chevron { color: var(--muted); }

.pill { padding: 2px 10px; border-radius: var(--radius-xs); background: var(--brand-soft); color: var(--brand-strong); font-size: .82rem; font-weight: 700; }
.pill--off { background: var(--danger-soft); color: var(--danger); }
.pill--plain { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 700; min-height: 44px; }

/* Hinweis „App installieren“ */
.install-hint {
    max-width: 640px;
    margin: 0 max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--surface);
    border: 1px dashed var(--brand-line);
    border-radius: var(--radius-l);
    font-size: .95rem;
}

@media (min-width: 672px) { .install-hint { margin-left: auto; margin-right: auto; } }
.install-hint[hidden], .install-hint [hidden] { display: none; }

.install-hint__button {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-l);
    touch-action: manipulation;
    transition: background-color .15s, transform .1s;
}

.install-hint__button:hover { background: var(--surface-2); }
.install-hint__button:active { transform: scale(.98); }
.install-hint__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); }
.install-hint__text { display: grid; gap: 2px; color: var(--muted); }
.install-hint__text strong { color: var(--ink); }
.install-hint__chevron { color: var(--muted); }

.install-sheet {
    width: 100%;
    max-width: 480px;
    max-height: calc(100dvh - 48px);
    margin: auto auto 0;
    padding: 24px max(20px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    border: 0;
    border-radius: var(--radius-l) var(--radius-l) 0 0;
    background: var(--surface);
    color: var(--ink);
    overflow-y: auto;
}

.install-sheet[open] { animation: sheet-in .28s var(--ease-out); }
.install-sheet::backdrop { background: var(--overlay); }
.install-sheet__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.install-sheet__head img { flex: none; border-radius: var(--radius-l); }
.install-sheet__head h2 { margin: 0 0 2px; font-size: 1.2rem; }
.install-sheet__head p { margin: 0; color: var(--muted); }
.install-sheet__steps { margin: 0 0 24px; padding-left: 1.4em; display: grid; gap: 12px; line-height: 1.45; }
.install-sheet__steps[hidden] { display: none; }
.install-sheet__steps li { padding-left: 4px; }
.install-sheet__steps li::marker { font-family: var(--font-head); font-weight: 700; color: var(--brand); }
@keyframes sheet-in { from { transform: translateY(100%); } }

@media (min-width: 672px) {
    .install-sheet { margin: auto; border-radius: var(--radius-l); }
    .install-sheet[open] { animation-name: card-in; }
}

.icon--inline { width: 1.1em; height: 1.1em; vertical-align: -.2em; }

/* Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
