/* ============================================================
   livo — dein Leben, sanft geordnet
   ============================================================ */

:root {
    --bg: #0b0d1a;
    --bg-2: #11132a;
    --ink: #eef0fb;
    --muted: rgba(238, 240, 251, .62);
    --faint: rgba(238, 240, 251, .38);
    --line: rgba(255, 255, 255, .09);
    --surface: rgba(255, 255, 255, .055);
    --surface-2: rgba(255, 255, 255, .085);
    --accent: #7aa2f7;
    --accent-2: #b07cf7;
    --danger: #ef6f6c;
    --ok: #6fcf97;
    --radius: 22px;
    --tab-h: 72px;
    font-synthesis: none;
    -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: .01em;
    overflow-x: hidden;
}

/* ---------- Nachthimmel ---------- */
.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, #1a1d3a 0%, var(--bg) 55%),
        var(--bg);
}
.sky-glow {
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    will-change: transform;
}
.sky-glow--a {
    top: -28vmax; left: -20vmax;
    background: radial-gradient(circle, rgba(123, 92, 247, .55), transparent 62%);
    animation: drift-a 26s ease-in-out infinite;
}
.sky-glow--b {
    bottom: -30vmax; right: -22vmax;
    background: radial-gradient(circle, rgba(60, 170, 220, .42), transparent 62%);
    animation: drift-b 32s ease-in-out infinite;
}
.stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.2px 1.2px at 20% 30%, rgba(255,255,255,.9), transparent),
        radial-gradient(1px 1px at 65% 15%, rgba(255,255,255,.7), transparent),
        radial-gradient(1.4px 1.4px at 80% 55%, rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 35% 72%, rgba(255,255,255,.6), transparent),
        radial-gradient(1.2px 1.2px at 12% 84%, rgba(255,255,255,.75), transparent),
        radial-gradient(1px 1px at 90% 88%, rgba(255,255,255,.55), transparent),
        radial-gradient(1.1px 1.1px at 50% 45%, rgba(255,255,255,.6), transparent);
    opacity: .5;
    animation: twinkle 6s ease-in-out infinite;
}

@keyframes drift-a { 50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.1); } }
@keyframes drift-b { 50% { transform: translate3d(-5vmax, -3vmax, 0) scale(1.08); } }
@keyframes twinkle { 0%, 100% { opacity: .42; } 50% { opacity: .62; } }

/* ---------- Grundgerüst ---------- */
.app {
    position: relative;
    z-index: 1;
    max-width: 540px;
    margin: 0 auto;
    padding:
        calc(env(safe-area-inset-top) + 22px)
        20px
        calc(var(--tab-h) + env(safe-area-inset-bottom) + 34px);
}

/* ---------- Kopf ---------- */
.head { margin-bottom: 22px; }
.head--sub { margin-bottom: 14px; }
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.head-date {
    margin: 0 0 2px;
    font-size: 12.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}
.head-title {
    margin: 0;
    font-size: clamp(27px, 8vw, 34px);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.1;
}
.head-sub { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }
.head-waiting { color: var(--faint); }
.back {
    color: var(--muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
}
.back--right { margin-left: auto; }
.head-logout button {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    width: 40px; height: 40px;
    border-radius: 13px;
    display: grid; place-items: center;
    cursor: pointer;
}
.head-logout svg { width: 19px; height: 19px; }

/* ---------- Karten ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-block: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}

/* ---------- Buttons ---------- */
.btn {
    --btn: var(--c, var(--accent));
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: 16px;
    font: inherit;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--ink);
    background: var(--surface-2);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
    text-decoration: none;
}
.btn:active { transform: scale(.975); }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 13.5px; border-radius: 12px; }
.btn--primary {
    color: #0b0d1a;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--btn) 88%, white 14%),
        var(--btn));
    box-shadow: 0 12px 30px rgba(var(--rgb, 122, 162, 247), .42);
    border: none;
}
.btn--glow { box-shadow: 0 0 0 rgba(0,0,0,0), 0 14px 34px rgba(var(--rgb, 122,162,247), .5); }
.btn--soft { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn--danger { background: rgba(239, 111, 108, .14); border: 1px solid rgba(239,111,108,.3); color: #ff9b98; }
.btn--add { margin-top: 6px; }
.iconbtn {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 26px; font-weight: 300; line-height: 1;
    text-decoration: none;
}

/* ---------- Formularfelder ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-block: 14px; }
.field--grow { flex: 1; margin: 0; }
.field-label { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.field-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--faint); }
input[type=text], input[type=email], input[type=password], textarea {
    width: 100%;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 15px;
    color: var(--ink);
    font: inherit;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea { resize: vertical; min-height: 52px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    background: rgba(255,255,255,.07);
    box-shadow: 0 0 0 4px rgba(122,162,247,.16);
}
.form-error {
    margin: 0 0 14px;
    padding: 11px 14px;
    background: rgba(239,111,108,.13);
    border: 1px solid rgba(239,111,108,.3);
    border-radius: 12px;
    color: #ff9b98;
    font-size: 14px;
}

/* ---------- Stimmung ---------- */
.mood { display: flex; justify-content: space-between; gap: 8px; }
.mood-opt { flex: 1; cursor: pointer; }
.mood-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mood-opt span {
    display: grid; place-items: center;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--line);
    font-size: clamp(20px, 6vw, 26px);
    transition: transform .15s ease, box-shadow .2s, background .2s, border-color .2s;
    filter: saturate(.9);
}
.mood-opt input:checked + span {
    transform: scale(1.12);
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.35);
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
    filter: saturate(1.15);
}

/* ---------- Tagesgefühl-Karte ---------- */
.daycard-head { display: flex; align-items: center; justify-content: space-between; }
.daycard-title { font-weight: 600; font-size: 16px; }
.daycard-toggle {
    background: none; border: none; color: var(--accent);
    font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 4px;
}
.daycard-body { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.daycard-body[hidden] { display: none; }

/* ---------- Orb-Feld (Heute) ---------- */
.orbfield {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px 10px;
    margin-top: 26px;
}
.orb-cell { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.orb {
    --w: var(--warmth, .5);
    position: relative;
    width: clamp(66px, 22vw, 86px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid; place-items: center;
    text-decoration: none;
    background:
        radial-gradient(circle at 30% 26%, rgba(255,255,255,.6), rgba(255,255,255,0) 42%),
        radial-gradient(circle at 72% 80%, rgba(0,0,0,.4), rgba(0,0,0,0) 56%),
        var(--c, var(--accent));
    box-shadow:
        0 0 calc(14px + var(--w) * 40px) rgba(var(--rgb), calc(.18 + var(--w) * .6)),
        inset 0 -7px 15px rgba(0,0,0,.4),
        inset 0 5px 12px rgba(255,255,255,.28);
    transition: box-shadow .4s ease, transform .25s ease, filter .4s ease;
    animation: float 7s ease-in-out infinite;
}
.orb-cell:nth-child(3n) .orb { animation-duration: 8.5s; animation-delay: -1.2s; }
.orb-cell:nth-child(3n+1) .orb { animation-duration: 6.4s; animation-delay: -.6s; }
.orb-cell:nth-child(3n+2) .orb { animation-duration: 7.7s; animation-delay: -2.1s; }
.orb:active { transform: scale(.94); }
.orb-emoji {
    font-size: clamp(28px, 9vw, 34px);
    line-height: 1;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.35));
    z-index: 1;
}
.orb-ring {
    position: absolute; inset: -4px;
    border-radius: 50%;
    pointer-events: none;
}
.is-cool .orb { filter: saturate(.7) brightness(.88); opacity: .9; }
.is-touched .orb {
    box-shadow:
        0 0 18px rgba(var(--rgb), .5),
        0 0 46px rgba(var(--rgb), .55),
        inset 0 -7px 15px rgba(0,0,0,.35),
        inset 0 5px 12px rgba(255,255,255,.35);
}
.is-touched .orb-ring {
    border: 1.5px solid rgba(var(--rgb), .55);
    animation: breathe 3.2s ease-in-out infinite;
}
.orb-foot { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.orb-name { font-size: 13.5px; font-weight: 500; color: var(--ink); text-align: center; }
.tend { margin: 0; }
.tend-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    font: inherit; font-size: 11.5px; font-weight: 600;
    padding: 4px 11px;
    border-radius: 99px;
    cursor: pointer;
    transition: background .2s, color .2s, transform .12s;
}
.tend-btn:active { transform: scale(.92); }
.tend-done { display: none; }
.is-touched .tend-btn { background: rgba(111,207,151,.16); border-color: rgba(111,207,151,.34); color: #9be8bd; }
.is-touched .tend-default { display: none; }
.is-touched .tend-done { display: inline; }
.tend-btn.just-tended { animation: pop .4s ease; }

@keyframes float { 50% { transform: translateY(-7px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.08); opacity: .3; } }
@keyframes pop { 40% { transform: scale(1.18); } }

/* ---------- Detail / Hero ---------- */
.hero { text-align: center; margin: 8px 0 4px; }
.hero-orb {
    --w: var(--warmth, .6);
    width: 116px; height: 116px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 50px;
    background:
        radial-gradient(circle at 30% 26%, rgba(255,255,255,.6), rgba(255,255,255,0) 42%),
        radial-gradient(circle at 72% 80%, rgba(0,0,0,.4), rgba(0,0,0,0) 56%),
        var(--c, var(--accent));
    box-shadow:
        0 0 calc(24px + var(--w) * 60px) rgba(var(--rgb), calc(.25 + var(--w) * .55)),
        inset 0 -9px 20px rgba(0,0,0,.4),
        inset 0 6px 16px rgba(255,255,255,.3);
    animation: float 6.5s ease-in-out infinite;
}
.hero-orb span { filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.hero-orb.is-touched { animation: float 6.5s ease-in-out infinite, glowpulse 3.4s ease-in-out infinite; }
.hero-name { margin: 0 0 10px; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.hero-meta { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; flex-wrap: wrap; }
.chip {
    font-size: 12.5px; font-weight: 600;
    padding: 4px 11px; border-radius: 99px;
    background: rgba(var(--rgb), .16);
    color: color-mix(in srgb, var(--c) 60%, white 40%);
    border: 1px solid rgba(var(--rgb), .25);
}
.hero-status { color: var(--muted); font-size: 14px; }
.hero-intention {
    margin: 16px auto 0; max-width: 30ch;
    color: var(--muted); font-style: italic; font-size: 15.5px; line-height: 1.5;
}
@keyframes glowpulse {
    0%, 100% { box-shadow: 0 0 30px rgba(var(--rgb), .4), inset 0 -9px 20px rgba(0,0,0,.4), inset 0 6px 16px rgba(255,255,255,.3); }
    50% { box-shadow: 0 0 70px rgba(var(--rgb), .7), inset 0 -9px 20px rgba(0,0,0,.4), inset 0 6px 16px rgba(255,255,255,.35); }
}

.tendcard-title { margin: 0 0 16px; font-weight: 600; font-size: 16px; text-align: center; }
.tendcard .mood { margin-bottom: 14px; }
.tendcard textarea { margin-bottom: 14px; }

/* ---------- Rhythmus-Strip ---------- */
.strip-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.strip-title { font-weight: 600; font-size: 15px; }
.strip-week { color: var(--muted); font-size: 13px; }
.strip-dots { display: flex; gap: 5px; }
.strip-dot {
    flex: 1; height: 30px; border-radius: 8px;
    background: rgba(255,255,255,.06);
    transition: background .3s;
}
.strip-dot.is-on { background: rgba(var(--rgb), calc(.28 + var(--n) * .22)); box-shadow: 0 0 12px rgba(var(--rgb), .35); }
.strip-dot.is-today { outline: 1.5px solid rgba(255,255,255,.35); outline-offset: 1px; }

/* ---------- Historie ---------- */
.history { margin-top: 24px; }
.history-title { font-size: 15px; font-weight: 600; color: var(--muted); margin: 0 0 10px; letter-spacing: .02em; }
.history-empty { color: var(--faint); font-size: 14px; }
.pulse { display: flex; align-items: flex-start; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.pulse-dot {
    flex: none; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; font-size: 17px;
    background: rgba(var(--rgb), .14); border: 1px solid rgba(var(--rgb), .22);
}
.pulse-body { flex: 1; min-width: 0; }
.pulse-when { margin: 2px 0 0; font-size: 13px; color: var(--faint); }
.pulse-note { margin: 5px 0 0; font-size: 15px; line-height: 1.5; }
.pulse-del button {
    background: none; border: none; color: var(--faint);
    font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px;
}

/* ---------- Bereiche-Liste ---------- */
.arealist { list-style: none; margin: 18px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.arearow {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 12px 14px;
    box-shadow: 0 10px 26px rgba(0,0,0,.2);
}
.arearow--muted { opacity: .7; }
.arearow-grip {
    color: var(--faint); cursor: grab; touch-action: none;
    display: grid; place-items: center; width: 26px; flex: none;
}
.arearow-grip svg { width: 22px; height: 22px; }
.arearow-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: var(--ink); }
.arearow-orb {
    flex: none; width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center; font-size: 21px;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.4), transparent 55%),
        rgba(var(--rgb), .22);
    border: 1px solid rgba(var(--rgb), .3);
}
.arearow-text { display: flex; flex-direction: column; min-width: 0; }
.arearow-name { font-weight: 600; font-size: 16px; }
.arearow-meta { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arearow-edit { color: var(--faint); text-decoration: none; font-size: 22px; padding: 0 4px; flex: none; }
.arearow.is-dragging { opacity: .92; transform: scale(1.03); box-shadow: 0 22px 50px rgba(0,0,0,.5); z-index: 5; }
.arealist.is-sorting .arearow { transition: transform .18s ease; }

/* ---------- Archiv ---------- */
.archived { margin-top: 30px; }
.archived-title { font-size: 14px; color: var(--faint); letter-spacing: .04em; margin: 0 0 12px; }

/* ---------- Bereich-Formular ---------- */
.areaform-head { display: flex; align-items: flex-end; gap: 14px; }
.emoji-preview {
    flex: none; width: 64px; height: 64px; border-radius: 50%;
    display: grid; place-items: center; font-size: 30px;
    background:
        radial-gradient(circle at 30% 26%, rgba(255,255,255,.55), transparent 45%),
        var(--c, var(--accent));
    box-shadow: 0 0 26px rgba(var(--rgb), .5), inset 0 -6px 14px rgba(0,0,0,.35);
}
.emoji-picks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: -4px; }
.emoji-pick {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line);
    font-size: 20px; cursor: pointer; transition: transform .12s, background .2s;
}
.emoji-pick:active { transform: scale(.9); }
.emoji-pick.is-active { background: var(--surface-2); border-color: rgba(255,255,255,.3); }
.colorrow { display: flex; align-items: center; gap: 14px; }
input[type=color] {
    -webkit-appearance: none; appearance: none;
    width: 48px; height: 48px; border: none; border-radius: 14px;
    background: none; cursor: pointer; padding: 0; flex: none;
}
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 1px solid var(--line); border-radius: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--c); border: 2px solid transparent; cursor: pointer;
    box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 4px 10px rgba(0,0,0,.3);
    transition: transform .12s;
}
.swatch:active { transform: scale(.88); }
.swatch.is-active { border-color: #fff; box-shadow: 0 0 14px var(--c); }
.segmented { display: flex; gap: 5px; background: rgba(255,255,255,.05); border-radius: 14px; padding: 5px; }
.seg { flex: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
    display: block; text-align: center; padding: 9px 6px;
    border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted);
    transition: background .2s, color .2s;
}
.seg input:checked + span { background: var(--surface-2); color: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.areaform-actions { margin-top: 20px; }
.danger { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Balance / Lebensrad ---------- */
.wheelwrap { display: flex; justify-content: center; margin: 8px 0 24px; }
.wheel { width: min(80vw, 330px); height: auto; overflow: visible; }
.wheel-bg { fill: rgba(255,255,255,.025); }
.wheel-slice { transition: d .4s ease; }
.wheel-hole { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 1; }
.wheel-emoji { font-size: 15px; }
.wheel-center-num { fill: var(--ink); font-size: 26px; font-weight: 600; }
.wheel-center-lbl { fill: var(--faint); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

.balancelist { display: flex; flex-direction: column; gap: 12px; }
.balancerow {
    display: flex; align-items: center; gap: 13px;
    text-decoration: none; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 12px 15px;
}
.balancerow-orb {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; font-size: 19px;
    background: rgba(var(--rgb), .2); border: 1px solid rgba(var(--rgb), .3);
}
.balancerow-body { flex: 1; min-width: 0; }
.balancerow-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.balancerow-name { font-weight: 600; font-size: 15.5px; }
.balancerow-count { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bar { display: block; height: 7px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar-fill {
    display: block; height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, white 10%), var(--c));
    box-shadow: 0 0 12px rgba(var(--rgb), .6);
    transition: width .5s ease;
}
.balancehint { color: var(--faint); font-size: 12.5px; text-align: center; margin: 16px 0 0; line-height: 1.5; }

/* ---------- Leerzustand ---------- */
.empty { text-align: center; padding: 40px 10px; }
.empty-orb {
    width: 92px; height: 92px; margin: 0 auto 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(123,92,247,.4), transparent 60%);
    border: 1px dashed rgba(255,255,255,.18);
    animation: float 7s ease-in-out infinite;
}
.empty h2 { margin: 0 0 8px; font-size: 21px; font-weight: 600; }
.empty p { margin: 0 0 22px; color: var(--muted); }

/* ---------- Tab-Leiste ---------- */
.tabbar {
    position: fixed;
    left: 50%; transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom) + 14px);
    z-index: 20;
    display: flex; gap: 4px;
    padding: 7px;
    background: rgba(16, 18, 38, .72);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 22px;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.tab {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    width: 78px; padding: 8px 0 6px;
    text-decoration: none; color: var(--faint);
    border-radius: 16px;
    transition: color .2s, background .2s;
}
.tab-ico { width: 23px; height: 23px; }
.tab span { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.tab.is-active { color: var(--ink); background: rgba(255,255,255,.07); }
.tab.is-active .tab-ico { filter: drop-shadow(0 0 10px rgba(122,162,247,.7)); color: var(--accent); }

/* ---------- Login ---------- */
.is-login .app {
    min-height: 100dvh;
    display: flex; flex-direction: column; justify-content: center;
    padding-bottom: calc(env(safe-area-inset-bottom) + 34px);
}
.login { width: 100%; }
.login-mark { text-align: center; margin-bottom: 30px; }
.brand-orb {
    width: 76px; height: 76px; margin: 0 auto 18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.7), transparent 45%),
        linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 50px rgba(123,92,247,.6), inset 0 -8px 18px rgba(0,0,0,.3);
    animation: float 6s ease-in-out infinite;
}
.brand {
    margin: 0; font-size: 42px; font-weight: 700; letter-spacing: -.03em;
    background: linear-gradient(120deg, #fff, var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.login-card { margin: 0; }
.login-card .field:first-of-type { margin-top: 0; }
.login-card .btn { margin-top: 8px; }
.login-hint { text-align: center; color: var(--faint); font-size: 13px; margin-top: 20px; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 26px);
    transform: translate(-50%, 12px);
    z-index: 30;
    max-width: 88vw;
    padding: 12px 18px;
    background: rgba(20, 22, 44, .92);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    color: var(--ink); font-size: 14px; font-weight: 500;
    box-shadow: 0 14px 40px rgba(0,0,0,.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.is-login .toast { bottom: calc(env(safe-area-inset-bottom) + 26px); }

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
