/* ---------- Farben & Grundwerte ---------- */
:root {
  --bg: #f3f4f8; --card: #ffffff; --card-2: #f7f8fb; --text: #151a26; --muted: #6b7385; --line: #e6e8ef;
  --accent: #ff6b2c; --accent-2: #ff9f43; --accent-soft: #fff0e8; --on-accent: #fff;
  --ok: #15924a; --ok-soft: #e6f6ec; --danger: #d63c3c; --danger-soft: #fdeaea;
  --cal-empty: #eceef4; --cal-on: #ff6b2c; --radius: 18px; --radius-s: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --grad: linear-gradient(135deg, #ff6b2c 0%, #ff9f43 100%);
  --tabbar-h: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0c0f15; --card: #161a22; --card-2: #1c212b; --text: #e9ecf3; --muted: #8e96a9; --line: #262c38;
          --accent-soft: #3a2216; --ok-soft: #12301f; --danger-soft: #3a1717; --cal-empty: #232834;
          --shadow: 0 1px 2px rgba(0, 0, 0, .3); }
}

/* ---------- Basis ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
       -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
a:not(.btn):hover { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 16px; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; margin: 0 0 12px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
h2 .ic { color: var(--accent); }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
code { background: var(--card-2); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* ---------- Kopfleiste ---------- */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--card) 85%, transparent);
             backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
             border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.bar { max-width: 1040px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; letter-spacing: -.02em; font-size: 1.05rem; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff;
             display: grid; place-items: center; box-shadow: 0 4px 12px rgba(255, 107, 44, .35); }
.logo-mark .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.nav-desk { display: flex; gap: 2px; flex: 1; }
.nav-desk a { display: flex; align-items: center; gap: 7px; text-decoration: none; padding: 8px 12px; border-radius: 10px;
              color: var(--muted); font-weight: 550; font-size: .95rem; white-space: nowrap; }
.nav-desk a .ic { width: 18px; height: 18px; }
.nav-desk a:hover { background: var(--card-2); color: var(--text); }
.nav-desk a.on { background: var(--accent-soft); color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
          background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.mob-only { display: none !important; }

/* ---------- Untere Tab-Leiste (Handy) ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav-desk, .desk-only { display: none !important; }
  .mob-only { display: inline-flex !important; }
  .bar { padding: 8px 16px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
            background: color-mix(in srgb, var(--card) 90%, transparent);
            backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
            border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
              height: var(--tabbar-h); text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600; }
  .tabbar a .ic { width: 24px; height: 24px; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a.on .ic { stroke-width: 2.4; }
  .tabbar a:active { transform: scale(.94); }
}

/* ---------- Inhalt ---------- */
main { max-width: 1040px; margin: 0 auto; padding: 24px 20px 64px; }
@media (max-width: 760px) {
  main { padding: 16px 14px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); }
  h1 { font-size: 1.4rem; }
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 550;
        font-size: .9rem; margin-bottom: 10px; }
.back .ic { width: 18px; height: 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
        margin-bottom: 16px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .card { padding: 16px; border-radius: 16px; margin-bottom: 12px; } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: .9rem; color: var(--muted); text-decoration: none; font-weight: 550; }
.link-more .ic { width: 16px; height: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; gap: 12px; } }
.section-gap { margin-bottom: 16px; }

/* ---------- Hero (Übersicht) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 22px; margin-bottom: 16px; color: #fff;
        background: var(--grad); display: flex; align-items: center; justify-content: space-between; gap: 16px;
        box-shadow: 0 10px 30px rgba(255, 107, 44, .28); }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
               background: rgba(255, 255, 255, .12); pointer-events: none; }
.hero h1 { margin: 2px 0 6px; font-size: 1.7rem; }
.hero p { margin: 0 0 14px; opacity: .95; max-width: 40ch; }
.hero-date { font-size: .85rem; opacity: .85; font-weight: 600; }
.hero .btn { background: #fff; color: var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.hero .pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .22);
              padding: 8px 14px; border-radius: 999px; font-weight: 650; }
.ring { position: relative; width: 116px; height: 116px; flex: none; z-index: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: rgba(255, 255, 255, .28); }
.ring .fill { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring-text b { font-size: 1.7rem; }
.ring-text span { font-size: .66rem; padding: 0 14px; opacity: .9; font-weight: 600; }
@media (max-width: 760px) {
  .hero { padding: 18px; border-radius: 20px; align-items: flex-start; }
  .hero h1 { font-size: 1.4rem; }
  .ring { width: 92px; height: 92px; }
  .ring-text b { font-size: 1.35rem; }
  .ring-text span { font-size: .6rem; padding: 0 12px; }
}

/* ---------- Kennzahl-Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
        box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; min-width: 0; }
.tile-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
           background: var(--accent-soft); color: var(--accent); }
.tile .label { color: var(--muted); font-size: .8rem; font-weight: 550; }
.tile .value { font-size: 1.35rem; font-weight: 750; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap;
               overflow: hidden; text-overflow: ellipsis; }
.tile .sub { color: var(--muted); font-size: .78rem; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
  .tiles.three > .tile:last-child { grid-column: 1 / -1; }
  .tile { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; }
  .tile-ic { width: 34px; height: 34px; border-radius: 10px; }
  .tile-ic .ic { width: 18px; height: 18px; }
  .tile .value { font-size: 1.2rem; }
}
.progress { height: 8px; background: var(--cal-empty); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* ---------- Kalender ---------- */
.cal { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); grid-template-columns: auto;
       grid-auto-columns: minmax(0, 1fr); gap: 4px; max-width: 440px; }
.cal span { font-size: .68rem; color: var(--muted); padding-right: 6px; line-height: 1; align-self: center; }
.cal div { aspect-ratio: 1; border-radius: 4px; background: var(--cal-empty); }
.cal .on { background: var(--grad); }
.cal .future { visibility: hidden; }
.cal .today { outline: 2px solid var(--text); outline-offset: -2px; }
@media (max-width: 760px) { .cal { gap: 3px; } .cal div { border-radius: 3px; } }
.legend { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); margin-top: 12px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: var(--cal-empty); }
.legend i.on { background: var(--accent); margin-left: 8px; }

/* ---------- Listen ---------- */
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 10px 0; border-top: 1px solid var(--line); }
ul.plain li:first-child { border-top: 0; padding-top: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
.list-row:first-child { border-top: 0; padding-top: 2px; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; }
.list-row .meta { color: var(--muted); font-size: .85rem; }
.list-row > .ic { color: var(--muted); }
.num { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .85rem;
       font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.letter { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 750;
          background: var(--card-2); border: 1px solid var(--line); color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 650; padding: 3px 10px;
        border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; padding: 3px 10px; border-radius: 999px;
       background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tag.grey { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.empty { text-align: center; padding: 18px 8px; color: var(--muted); }
.empty .ic { width: 36px; height: 36px; color: var(--accent); opacity: .7; display: block; margin: 0 auto 8px; }

/* ---------- Knöpfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius-s);
       min-height: 44px; padding: 10px 18px; font: inherit; font-weight: 650; background: var(--grad); color: var(--on-accent);
       cursor: pointer; text-decoration: none; box-shadow: 0 4px 14px rgba(255, 107, 44, .25); transition: transform .1s, filter .15s; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.97); }
.btn .ic { width: 18px; height: 18px; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--card-2); }
.btn.danger { background: var(--card); color: var(--danger); border: 1px solid var(--line); box-shadow: none; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .88rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; width: 40px; height: 40px; border-radius: 10px;
            display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.icon-btn.del:hover { color: var(--danger); background: var(--danger-soft); }
.icon-btn .ic { width: 19px; height: 19px; }
form.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .actions.stretch > * { flex: 1 1 auto; } }

/* ---------- Formulare ---------- */
input, textarea, select { font: inherit; font-size: 16px; /* verhindert Zoom auf dem iPhone */
  padding: 10px 12px; min-height: 46px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); background: var(--card); }
textarea { min-height: 110px; resize: vertical; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; }
input[type="file"] { padding: 10px; background: var(--card); border-style: dashed; cursor: pointer; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 6px 12px;
  margin-right: 10px; background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label, .form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.check { flex-direction: row !important; align-items: center; gap: 10px !important; color: var(--text) !important;
         font-weight: 500 !important; font-size: .95rem !important; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1.1fr 2fr .8fr .8fr 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 760px) {
  .form-grid { grid-template-columns: repeat(6, 1fr); }
  .form-grid > * { grid-column: span 3; }
  .form-grid .wide { grid-column: 1 / -1; }
  .form-grid .third { grid-column: span 2; }
  .form-grid .btn { grid-column: 1 / -1; }
}
.weekday-pick { display: grid; grid-template-columns: repeat(7, minmax(0, 46px)); gap: 8px; }
.weekday-pick label { position: relative; cursor: pointer; }
.weekday-pick input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-pick span { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 50%; font-weight: 700;
                     border: 1px solid var(--line); background: var(--card-2); color: var(--text); transition: all .15s; }
.weekday-pick input:checked + span { background: var(--grad); color: #fff; border-color: transparent; }
.weekday-pick input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
details summary { cursor: pointer; }

/* ---------- Hinweise ---------- */
.error, .notice, .success { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); margin-bottom: 14px; font-weight: 500; }
.error { background: var(--danger-soft); color: var(--danger); }
.notice { background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.success { background: var(--ok-soft); color: var(--ok); }

/* ---------- Login & Co. ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 410px; padding: 26px; margin: 0; }
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand .logo-mark { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 12px; }
.auth-brand .logo-mark .ic { width: 32px; height: 32px; }
.auth-brand h1 { margin: 0 0 4px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 20px 0 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 6px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; border-top: 0; text-transform: uppercase; letter-spacing: .04em; }
.chart-wrap { position: relative; height: 280px; }
@media (max-width: 760px) { .chart-wrap { height: 230px; } }

/* ---------- Körper-Grafik ---------- */
.body { display: block; max-width: 100%; }
.body .b-base { fill: var(--line); }
.body .m-off { fill: var(--cal-empty); stroke: var(--card); stroke-width: .6; }
.body .m-on { fill: var(--accent); stroke: var(--card); stroke-width: .6; }
.body .b-label { font-size: 9px; fill: var(--muted); text-anchor: middle; }
.body-md { margin: 0 auto; }
.body-panel { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px 10px; }
.body-panel .cap { text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.muscle-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.muscle-chips span { font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.muscle-chips span.sec { background: var(--cal-empty); color: var(--muted); }
.muscle-chips.center { justify-content: center; margin-top: 10px; }

/* ---------- Trainings ---------- */
.workout-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.workout-head h2 { margin-bottom: 2px; }
.entry { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; }
.entry .grow { flex: 1; min-width: 0; }
.entry a { font-weight: 600; text-decoration: none; }
.entry .note { color: var(--muted); font-size: .82rem; }

/* ---------- Plan ---------- */
.day-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 6px; scrollbar-width: none; }
.day-nav::-webkit-scrollbar { display: none; }
.day-nav a { flex: none; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 8px 14px;
             border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .88rem; }
.day-nav a b { color: var(--accent); }
.day-nav a.today { background: var(--grad); color: #fff; border-color: transparent; }
.day-nav a.today b { color: #fff; }
.day-card { scroll-margin-top: 80px; }
.day-card.is-today { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.day-badge { display: inline-grid; place-items: center; min-width: 42px; height: 30px; padding: 0 10px; border-radius: 10px;
             background: var(--accent-soft); color: var(--accent); font-weight: 750; font-size: .85rem; }
.day-grid { display: grid; grid-template-columns: 1fr 250px; gap: 18px; align-items: start; }
.ex-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ex-row:first-child { border-top: 0; padding-top: 0; }
.ex-row .ex-name { font-weight: 650; }
.ex-row .ex-note { color: var(--muted); font-size: .82rem; margin-top: 2px; }
@media (max-width: 760px) {
  .day-grid { grid-template-columns: 1fr; gap: 12px; }
  .day-grid .day-body { order: -1; }
  .day-body .body-md { height: 180px; }
  .ex-row { gap: 10px; }
  .ex-row .body-sm { height: 60px; }
}
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); text-decoration: none;
           background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 650; }
.quick a small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }
.quick a:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: inherit; }
@media (max-width: 760px) {
  .quick { grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .quick a { flex-direction: column; text-align: center; gap: 6px; padding: 12px 6px; font-size: .82rem; }
  .quick a small { display: none; }
}

/* ---------- Sonstiges ---------- */
.reply { line-height: 1.6; }
.reply ol, .reply ul { padding-left: 1.3em; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--cal-empty); border-top-color: var(--accent); border-radius: 50%;
           animation: spin 1s linear infinite; margin: 14px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.more { text-align: center; }
.search { position: relative; margin-bottom: 12px; }
.search .ic { position: absolute; left: 12px; top: 13px; color: var(--muted); }
.search input { padding-left: 40px; }
.usage-big { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; }
.user-card.inactive { opacity: .55; }
.budget-form { display: flex; gap: 8px; align-items: flex-end; }
.budget-form input { width: 130px; }
@media (max-width: 760px) { .budget-form { width: 100%; } .budget-form label { flex: 1; } .budget-form input { width: 100%; } }
.danger-zone { text-align: center; margin-top: 8px; }
@media (max-width: 760px) { .weekday-pick { grid-template-columns: repeat(7, 1fr); gap: 6px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 0s !important; } }

/* ---------- Training heute ---------- */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.day-choose { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.day-choose .btn b { color: var(--accent); margin-right: 2px; }
.day-choose .btn.on { border-color: var(--accent); color: var(--accent); }
.session-head { border-top: 4px solid var(--accent); }
.ex-card { scroll-margin-top: 80px; }
.ex-card.done { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.ex-card.done .num { background: var(--ok-soft); color: var(--ok); }
.ex-card.done .num .ic { width: 16px; height: 16px; stroke-width: 3; }
.ex-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.ex-card-head .grow { flex: 1; min-width: 0; }
.ex-card .ex-name { font-weight: 700; font-size: 1.05rem; }
.sugg { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.sugg-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sugg-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sugg-value { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.sugg-why { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.trend { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.trend.up { background: var(--ok-soft); color: var(--ok); }
.trend.more { background: var(--accent-soft); color: var(--accent); }
.trend.hold, .trend.new { background: var(--cal-empty); color: var(--muted); }
.done-list { margin: -4px 0 8px; }
.done-list .entry { padding: 6px 0; color: var(--ok); }
.log-form { display: grid; grid-template-columns: 70px 70px 1fr auto; gap: 10px; align-items: end; }
.log-form label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.log-form.collapsed { display: none; }
.stepper { display: flex; align-items: stretch; }
.stepper input { border-radius: 0; text-align: center; border-left: 0; border-right: 0; min-width: 0; }
.step { width: 44px; flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit;
        font-size: 1.3rem; font-weight: 600; cursor: pointer; }
.step:first-child { border-radius: var(--radius-s) 0 0 var(--radius-s); }
.step:last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.step:active { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) {
  .log-form { grid-template-columns: 1fr 1fr; }
  .log-form label:nth-of-type(3), .log-form .btn { grid-column: 1 / -1; }
  .sugg-value { font-size: 1.15rem; }
}

/* ---------- Gesundheit ---------- */
.rec { border-left: 5px solid var(--ok); }
.rec-head { display: flex; align-items: center; gap: 8px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); flex: none; }
.rec-mittel { border-left-color: #e0a800; } .rec-mittel .rec-dot { background: #e0a800; }
.rec-niedrig { border-left-color: var(--danger); } .rec-niedrig .rec-dot { background: var(--danger); }
.tile-ic:not(:has(svg)) { font-size: 1.2rem; }
.guide h3 { font-size: .95rem; margin: 18px 0 6px; }
.guide ol { padding-left: 1.3em; margin: 0 0 8px; }
.guide li { margin-bottom: 8px; }
pre.raw { white-space: pre-wrap; word-break: break-all; font-size: .75rem; background: var(--card-2); border: 1px solid var(--line);
          border-radius: 10px; padding: 10px; max-height: 240px; overflow: auto; }
.guide ol.steps { list-style: none; counter-reset: st; padding: 0; }
.guide ol.steps li { counter-increment: st; position: relative; padding: 2px 0 10px 40px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.guide ol.steps li:last-child { border-bottom: 0; }
.guide ol.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: .85rem; }

/* ---------- Ernährung ---------- */
.date-nav { display: flex; align-items: center; gap: 2px; font-weight: 650; background: var(--card); border: 1px solid var(--line);
            border-radius: 12px; padding: 2px; }
.date-nav span:not(.icon-btn) { min-width: 120px; text-align: center; font-size: .92rem; }
.nut-top { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.ring-nut { width: 128px; height: 128px; }
.ring-nut .track { stroke: var(--cal-empty); }
.ring-nut .fill { stroke: var(--accent); }
.ring-nut.over .fill { stroke: var(--danger); }
.ring-nut .ring-text { color: var(--text); }
.ring-nut .ring-text span { color: var(--muted); padding: 0 16px; }
.nut-kcal { display: flex; flex-direction: column; gap: 8px; }
.nut-kcal > div { display: flex; flex-direction: column; line-height: 1.2; }
.nut-kcal b { font-size: 1.15rem; }
.nut-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.nut-bar { font-size: .9rem; }
.nut-bar .progress { height: 7px; margin-top: 5px; }
.nut-bar.sub { padding-left: 12px; font-size: .84rem; color: var(--muted); }
.nut-bar.sub .progress span { background: color-mix(in srgb, var(--accent) 55%, var(--cal-empty)); }
.nut-bar.done .progress span { background: var(--ok); }
.nut-bar.over .progress span { background: var(--danger); }
.nut-bar.over b { color: var(--danger); }
@media (max-width: 760px) {
  .nut-top { gap: 14px; }
  .ring-nut { width: 112px; height: 112px; }
  .nut-bars { grid-template-columns: 1fr; gap: 10px; }
  .date-nav span:not(.icon-btn) { min-width: 96px; }
}
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--card-2); border: 1px solid var(--line);
       border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg button { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; color: var(--muted);
              font: inherit; font-size: .78rem; font-weight: 650; padding: 8px 4px; border-radius: 10px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
.reader { border-radius: 14px; overflow: hidden; margin-bottom: 10px; background: #000; }
.reader video { width: 100% !important; display: block; }
.product { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.p-table td:not(:first-child), .p-table th:not(:first-child) { text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card-2); color: var(--text);
        font: inherit; font-size: .86rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip:active { background: var(--accent-soft); }
.nut-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.nut-grid label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
@media (max-width: 760px) { .nut-grid { grid-template-columns: 1fr 1fr; } }
.food-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); position: relative; }
.food-row:nth-child(2) { border-top: 0; padding-top: 0; }
.food-row .grow { flex: 1; min-width: 0; }
.food-row .title { font-weight: 600; }
.food-row .meta { color: var(--muted); font-size: .8rem; }
.food-row .meta .tag { margin-left: 4px; font-size: .68rem; padding: 1px 7px; }
.food-kcal { white-space: nowrap; }
.food-menu summary { list-style: none; font-size: 1.2rem; }
.food-menu summary::-webkit-details-marker { display: none; }
.food-pop { position: absolute; right: 0; top: 100%; z-index: 5; background: var(--card); border: 1px solid var(--line);
            border-radius: 14px; padding: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); width: min(320px, 90vw); }
.goal-list { display: flex; flex-direction: column; gap: 8px; }
.goal-list > div { padding: 6px 0; border-bottom: 1px solid var(--line); }
.nut-col { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 760px) { .nut-col { gap: 10px; } }
.goal-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .goal-cards { grid-template-columns: 1fr; } }
.goal-card { position: relative; display: block; cursor: pointer; }
.goal-card input { position: absolute; opacity: 0; pointer-events: none; }
.goal-body { height: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card-2); transition: border-color .15s, background .15s; }
.goal-card input:checked + .goal-body { border-color: var(--accent); background: var(--accent-soft); }
.goal-card input:focus-visible + .goal-body { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.goal-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.goal-title .tag { margin-left: auto; }
.goal-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 4px; font-size: .9rem; }
.goal-why { font-size: .84rem; color: var(--text); margin-top: 4px; }
.goal-tip { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: .9rem; background: var(--card-2); border: 1px solid var(--line); }
.check-item.warn { background: color-mix(in srgb, #e0a800 12%, var(--card)); border-color: color-mix(in srgb, #e0a800 40%, transparent); }
.check-item.bad { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.event { padding: 12px 0; border-top: 1px solid var(--line); }
.event:first-of-type { border-top: 0; padding-top: 0; }
.event-plan { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); border-left: 4px solid var(--ok); }
.event-plan.warn { border-left-color: #e0a800; } .event-plan.bad { border-left-color: var(--danger); }
.event-banner { display: flex; align-items: center; gap: 14px; text-decoration: none; border-left: 5px solid var(--ok); }
.event-banner.warn { border-left-color: #e0a800; } .event-banner.bad { border-left-color: var(--danger); }
.event-banner .grow { flex: 1; min-width: 0; }
.ev-days { display: grid; place-items: center; min-width: 54px; height: 54px; border-radius: 14px; background: var(--grad); color: #fff; line-height: 1; }
.ev-days b { font-size: 1.3rem; } .ev-days small { font-size: .65rem; font-weight: 600; }
.weight-quick { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.weight-quick input { width: 100px; min-height: 38px; padding: 6px 10px; }
.weight-quick span { flex: 1; }
.weight-form { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
@media (max-width: 760px) { .weight-form { grid-template-columns: 1fr 1fr; } .weight-form .btn { grid-column: 1 / -1; } }
.record-banner { background: linear-gradient(135deg, #ffd34d, #ff9f43); color: #3a2000; font-weight: 700; padding: 14px 16px;
                 border-radius: 16px; margin-bottom: 14px; box-shadow: 0 8px 24px rgba(255, 159, 67, .35); animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.9); opacity: 0; } 60% { transform: scale(1.03); } 100% { transform: scale(1); opacity: 1; } }
.seg.mini { display: inline-flex; grid-template-columns: none; margin: 0; padding: 3px; border-radius: 10px; }
.seg.mini a { padding: 5px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: .78rem; font-weight: 650; white-space: nowrap; }
.seg.mini a.on { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
.vol-grid { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .vol-grid { grid-template-columns: 1fr; } .vol-grid .body-md { height: 180px; } .card-head:has(.seg.mini) { flex-wrap: wrap; } }
.vol-list { display: flex; flex-direction: column; gap: 7px; }
.vol-row { display: grid; grid-template-columns: 150px 1fr 36px; gap: 10px; align-items: center; font-size: .86rem; }
.vol-row b { text-align: right; }
.vol-bar { position: relative; height: 8px; border-radius: 99px; background: var(--cal-empty); }
.vol-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.vol-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .25; }
.vol-row.zu_wenig .vol-bar > span, .legend .lg-low { background: var(--danger); }
.vol-row.ok .vol-bar > span, .legend .lg-ok { background: #e0a800; }
.vol-row.optimal .vol-bar > span, .legend .lg-opt { background: var(--ok); }
.vol-row.viel .vol-bar > span, .legend .lg-high { background: var(--accent); }
.vol-row.zu_wenig .vol-name { color: var(--danger); }
@media (max-width: 760px) { .vol-row { grid-template-columns: 120px 1fr 32px; } }

/* --- Restaurant ------------------------------------------------------------ */
.sec-title { font-size: 1.05rem; margin: 18px 0 10px; }
.rest-strip { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 8px; background: var(--grad); color: #fff;
              border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.rest-strip > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rest-strip .muted { color: rgba(255, 255, 255, .85); }
.rest-strip b { font-size: 1.25rem; }
.rest-strip.over { background: var(--danger); }
.combo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.combo { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.combo-emojis { display: flex; gap: 6px; font-size: 2rem; line-height: 1; }
.combo-emojis span { background: var(--card-2); border-radius: 14px; width: 52px; height: 52px; display: grid; place-items: center; }
.combo-items { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.combo-items li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.combo-tot { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-top: auto; }
.combo-tot b { font-size: 1.2rem; color: var(--accent); }
.combo .btn { align-self: flex-start; }
#grp { flex-wrap: wrap; }
#grp a { cursor: pointer; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.item-tile { position: relative; display: flex; flex-direction: column; gap: 3px; background: var(--card); border: 2px solid var(--line);
             border-radius: var(--radius-s); padding: 12px; cursor: pointer; box-shadow: var(--shadow); }
.item-tile input { position: absolute; opacity: 0; pointer-events: none; }
.item-tile:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.item-tile:has(input:checked)::after { content: "✓"; position: absolute; top: 8px; right: 10px; color: var(--accent); font-weight: 800; }
.item-tile.nofit { opacity: .5; }
.item-emoji { font-size: 1.8rem; line-height: 1.1; }
.item-name { font-weight: 650; font-size: .9rem; line-height: 1.25; }
.item-kcal { font-weight: 750; color: var(--accent); }
.item-meta { font-size: .78rem; color: var(--muted); }
.pick-bar { position: sticky; bottom: 12px; z-index: 15; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
            background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px;
            box-shadow: var(--shadow); margin-top: 14px; }
.pick-bar span { flex: 1; min-width: 140px; }
.pick-bar select { width: auto; }
@media (max-width: 760px) {
  .pick-bar { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); }
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .rest-strip b { font-size: 1.05rem; }
}
#grp { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.card-head:has(#grp) { flex-wrap: wrap; }
.combo-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.menu-pill { background: #ffc72c; color: #3a2000; }
.item-sec { font-size: .95rem; margin: 18px 0 8px; scroll-margin-top: 80px; }
.sec-jump { margin-bottom: 4px; }
.sec-jump .chip { text-decoration: none; font-size: .8rem; padding: 5px 10px; }
.later { margin-top: 18px; }
.later summary { cursor: pointer; font-weight: 650; }

/* --- Ausdauer -------------------------------------------------------------- */
.top-tabs { margin: -6px 0 16px; }
.top-tabs a { padding: 7px 14px; font-size: .88rem; }
.sport-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sport-pick label { cursor: pointer; position: relative; }
.sport-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.sport-pick span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font-size: 1.4rem;
                   border: 2px solid var(--line); border-radius: var(--radius-s); background: var(--card-2); line-height: 1.1; }
.sport-pick small { font-size: .68rem; color: var(--muted); font-weight: 650; text-align: center; }
.sport-pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.sport-pick input:checked + span small { color: var(--accent); }
.sport-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check-line { flex-direction: row !important; align-items: center; gap: 8px; }
@media (max-width: 760px) { .sport-pick { grid-template-columns: repeat(5, 1fr); } .sport-pick span { font-size: 1.25rem; } }
.cal .run { background: #2bb3a3; }
.legend i.run { background: #2bb3a3; margin-left: 8px; }

/* --- Aufgaben-App (eigene Farbe: Indigo) ---------------------------------------- */
.app-tasks { --accent: #5b4ff0; --accent-2: #8b5cf6; --accent-soft: #eeecff; --cal-on: #5b4ff0;
             --grad: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%); }
@media (prefers-color-scheme: dark) { .app-tasks { --accent: #8b80ff; --accent-soft: #24204a; } }
.tabbar-3 { grid-template-columns: repeat(3, 1fr) !important; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
a.chip { text-decoration: none; }
.chip b { font-weight: 700; color: var(--muted); font-size: .78rem; }
.quick-add { padding: 12px; }
.qa-row { display: flex; gap: 8px; align-items: center; }
.qa-row input[name=text] { flex: 1; min-width: 0; font-size: 1rem; }
.qa-file { cursor: pointer; flex: none; }
.qa-hint { margin: 8px 2px 0; }
.filter-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 16px 0 6px; }
.filter-row .chips { flex: 1; min-width: 0; }
.mini-search { margin: 0; width: 220px; max-width: 100%; }
.group-title { margin: 20px 0 8px; font-size: 1rem; }
.group-title.ueberfaellig { color: var(--danger); }
.task-list { padding: 4px 8px; }
.task-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row > .ic { color: var(--muted); }
.task-main { display: block; flex: 1; text-decoration: none; min-width: 0; }
.task-main .title { font-weight: 650; line-height: 1.3; }
.task-row.erledigt .title { text-decoration: line-through; color: var(--muted); }
.task-row .meta, .detail-head .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--muted); margin-top: 3px; }
.due .ic { width: 14px; height: 14px; vertical-align: -2px; }
.due.ueberfaellig { color: var(--danger); font-weight: 650; }
.due.heute { color: var(--accent); font-weight: 650; }
.task-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--muted); background: none; cursor: pointer;
              display: grid; place-items: center; padding: 0; color: #fff; flex: none; transition: .15s; }
.task-check:hover { border-color: var(--ok); background: var(--ok-soft); }
.task-check.on { background: var(--ok); border-color: var(--ok); }
.task-check .ic { width: 16px; height: 16px; stroke-width: 3; }
.task-check.big { width: 34px; height: 34px; }
.detail-head { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 16px; }
.detail-grid > div { min-width: 0; }
.detail-grid > div > .card { margin-bottom: 16px; }
.add-row input[type=file] { min-width: 0; max-width: 100%; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0; }
.check-row label { flex: 1; display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 500; }
.check-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.check-row.done span { text-decoration: line-through; color: var(--muted); }
.add-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.add-row > input, .add-row > textarea { flex: 1; min-width: 0; }
.add-row.wrap { flex-wrap: wrap; }
.add-row.wrap > input { flex: 1 1 180px; }
.add-row textarea { resize: vertical; min-height: 42px; }
.mat-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mat-row > a.grow { display: block; flex: 1; text-decoration: none; min-width: 0; overflow: hidden; }
.mat-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid;
          place-items: center; flex: none; font-size: 1.1rem; }
.mat-thumb { max-width: 100%; max-height: 220px; border-radius: 10px; margin: 8px 0; border: 1px solid var(--line); display: block; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secret summary { list-style: none; display: inline-flex; position: relative; z-index: 1; cursor: pointer; }
.secret summary::-webkit-details-marker { display: none; }
.cat-row { display: flex; gap: 8px; align-items: center; padding: 6px 0; margin: 0; }
.cat-row input[name=name] { flex: 1; min-width: 0; }
.emoji-in { width: 56px !important; text-align: center; font-size: 1.2rem; padding-left: 4px !important; padding-right: 4px !important; }
.btn.danger { color: var(--danger); }
@media (max-width: 760px) { .mini-search { width: 100%; } .cat-row .muted { display: none; } }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid.two > * { grid-column: auto; }
.star { color: #f5a524; }
.star-btn { background: none; border: 0; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px; }
.star-btn.on { color: #f5a524; }
.star-btn:hover { color: #f5a524; }

/* --- Finanzen-App (eigene Farbe: Smaragd) -------------------------------------- */
.app-fin { --accent: #0c9f7a; --accent-2: #14b8a6; --accent-soft: #e3f6f0; --cal-on: #0c9f7a;
           --grad: linear-gradient(135deg, #059669 0%, #14b8a6 100%); }
@media (prefers-color-scheme: dark) { .app-fin { --accent: #34d399; --accent-soft: #10302a; } }
.money-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.money-tiles .tile .value { font-size: 1.25rem; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.in { color: var(--ok); }
.amt.out { color: var(--text); }
.neg { color: var(--danger) !important; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav h1 { margin: 0; font-size: 1.3rem; }
.budget-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.budget-row:last-child { border-bottom: 0; }
.budget-row .progress { grid-column: 1 / -1; margin: 0; }
.budget-row.knapp .progress span { background: #f5a524; }
.budget-row.drueber .progress span { background: var(--danger); }
.tx-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.tx-row:last-child { border-bottom: 0; }
.tx-row .tx-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--card-2); display: grid; place-items: center;
                 font-size: 1.1rem; flex: none; }
.tx-row .grow, .month-nav .grow, .budget-row .grow, .success .grow { flex: 1; min-width: 0; }
.tx-row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-row .meta { font-size: .8rem; color: var(--muted); }
.day-head { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); font-weight: 650; margin: 16px 2px 6px; }
.donut-wrap { height: 220px; }
.hint-card { border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }
.qa-row .file-btn { cursor: pointer; }
@media (max-width: 760px) { .money-tiles { grid-template-columns: 1fr 1fr; } .money-tiles .tile:last-child { grid-column: 1 / -1; } }
