/* hornnetwork – Apple-Designsprache (HIG): Systemschrift, Systemfarben, 8-pt-Raster, Hell/Dunkel */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  --bg: #f5f5f7; --card: #ffffff; --card2: #f2f2f7; --text: #1d1d1f; --muted: #6e6e73; --line: rgba(60,60,67,.12);
  --blue: #007aff; --green: #34c759; --orange: #ff9500; --red: #ff3b30; --gray: #8e8e93; --indigo: #5856d6; --teal: #30b0c7;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.06);
  --r: 18px;
}
:root { --pink: #ff2d55; --graphite: #636366; --glass: rgba(255,255,255,.66); color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --bg: #000; --card: #1c1c1e; --card2: #2c2c2e; --text: #f5f5f7; --muted: #98989d; --line: rgba(84,84,88,.5);
    --blue: #0a84ff; --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --gray: #8e8e93; --indigo: #5e5ce6; --teal: #40c8e0;
    --pink: #ff375f; --graphite: #98989d; --glass: rgba(28,28,30,.62);
    --shadow: 0 0 0 1px rgba(255,255,255,.04); color-scheme: dark; }
}
:root[data-theme=dark] { --bg: #000; --card: #1c1c1e; --card2: #2c2c2e; --text: #f5f5f7; --muted: #98989d; --line: rgba(84,84,88,.5);
    --blue: #0a84ff; --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --gray: #8e8e93; --indigo: #5e5ce6; --teal: #40c8e0;
    --pink: #ff375f; --graphite: #98989d; --glass: rgba(28,28,30,.62);
    --shadow: 0 0 0 1px rgba(255,255,255,.04); color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.35; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--blue); text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.center { display: grid; place-items: center; padding: 16px; }

/* Titel */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 24px; }
.page-head h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.022em; line-height: 1.1; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.hint { color: var(--muted); font-size: 15px; margin: -8px 0 16px; }
.section { margin-top: 32px; }
.section > h2, h2.sec { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 32px 0 12px; }

/* Navigationsleiste */
.navbar { position: sticky; top: 0; z-index: 10; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line); }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; min-height: 44px; }
.back svg { width: 22px; height: 22px; }

/* Login */
.login { width: 100%; max-width: 360px; text-align: center; padding: 40px 0; }
.login h1 { font-size: 28px; font-weight: 700; margin: 16px 0 4px; letter-spacing: -.02em; }
.login .sub { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.login-icon { width: 76px; height: 76px; border-radius: 22.5%; display: inline-grid; place-items: center; color: #fff; box-shadow: var(--shadow); }
.login-icon svg { width: 40px; height: 40px; }
.login-form { display: grid; gap: 12px; }
.login-form input[type=password] { width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); outline: none; min-height: 50px; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 25%, transparent); }
.error { color: var(--red); font-size: 15px; margin: 4px 0 0; }

/* Buttons */
.btn { font: inherit; font-size: 17px; font-weight: 500; border: 0; border-radius: 12px; padding: 12px 20px; min-height: 44px; cursor: pointer; background: var(--card2); color: var(--blue); }
.btn.primary { background: var(--blue); color: #fff; font-weight: 600; min-height: 50px; }
.btn.primary:active { filter: brightness(.9); }
.btn.small { font-size: 15px; padding: 6px 14px; min-height: 32px; border-radius: 999px; }
.btn.destructive { color: var(--red); }

/* Verläufe für App-Symbole */
.g-green { background: linear-gradient(180deg, #4cd964, #1fa84a); }
.g-blue { background: linear-gradient(180deg, #5ac8fa, #007aff); }
.g-indigo { background: linear-gradient(180deg, #7d7aff, #4b3fd1); }
.g-graphite { background: linear-gradient(180deg, #48484a, #1c1c1e); }
.g-gray { background: linear-gradient(180deg, #aeaeb2, #7c7c80); }

/* App-Raster wie auf dem Home-Bildschirm */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 24px 12px; margin-top: 32px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); border-radius: 16px; padding: 4px; -webkit-tap-highlight-color: transparent; }
.app-icon { width: 72px; height: 72px; border-radius: 22.5%; display: grid; place-items: center; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12), inset 0 0 0 .5px rgba(255,255,255,.15); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.app-icon svg { width: 38px; height: 38px; }
.app:hover .app-icon { transform: translateY(-2px) scale(1.03); }
.app:active .app-icon { transform: scale(.94); }
.app-name { font-size: 13px; font-weight: 500; text-align: center; }
.app-sub { font-size: 11px; color: var(--muted); text-align: center; margin-top: -6px; line-height: 1.2; }
.app:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Widget */
.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.widget { display: block; background: var(--card); border-radius: 22px; padding: 16px 20px; box-shadow: var(--shadow); color: var(--text); transition: transform .18s; }
.widget:active { transform: scale(.985); }
.widget-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.widget-head .status { margin-left: auto; }
.widget-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 8px; }
.widget-foot { color: var(--muted); font-size: 12px; margin-top: 8px; }
.mini-icon { width: 28px; height: 28px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff; flex: none; }
.mini-icon svg { width: 17px; height: 17px; }
.label { color: var(--muted); font-size: 12px; font-weight: 500; }
.big { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--green); } .neg { color: var(--red); }

/* Status-Kapsel */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.status.ok { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); } .status.ok i { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.status.warn { color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); } .status.warn i { background: var(--orange); }
.status.err { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); } .status.err i { background: var(--red); }

/* Karten, Listen */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.card { background: var(--card); border-radius: var(--r); padding: 16px 20px; box-shadow: var(--shadow); }
.card.empty { color: var(--muted); text-align: center; padding: 32px; }
.card .val { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.card .foot { color: var(--muted); font-size: 13px; margin-top: 4px; }
.banner { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: var(--r); padding: 14px 18px; box-shadow: var(--shadow); margin-bottom: 16px; font-size: 15px; }
.banner.warn { border-left: 4px solid var(--orange); } .banner.err { border-left: 4px solid var(--red); } .banner.off { border-left: 4px solid var(--gray); } .banner.ok { border-left: 4px solid var(--green); }
.list { background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; min-height: 52px; border-top: .5px solid var(--line); }
.row:first-child { border-top: 0; }
.grow { flex: 1; min-width: 0; }
.name { font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); vertical-align: middle; margin-left: 4px; }
.tk { display: inline-grid; place-items: center; width: 64px; height: 32px; padding: 0 8px; border-radius: 8px; background: var(--card2); font-size: 12px; font-weight: 700; letter-spacing: .02em; flex: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); flex: none; }
.dot.ok { background: var(--green); } .dot.err { background: var(--red); }
.range { position: relative; height: 4px; border-radius: 2px; margin-top: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--red) 55%, transparent), var(--card2) 50%, color-mix(in srgb, var(--green) 55%, transparent)); }
.range b { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--text); border: 2px solid var(--card); }
.range-l { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.log { font: 12px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; padding: 12px 20px; white-space: pre-wrap; word-break: break-word; }
.log .d { color: var(--muted); padding-left: 16px; } .log .f { color: var(--red); }
.spark { width: 100%; height: 120px; display: block; margin-top: 8px; }
.spark path.l { fill: none; stroke: var(--blue); stroke-width: 2; }
.spark path.a { fill: color-mix(in srgb, var(--blue) 14%, transparent); stroke: none; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.small-print { color: var(--muted); font-size: 12px; margin-top: 32px; }

@media (max-width: 520px) {
  .page-head h1 { font-size: 30px; }
  .widget-body { grid-template-columns: 1fr 1fr; }
  .widget-body > div:first-child { grid-column: 1 / -1; }
  .apps { grid-template-columns: repeat(4, 1fr); gap: 20px 8px; }
  .app-icon { width: 62px; height: 62px; } .app-icon svg { width: 32px; height: 32px; }
  .row { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Konten, Verwaltung ---------- */
.g-orange { background: linear-gradient(180deg, #ffb340, #ff8a00); }
.g-red { background: linear-gradient(180deg, #ff6961, #e0352b); }
.g-pink { background: linear-gradient(180deg, #ff6b9a, #e8336d); }
.g-teal { background: linear-gradient(180deg, #5fd4e8, #1aa3bd); }
.g-yellow { background: linear-gradient(180deg, #ffd84d, #f5b400); }
.wrap.narrow { max-width: 640px; }
.field-group { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.field-group input { display: block; width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border: 0; background: transparent; color: var(--text); outline: none; min-height: 50px; }
.field-group input:not(:first-of-type) { border-top: .5px solid var(--line); }
.field-group:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 25%, transparent); }
.foot-link { margin-top: 24px; font-size: 15px; color: var(--muted); }
.notice { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--text); border-radius: 12px; padding: 10px 14px; font-size: 15px; margin: 0 0 16px; }
.notice.err { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.page-head .head-actions { display: flex; gap: 8px; }
.circle-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--blue); box-shadow: var(--shadow); }
.circle-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.empty-state { text-align: center; padding: 64px 16px; color: var(--muted); }
.empty-state h2 { color: var(--text); font-size: 22px; margin: 16px 0 6px; }
.empty-state p { margin: 0 auto; max-width: 360px; font-size: 15px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto; color: var(--gray); opacity: .7; }
.empty-icon svg { width: 100%; height: 100%; stroke-width: 1.5; }
.form { display: grid; gap: 14px; }
.form > label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.form input[type=text], .form input[type=password], .form input:not([type]) { font: inherit; font-size: 17px; color: var(--text); padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); outline: none; min-height: 44px; }
.form input:focus { border-color: var(--blue); }
.form .check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); grid-template-columns: none; }
.check input, .toggle input { width: 20px; height: 20px; accent-color: var(--blue); }
.btn.filled { background: var(--blue); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn svg { width: 18px; height: 18px; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--card2); color: var(--muted); font-size: 15px; vertical-align: middle; }
.stack { display: grid; gap: 12px; }
.user-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: .5px solid var(--line); }
.toggle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--card2); font-size: 15px; cursor: pointer; }
.toggle .mini-icon { width: 24px; height: 24px; border-radius: 6px; } .toggle .mini-icon svg { width: 15px; height: 15px; }
.app-toggles .btn { margin-left: auto; }
.pick { display: grid; gap: 8px; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-item { position: relative; cursor: pointer; }
.pick-item input { position: absolute; opacity: 0; }
.pick-item .mini-icon, .pick-item .swatch { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.pick-item .mini-icon svg { width: 22px; height: 22px; }
.pick-item input:checked + span { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--blue); }
.pick-item input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 4px; }
@media (max-width: 520px) { .app-toggles .btn { margin-left: 0; } .user-head form { flex: none; } }

/* System-Kacheln im App-Raster (Verwaltung, Mein Konto) */
.app-icon { position: relative; }
.app-icon .badge { top: -6px; right: -6px; box-shadow: 0 0 0 2px var(--bg); }
.apps-hint { text-align: center; color: var(--muted); font-size: 15px; margin: 32px auto 0; max-width: 360px; }

/* Passwort ändern: gruppierte Felder wie in iOS */
.pw-form { display: grid; gap: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 17px; cursor: pointer; position: relative; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.switch { position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; background: color-mix(in srgb, var(--gray) 32%, transparent); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.04); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.switch-row input:checked + .switch { background: var(--green); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn.block { width: 100%; }

/* ---------- Darstellung je Person ---------- */
/* Akzentfarbe: ersetzt das System-Blau überall */
:root[data-accent=indigo] { --blue: var(--indigo); }
:root[data-accent=green] { --blue: var(--green); }
:root[data-accent=orange] { --blue: var(--orange); }
:root[data-accent=red] { --blue: var(--red); }
:root[data-accent=pink] { --blue: var(--pink); }
:root[data-accent=teal] { --blue: var(--teal); }
:root[data-accent=graphite] { --blue: var(--graphite); }

/* Hintergrund (Motiv oder eigenes Bild) */
.bg-layer { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: center; background-color: var(--bg); }
.bg-layer.dim::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.motiv-morgen { background-image: linear-gradient(160deg, #ffd3a5 0%, #fd9fbf 45%, #a1c4fd 100%); }
.motiv-abend { background-image: linear-gradient(160deg, #ff9a5a 0%, #e0457b 45%, #4a2a8a 100%); }
.motiv-wald { background-image: linear-gradient(160deg, #a8e063 0%, #3b9b6d 50%, #134e3a 100%); }
.motiv-meer { background-image: linear-gradient(160deg, #89f7fe 0%, #3fa9f5 45%, #1d3f8f 100%); }
.motiv-nacht { background-image: radial-gradient(120% 80% at 20% 10%, #3a3f8f 0%, transparent 60%), linear-gradient(180deg, #141a3a 0%, #05060f 100%); }
body.has-bg { background: transparent; }
body.has-bg .card, body.has-bg .list, body.has-bg .widget, body.has-bg .banner, body.has-bg .field-group, body.has-bg .switch-row {
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
}
body.has-bg .navbar { background: color-mix(in srgb, var(--bg) 45%, transparent); }
body.has-bg .page-head h1, body.has-bg .page-head .eyebrow, body.has-bg h2.sec, body.has-bg .hint, body.has-bg .apps-hint, body.has-bg .app-name, body.has-bg .app-sub {
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45), 0 0 12px rgba(0,0,0,.25);
}
body.has-bg .page-head .eyebrow, body.has-bg .hint, body.has-bg .apps-hint { color: rgba(255,255,255,.88); }
body.has-bg .notice { -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); background: var(--glass); }
body.has-bg .app-icon .badge { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }

/* Profilbild */
.has-photo { overflow: hidden; background: var(--card2); }
.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-icon.has-photo { border-radius: 50%; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; box-shadow: var(--shadow); }
.avatar svg { width: 34px; height: 34px; }
.avatar.small { width: 40px; height: 40px; box-shadow: none; } .avatar.small svg { width: 22px; height: 22px; }
.profile-head { align-items: center; justify-content: flex-start; }
.bg-thumb { width: 40px; height: 40px; border-radius: 10px; flex: none; background: var(--card2) center / cover; box-shadow: inset 0 0 0 .5px var(--line); }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn.busy { opacity: .6; pointer-events: none; }
.file-btn:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Auswahl-Kacheln (Erscheinungsbild, Hintergrund) */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choices.bgs { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.choice { display: grid; justify-items: center; gap: 8px; cursor: pointer; position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-name { font-size: 13px; font-weight: 500; }
.theme-prev, .bg-prev { width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; display: block; position: relative; overflow: hidden; background-size: cover; background-position: center; box-shadow: inset 0 0 0 .5px var(--line); }
.theme-prev i { position: absolute; left: 14%; right: 14%; height: 18%; border-radius: 6px; }
.theme-prev i:first-child { top: 22%; } .theme-prev i:last-child { top: 52%; right: 36%; }
.t-hell { background: #f2f2f7; } .t-hell i { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.t-dunkel { background: #000; } .t-dunkel i { background: #2c2c2e; }
.t-auto { background: linear-gradient(135deg, #f2f2f7 50%, #000 50%); } .t-auto i { background: linear-gradient(135deg, #fff 50%, #2c2c2e 50%); }
.bg-prev.none { background: var(--bg); }
.choice input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--blue); }
.choice input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 6px; }
body.has-bg .choice-name { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
body.has-bg .choice input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--blue); }

/* Akzentfarben */
.swatches { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; padding: 16px 20px; }
.swatch-pick { position: relative; cursor: pointer; }
.swatch-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dot-swatch { display: block; width: 32px; height: 32px; border-radius: 50%; }
.swatch-pick input:checked + .dot-swatch { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px currentColor; }
.swatch-pick input:focus-visible + .dot-swatch { outline: 2px solid var(--text); outline-offset: 5px; }
.ac-blue { background: #007aff; color: #007aff; } .ac-indigo { background: var(--indigo); color: var(--indigo); }
.ac-green { background: var(--green); color: var(--green); } .ac-orange { background: var(--orange); color: var(--orange); }
.ac-red { background: var(--red); color: var(--red); } .ac-pink { background: var(--pink); color: var(--pink); }
.ac-teal { background: var(--teal); color: var(--teal); } .ac-graphite { background: var(--graphite); color: var(--graphite); }

/* Kleinkram */
.hint.tight { margin: 0; font-size: 13px; }
.section-sm { margin-top: 16px; }
.name-row { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.name-row input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--text); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); outline: none; min-height: 36px; }
.name-row input:focus { border-color: var(--blue); }
.field-group input[type=text] { font-size: 17px; }
@media (max-width: 520px) { .choices.bgs { grid-template-columns: repeat(3, 1fr); } .swatches { justify-content: flex-start; } }

/* ---------- Dateien und Galerie ---------- */
.files-head { align-items: flex-end; }
.crumbs { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; }
.crumbs a { color: inherit; }
body.has-bg .crumbs a { color: rgba(255,255,255,.88); }
.circle-btn.small { width: 36px; height: 36px; } .circle-btn.small svg { width: 20px; height: 20px; }
.segmented { display: flex; background: color-mix(in srgb, var(--gray) 18%, transparent); border-radius: 9px; padding: 2px; margin: -8px 0 16px; max-width: 320px; }
.segmented a { flex: 1; text-align: center; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text); border-radius: 7px; }
.segmented a[aria-current] { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
body.has-bg .segmented { background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.toolbar .btn { font-size: 15px; min-height: 40px; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.toolbar label.btn:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
body.has-bg .toolbar .btn:not(.filled) { background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.row.link { color: var(--text); }
.row.link:active, .file-link:active { background: color-mix(in srgb, var(--gray) 14%, transparent); }
.chev { color: var(--gray); opacity: .6; display: grid; } .chev svg { width: 14px; height: 14px; }
.row .grow .meta { display: block; }
.file-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); margin: -12px 0 -12px -20px; padding: 12px 0 12px 20px; }
.file-link .name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex: none; background: var(--card2); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-link .mini-icon { width: 40px; height: 40px; border-radius: 10px; } .file-link .mini-icon svg { width: 22px; height: 22px; }
.icon-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; color: var(--blue); cursor: pointer; }
.icon-btn:hover { background: var(--card2); } .icon-btn svg { width: 22px; height: 22px; }
.btn.danger { background: var(--red); color: #fff; }
.empty-state .empty-icon svg { stroke-width: 1.5; }
body.has-bg .empty-state h2, body.has-bg .empty-state p { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }

/* Sheets (HIG: Aktionsblatt von unten auf dem Handy, Dialog in der Mitte am PC) */
dialog.sheet { border: 0; padding: 0; background: transparent; color: var(--text); width: min(440px, calc(100% - 16px)); max-width: none; overflow: visible; }
dialog.sheet::backdrop { background: rgba(0,0,0,.35); }
dialog.sheet > form, dialog.sheet > .action-list, dialog.sheet > .sheet-title { background: var(--card); }
dialog.sheet > form { border-radius: 16px; padding: 20px; display: grid; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog.sheet h2 { font-size: 17px; font-weight: 600; margin: 0; text-align: center; word-break: break-word; }
.sheet-note { color: var(--muted); font-size: 13px; margin: 0; text-align: center; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-actions.single { grid-template-columns: 1fr; margin-top: 8px; }
.sheet-actions.single .btn { background: var(--card); font-weight: 600; min-height: 56px; border-radius: 14px; }
.sheet-title { border-radius: 14px 14px 0 0; padding: 14px 16px; text-align: center; color: var(--muted); font-size: 13px; border-bottom: .5px solid var(--line); word-break: break-all; }
.action-list { border-radius: 14px; overflow: hidden; display: grid; }
.sheet-title + .action-list { border-radius: 0 0 14px 14px; }
.action-list > a, .action-list > button, .action-list form button { display: block; width: 100%; text-align: center; font: inherit; font-size: 19px; color: var(--blue); background: transparent; border: 0; border-top: .5px solid var(--line); padding: 16px; min-height: 56px; cursor: pointer; }
.action-list > :first-child, .action-list > .sheet-note + form button { border-top: 0; }
.action-list .destructive { color: var(--red); }
.action-list .sheet-note { padding: 14px 16px 4px; }
.field-group select { display: block; width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border: 0; background: transparent; color: var(--text); min-height: 50px; outline: none; }
.share-list { max-height: 50vh; overflow: auto; box-shadow: none; background: var(--card2); }
.share-list .row { cursor: pointer; } .share-list input { width: 22px; height: 22px; accent-color: var(--blue); }
@media (max-width: 600px) {
  dialog.sheet { margin: auto auto max(8px, env(safe-area-inset-bottom)); width: calc(100% - 16px); }
  dialog.sheet[open] { animation: sheet-up .28s cubic-bezier(.2,.8,.2,1); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Upload-Fortschritt */
.upload-panel { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); width: min(440px, calc(100% - 16px));
  max-height: 45vh; overflow: auto; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.25); padding: 12px 16px; display: grid; gap: 10px; }
.up-head { font-weight: 600; font-size: 15px; }
.up-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.up-bar { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--gray) 25%, transparent); overflow: hidden; margin-top: 4px; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.up-row.ok .up-bar i { background: var(--green); } .up-row.err .up-meta { color: var(--red); } .up-row.err .up-bar i { background: var(--red); }

/* Galerie: Alben und Raster wie in Fotos */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }
.album { display: grid; gap: 2px; color: var(--text); }
.album-cover { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(180deg, #5ac8fa, #007aff); color: #fff; box-shadow: var(--shadow); }
.album-cover svg { width: 44px; height: 44px; stroke-width: 1.6; }
.album-name { font-size: 15px; font-weight: 500; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-meta { font-size: 13px; color: var(--muted); }
body.has-bg .album-name, body.has-bg .album-meta { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px; border-radius: 12px; overflow: hidden; }
.ph { position: relative; aspect-ratio: 1; border: 0; padding: 0; margin: 0; background: var(--card2); cursor: pointer; overflow: hidden; display: block; width: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ph:hover img { transform: scale(1.03); }
.ph:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.ph-icon { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gray); } .ph-icon svg { width: 36px; height: 36px; }
.ph-badge { position: absolute; left: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; }
.ph-badge svg { width: 12px; height: 12px; }
@media (max-width: 520px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0 -16px; border-radius: 0; } .albums { grid-template-columns: repeat(2, 1fr); } }

/* Vollbild-Ansicht */
dialog.viewer { border: 0; padding: 0; margin: 0; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: #000; color: #fff; overflow: hidden; }
dialog.viewer::backdrop { background: #000; }
.viewer-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.viewer-stage img, .viewer-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer-bar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(rgba(0,0,0,.55), transparent); }
.v-title { flex: 1; font-size: 15px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; flex: none; }
.v-btn svg { width: 20px; height: 20px; }
.v-nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.v-nav svg { width: 22px; height: 22px; } .v-nav.prev { left: 12px; } .v-nav.next { right: 12px; }
dialog.viewer.single .v-nav { display: none; }
@media (hover: none) { .v-nav { display: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .segmented a[aria-current] { background: #636366; } }
:root[data-theme=dark] .segmented a[aria-current] { background: #636366; }

/* ---------- Einheitlicher Seitenrahmen (alle Seiten gleich breit, Leiste und Titel an derselben Stelle) ---------- */
.wrap, .wrap.narrow { max-width: 760px; }
.wrap { padding-top: 16px; }
.navbar { padding: 4px 0; padding-top: max(4px, env(safe-area-inset-top)); }
.bar-in { max-width: 760px; margin: 0 auto; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
.bar-in .back { margin-left: -8px; min-width: 0; }
.bar-in .back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55vw; }
.brand { font-size: 17px; font-weight: 600; letter-spacing: -.01em; min-height: 44px; display: inline-flex; align-items: center; }
.nav-actions { display: flex; align-items: center; gap: 2px; }
.nav-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--blue); display: grid; place-items: center; cursor: pointer; }
.nav-btn svg { width: 24px; height: 24px; }
.nav-btn:hover { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.nav-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.page-head { margin: 8px 0 24px; align-items: flex-end; }
.page-head .avatar { width: 56px; height: 56px; }
.page-head .status { margin-bottom: 6px; }
.action-list .action-file { display: block; width: 100%; text-align: center; font-size: 19px; color: var(--blue); padding: 16px; min-height: 56px; cursor: pointer; position: relative; }
.action-list .action-file:focus-within { outline: 2px solid var(--blue); outline-offset: -4px; }
.album-cover { background: linear-gradient(180deg, #ffb340, #ff8a00); }
.photo-grid { margin-top: 0; }
.upload-panel[hidden] { display: none; }
.page-head .eyebrow a { color: inherit; }
body.has-bg .page-head .eyebrow a { color: rgba(255,255,255,.88); }
.page-head + .toolbar { margin: -8px 0 20px; }

/* ---------- Vollbild-Ansicht: Bild immer ganz sichtbar (wie Fotos), Zoom per Geste ---------- */
dialog.viewer { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; }
.viewer-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.viewer-stage img, .viewer-stage video { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; min-width: 0; min-height: 0; }
.viewer-stage img { transform-origin: center center; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; will-change: transform; }
.viewer-stage.kann-zoomen { touch-action: none; cursor: zoom-in; }
dialog.viewer.zoomed .viewer-stage { cursor: grab; }
dialog.viewer.zoomed .v-nav { display: none; }
.viewer-stage .v-pdf { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-stage:has(.v-pdf) { padding-top: calc(60px + env(safe-area-inset-top)); }
.v-leer { color: rgba(255,255,255,.75); max-width: 320px; text-align: center; font-size: 15px; padding: 24px; }
.viewer-bar { z-index: 3; }
.v-nav { z-index: 3; }

/* ---------- Speicherplatz (Balken wie in den iOS-Einstellungen) ---------- */
.quota { display: grid; gap: 6px; }
.quota-bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--gray) 22%, transparent); overflow: hidden; }
.quota-bar i { display: block; height: 100%; border-radius: 4px; background: var(--blue); min-width: 2px; }
.quota-bar.knapp i { background: var(--orange); } .quota-bar.voll i { background: var(--red); }
.quota-text { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.quota.klein .quota-bar { height: 6px; }
.toolbar + .quota { margin: 0 0 20px; max-width: 360px; }
body.has-bg .toolbar + .quota .quota-text { color: rgba(255,255,255,.88); text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.quota-hint { margin-top: 10px; }
.quota-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: .5px solid var(--line); }
.quota-row .grow { min-width: 160px; }
.quota-row select, .quota-row .quota-eigen { font: inherit; font-size: 15px; color: var(--text); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); min-height: 36px; }
.quota-row .quota-eigen { width: 90px; }
.quota-row .quota-eigen[hidden] { display: none; }
.quota-summe { margin-bottom: 12px; display: grid; gap: 4px; }
.warn-text { color: var(--orange); }

/* ---------- Trading Bot: Zeitraum, Heute zu tun, Trades ---------- */
.seg { display: flex; background: color-mix(in srgb, var(--gray) 18%, transparent); border-radius: 9px; padding: 2px; margin: 14px 0 4px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-btn { flex: 1 0 auto; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); padding: 6px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; min-height: 32px; }
.seg-btn[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .seg-btn[aria-pressed="true"] { background: #636366; } }
:root[data-theme=dark] .seg-btn[aria-pressed="true"] { background: #636366; }
.spark.big { height: 160px; }
.chart-leer { color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }
.verlauf-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.sec-meta { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; }
h3.sub { font-size: 13px; font-weight: 700; letter-spacing: .04em; margin: 18px 0 8px 4px; }
h3.sub.pos { color: var(--green); } h3.sub.neg { color: var(--red); }
.row.todo, .row.trade { align-items: flex-start; }
.row.todo .tk, .row.trade .tk { margin-top: 2px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 4px 16px; margin: 8px 0 6px; font-size: 15px; font-variant-numeric: tabular-nums; }
.kv i { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.kv b { font-weight: 600; font-size: 13px; color: var(--muted); }
.kv b.pos { color: var(--green); } .kv b.neg { color: var(--red); }
.todo-status { display: flex; align-items: center; gap: 8px; }
.dot.warn { background: var(--orange); }
.pill.warn { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.log-details { margin-top: 12px; padding: 0; overflow: hidden; }
.log-details summary { padding: 14px 20px; cursor: pointer; font-weight: 600; list-style-position: inside; }
.log-details .log { border-top: .5px solid var(--line); }
.meta b.pos, .hint b.pos { color: var(--green); } .meta b.neg, .hint b.neg { color: var(--red); }
.seg-btn .kurz { display: none; }
@media (max-width: 520px) { .seg-btn .lang { display: none; } .seg-btn .kurz { display: inline; } .seg-btn { flex: 1 1 0; padding: 6px 4px; } .seg { overflow: visible; } }
.kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .kv { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.todo-status .dot { width: 10px; height: 10px; }

.banner .grow { display: grid; gap: 4px; }
.hinweise { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }

/* ---------- Auswählen (wie Fotos): Knopf oben rechts, Häkchen, Leiste unten ---------- */
.nav-pill { font: inherit; font-size: 15px; font-weight: 600; min-height: 32px; padding: 6px 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); margin-right: 4px; }
.nav-pill[aria-pressed="true"] { background: var(--card2); color: var(--text); }
.nav-pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sel-mark { display: none; }
main.waehlen [data-sel] { cursor: pointer; }
main.waehlen .ph .sel-mark { display: grid; position: absolute; z-index: 1; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%;
  place-items: center; border: 1.5px solid #fff; background: rgba(0,0,0,.18); color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
main.waehlen .ph .sel-mark svg, main.waehlen .row .sel-mark svg { width: 14px; height: 14px; }
main.waehlen .ph.gewaehlt .sel-mark { background: var(--blue); color: #fff; }
main.waehlen .ph.gewaehlt img, main.waehlen .ph.gewaehlt .ph-icon { opacity: .72; }
main.waehlen .ph:hover img { transform: none; }
main.waehlen .row[data-sel] .sel-mark { display: grid; flex: none; width: 24px; height: 24px; border-radius: 50%; place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--gray) 60%, transparent); color: transparent; }
main.waehlen .row[data-sel].gewaehlt .sel-mark { background: var(--blue); border-color: var(--blue); color: #fff; }
main.waehlen .row[data-sel].gewaehlt { background: color-mix(in srgb, var(--blue) 8%, transparent); }
main.waehlen .row[data-sel] .file-link { margin-left: 0; padding-left: 0; pointer-events: none; }
main.waehlen .row[data-sel] .icon-btn { visibility: hidden; }
.sel-bar { position: fixed; z-index: 21; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: min(560px, calc(100% - 16px));
  display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 18px;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 10px 40px rgba(0,0,0,.22), inset 0 0 0 .5px var(--line); }
.sel-bar[hidden] { display: none; }
.sel-count { flex: 1; text-align: center; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-txt { font: inherit; font-size: 15px; font-weight: 500; color: var(--blue); background: transparent; border: 0; min-height: 44px; min-width: 56px; padding: 0 10px; border-radius: 12px; cursor: pointer; }
.sel-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; display: grid; place-items: center; background: transparent; color: var(--blue); cursor: pointer; flex: none; }
.sel-btn svg { width: 24px; height: 24px; }
.sel-btn.destructive { color: var(--red); }
.sel-btn:disabled { color: var(--gray); opacity: .45; cursor: default; }
.sel-btn:not(:disabled):hover, .sel-txt:hover { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.sel-btn:focus-visible, .sel-txt:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
body.waehlen main.wrap { padding-bottom: 96px; }
body.waehlen .upload-panel { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 68px); }

/* Ordnerwahl-Blatt (Verschieben) */
.ziel-list { max-height: 55vh; overflow: auto; box-shadow: none; background: var(--card2); }
.ziel-list button.row { width: 100%; font: inherit; text-align: left; border: 0; border-top: .5px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.ziel-list button.row:first-child { border-top: 0; }
.ziel-list button.row:hover { background: color-mix(in srgb, var(--blue) 8%, transparent); }
.ziel-list .name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ziel-list .grow { min-width: 0; }

/* Teilen: Gruppen und Personen */
.share-scroll { max-height: 55vh; overflow: auto; display: grid; gap: 6px; }
.share-scroll .share-list { max-height: none; overflow: visible; }
.share-sub { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; padding: 6px 4px 0; }

/* ---------- Galerie: Ordner als Album-Kachel, klar getrennt von Bildern ---------- */
.album-cover { position: relative; margin-top: 7px; overflow: visible; }
.album-cover::before { content: ""; position: absolute; left: 8px; right: 8px; top: -6px; height: 12px; border-radius: 10px 10px 0 0;
  background: color-mix(in srgb, var(--gray) 35%, var(--card)); z-index: -1; }
.album { position: relative; z-index: 0; }
.album-cover.has-img { background: var(--card2); }
.album-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.album-leer { display: grid; place-items: center; color: #fff; }
.album-leer svg { width: 44px; height: 44px; stroke-width: 1.6; }
.album-badge { position: absolute; left: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(0,0,0,.42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; }
.album-badge svg { width: 16px; height: 16px; stroke-width: 2; }
.album-cover:not(.has-img) .album-badge { display: none; }
.album:hover .album-cover img { filter: brightness(1.04); }
.album:focus-visible .album-cover { outline: 3px solid var(--blue); outline-offset: 2px; }
.albums + .sec, .albums + .hint { margin-top: 28px; }
.v-btn.aktiv { background: #fff; color: #000; }

/* Verwaltung: App-Gruppe je App */
.row.app-row { flex-wrap: wrap; }
.app-gruppe-form { display: flex; align-items: center; gap: 6px; }
.app-gruppe-form select, .form-select { font: inherit; font-size: 15px; color: var(--text); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); min-height: 36px; }
.form-select { display: block; width: 100%; margin-top: 6px; min-height: 44px; font-size: 17px; }
.toggle .pill { margin-left: 0; }
@media (max-width: 600px) { .row.app-row .app-gruppe-form { width: 100%; padding-left: 40px; } .app-gruppe-form select { flex: 1; } }

/* ---------- Verwaltung: Kacheln, Mitglieder-Raster, Mitglied-Details ---------- */
.admin-tiles { margin-top: 8px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.member { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 18px 10px 14px; border-radius: var(--r);
  background: var(--card); box-shadow: var(--shadow); color: var(--text); transition: transform .18s cubic-bezier(.2,.8,.2,1); -webkit-tap-highlight-color: transparent; min-width: 0; }
.member:hover { transform: translateY(-2px); } .member:active { transform: scale(.97); }
.member:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.m-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 600; letter-spacing: .02em; flex: none; margin-bottom: 8px; overflow: hidden; }
.m-avatar.has-photo { background: var(--card2); } .m-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-avatar.gross { width: 88px; height: 88px; font-size: 32px; margin: 0; box-shadow: var(--shadow); }
.member-name { font-size: 15px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-login { font-size: 13px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-status { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--card2); color: var(--muted); }
.member-status.admin { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.member-status.gesperrt { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.member-hero .member-status { margin-top: 0; }
.member-hero { display: flex; align-items: center; gap: 16px; margin: -8px 0 8px; }
.hero-name { font-size: 20px; font-weight: 600; }
.row.kv { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
.kv-v { color: var(--muted); text-align: right; max-width: 60%; overflow-wrap: anywhere; }
.app-toggles.flat { margin-top: 0; border-top: 0; padding-top: 16px; }
.card.name-row, .card.quota-row { padding: 12px 16px; margin-top: 0; border-top: 0; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); display: grid; gap: 10px; }
.danger-zone .name-row { margin: 0; }
.danger-head { color: var(--red); }
body.has-bg .member-grid .member, body.has-bg .card.danger-zone { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
body.has-bg .danger-head { color: #fff; }
@media (max-width: 520px) { .member-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .m-avatar { width: 56px; height: 56px; font-size: 20px; } }
/* ---------- Trading: Depotwert-Chart zum Scrubben (Admin /trading und Aktien /trading/heute) ---------- */
.tr-karte { padding: 20px 20px 16px; }
.tr-wert { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; line-height: 1.15; }
.tr-diff { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; min-height: 20px; }
.tr-zeitraum { color: var(--muted); font-weight: 500; margin-left: 8px; }
.tr-zeitraum.allein { margin-left: 0; }
.tr-chart { position: relative; margin-top: 16px; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: crosshair; }
.tr-svg { display: block; overflow: visible; color: var(--green); }
.tr-svg.neg { color: var(--red); }
.tr-linie { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tr-basis { stroke: var(--gray); stroke-width: 1; stroke-dasharray: 2 4; opacity: .8; }
.tr-scrub { stroke: var(--muted); stroke-width: 1; display: none; }
.tr-punkt { fill: currentColor; stroke: var(--card); stroke-width: 2; display: none; }
.tr-chart.scrubbing .tr-scrub, .tr-chart.scrubbing .tr-punkt { display: inline; }
.tr-achse { position: relative; height: 24px; margin-top: 4px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-tick { position: absolute; top: 4px; transform: translateX(-50%); }
.tr-scrub-zeit { position: absolute; top: 2px; transform: translateX(-50%); display: none; font-size: 12px; font-weight: 600; color: var(--text); }
.tr-chart.scrubbing .tr-ticks { visibility: hidden; }
.tr-chart.scrubbing .tr-scrub-zeit { display: block; }
.tr-seg { margin: 12px 0 0; }
.tr-kacheln { margin-top: 24px; }
.tr-protokoll { margin-top: 32px; }
.pill.pos { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.pill.neg { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
@media (max-width: 520px) { .tr-wert { font-size: 30px; } .tr-karte { padding: 16px 16px 12px; } }

/* Verwaltung: Gruppen-Kacheln und Gruppen-Details */
.m-avatar svg { width: 30px; height: 30px; }
.m-avatar.gross svg { width: 40px; height: 40px; }
.m-avatar.mini { width: 22px; height: 22px; font-size: 10px; margin: 0; box-shadow: 0 0 0 2px var(--card); }
.m-avatar.klein { width: 36px; height: 36px; font-size: 14px; margin: 0; }
.m-avatar.mehr { background: var(--card2); color: var(--muted); font-weight: 600; }
.mini-stack { display: flex; justify-content: center; margin-top: 8px; min-height: 22px; }
.mini-stack .m-avatar + .m-avatar { margin-left: -6px; }
.toggle .m-avatar.mini { box-shadow: none; }
.group-tile.neu { background: transparent; box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--gray) 45%, transparent); justify-content: center; }
.neu-icon { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
a.plain { color: var(--text); min-width: 0; } a.plain .name, a.plain .meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-select { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--text); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); min-height: 36px; }
body.has-bg .group-tile.neu { background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* Dashboard: einklappbarer Abschnitt „Admin“ (Apple-Disclosure) */
.admin-apps { margin-top: 28px; }
.admin-apps > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 4px; min-height: 44px; border-radius: 12px; -webkit-tap-highlight-color: transparent; user-select: none; }
.admin-apps > summary::-webkit-details-marker { display: none; }
.admin-apps > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.admin-apps-titel { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.admin-apps .disclosure { margin-left: auto; color: var(--blue); display: grid; transition: transform .25s cubic-bezier(.2,.8,.2,1); transform: rotate(180deg); }
.admin-apps .disclosure svg { width: 18px; height: 18px; }
.admin-apps[open] .disclosure { transform: rotate(-90deg); }
.admin-apps > .apps { margin-top: 12px; }
.admin-apps[open] > .apps { animation: aufklappen .25s cubic-bezier(.2,.8,.2,1); }
@keyframes aufklappen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.badge.static { position: static; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; }
body.has-bg .admin-apps-titel { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
body.has-bg .admin-apps .disclosure { color: #fff; }
@media (prefers-reduced-motion: reduce) { .admin-apps .disclosure, .admin-apps[open] > .apps { transition: none; animation: none; } }

/* Ordner: welches Speicher-Kontingent gilt */
.kontingent-hint { margin: 0 0 20px; }
.kontingent-gruppe { margin: 0 0 20px; max-width: 360px; }
.quota-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
body.has-bg .kontingent-gruppe .quota-label, body.has-bg .kontingent-gruppe .quota-text { color: rgba(255,255,255,.88); text-shadow: 0 1px 3px rgba(0,0,0,.45); }

/* Verwaltung: große Kacheln, Registrierungen als kleines Fenster oben rechts, Admin als große Kachel */
.big-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.big-tile { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px 16px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); color: var(--text);
  transition: transform .18s cubic-bezier(.2,.8,.2,1); -webkit-tap-highlight-color: transparent; min-height: 190px; }
.big-tile:hover { transform: translateY(-2px); } .big-tile:active { transform: scale(.98); }
.big-tile:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.big-tile-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.big-tile .app-icon { width: 48px; height: 48px; border-radius: 12px; } .big-tile .app-icon svg { width: 26px; height: 26px; }
.big-tile-zahl { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big-tile-name { font-size: 17px; font-weight: 600; }
.big-tile-sub { font-size: 13px; color: var(--muted); }
.big-stack { justify-content: flex-start; margin-top: 12px; }
.reg-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px 4px 8px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--card); color: var(--muted); box-shadow: var(--shadow); margin-right: 4px; }
.reg-chip svg { width: 18px; height: 18px; }
.reg-chip.offen { background: var(--red); color: #fff; }
.reg-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.member-hero-tile { flex-direction: row; align-items: center; text-align: left; gap: 16px; padding: 20px; margin-bottom: 12px; }
.member-hero-tile .grow { display: flex; flex-direction: column; min-width: 0; }
.member-hero-tile .member-name { font-size: 20px; }
.member-hero-tile .member-status { align-self: flex-start; }
.member-hero-tile .chev { margin-left: auto; }
body.has-bg .big-tile, body.has-bg .reg-chip:not(.offen) { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
@media (max-width: 520px) { .big-tiles { grid-template-columns: 1fr; } .big-tile { min-height: 0; } }
.m-avatar.mini { font-size: 9px; letter-spacing: 0; } .m-avatar.mini svg { width: 13px; height: 13px; stroke-width: 2.2; }
body.has-bg .member-hero-tile { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }

/* Registrierung: Warte-Meldung */
.warte-schritte { width: 100%; max-width: 340px; margin: 20px auto 4px; text-align: left; }
.warte-schritte .row { min-height: 48px; }
.warte-schritte .meta { display: block; }

/* Dashboard: Kacheln umsortieren (Gedrückthalten, Wackeln, Ziehen) */
section.apps[data-bereich] .app { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
body.kacheln-bearbeiten section.apps[data-bereich] { touch-action: none; }
body.kacheln-bearbeiten section.apps[data-bereich] .app { cursor: grab; }
body.kacheln-bearbeiten section.apps[data-bereich] .app:not(.zieht) .app-icon { animation: wackeln .28s ease-in-out infinite alternate; }
body.kacheln-bearbeiten section.apps[data-bereich] .app:nth-child(2n) .app-icon { animation-delay: -.14s; }
body.kacheln-bearbeiten section.apps[data-bereich] .app:hover .app-icon { transform: none; }
.app.zieht { position: relative; z-index: 30; cursor: grabbing; transition: none; }
.app.zieht .app-icon { box-shadow: 0 12px 30px rgba(0,0,0,.3); }
@keyframes wackeln { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@media (prefers-reduced-motion: reduce) { body.kacheln-bearbeiten section.apps[data-bereich] .app .app-icon { animation: none; outline: 2px dashed color-mix(in srgb, var(--gray) 60%, transparent); outline-offset: 3px; } }

/* Aktionszeile: Hochladen … links, Auswählen und Drei-Punkte rechts in derselben Reihe */
.toolbar { align-items: center; }
.toolbar-rechts { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; }
.toolbar-rechts .nav-pill { margin-right: 0; min-height: 40px; padding: 8px 16px; }
body.has-bg .toolbar-rechts .nav-pill:not([aria-pressed="true"]), body.has-bg .toolbar-rechts .nav-btn { background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
body.has-bg .toolbar-rechts .nav-btn { color: var(--blue); }
/* Ordner im Auswahlmodus (zum Laden) */
main.waehlen .album .sel-mark { display: grid; position: absolute; z-index: 2; right: 8px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%;
  place-items: center; border: 1.5px solid #fff; background: rgba(0,0,0,.18); color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
main.waehlen .album .sel-mark svg { width: 14px; height: 14px; }
main.waehlen .album.gewaehlt .sel-mark { background: var(--blue); color: #fff; }
main.waehlen .album.gewaehlt .album-cover { opacity: .78; }
main.waehlen .row[data-sel-ordner] .sel-mark { display: grid; flex: none; width: 24px; height: 24px; border-radius: 50%; place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--gray) 60%, transparent); color: transparent; }
main.waehlen .row[data-sel-ordner] .sel-mark svg { width: 14px; height: 14px; }
main.waehlen .row[data-sel-ordner].gewaehlt .sel-mark { background: var(--blue); border-color: var(--blue); color: #fff; }
main.waehlen .row[data-sel-ordner] .chev { visibility: hidden; }

/* Dashboard: Uhrzeit neben dem Datum */
.page-head .uhr { font-variant-numeric: tabular-nums; }

/* ---------- App installieren (/app, Kachel „App“) ---------- */
.wrap { padding-bottom: max(64px, calc(env(safe-area-inset-bottom) + 32px)); }
#app-install [hidden], .app-sheet [hidden] { display: none !important; }
.app-hero { display: flex; align-items: center; gap: 16px; }
.app-hero img { width: 64px; height: 64px; border-radius: 15px; flex: none; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.app-hero h2 { margin: 0 0 2px; font-size: 20px; font-weight: 700; }
.app-hero p { margin: 0; color: var(--muted); font-size: 15px; }
.app-ok { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.app-ok-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.app-ok-icon svg { width: 20px; height: 20px; }
.app-plattformen { display: grid; gap: 16px; margin-top: 16px; }
.app-plattform { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.app-plattform h2 { margin: 0 0 2px; font-size: 17px; font-weight: 600; }
.app-plattform .btn { margin-top: 4px; }
.app-plattform-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; flex: none; background: linear-gradient(180deg, #3a3a3c, #1c1c1e); color: #fff; }
.app-plattform-icon.android { background: linear-gradient(180deg, #4cd964, #1fa84a); }
.app-plattform-icon svg { width: 26px; height: 26px; }
.steps { list-style: none; counter-reset: schritt; margin: 0; padding: 0; }
.steps li { counter-increment: schritt; display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); text-align: left; }
.steps li:first-child { border-top: 0; padding-top: 4px; }
.steps li::before { content: counter(schritt); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 14px; font-weight: 600; display: grid; place-items: center; margin-top: -1px; }
.steps .hint.tight { display: inline-block; margin-top: 2px; }
.sym { width: 20px; height: 20px; vertical-align: -4px; color: var(--blue); }
.app-sheet h2 { font-size: 20px; font-weight: 700; }
.app-qr { display: flex; align-items: center; gap: 20px; margin-top: 16px; }
.app-qr img { width: 176px; height: 176px; flex: none; background: #fff; border-radius: 12px; padding: 6px; image-rendering: pixelated; }
@media (max-width: 480px) { .app-qr { flex-direction: column; text-align: center; } }
.app-hinweis { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 8px 10px 12px; margin: 0 0 20px; }
.app-hinweis img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.app-hinweis a.grow { color: var(--text); text-decoration: none; display: grid; line-height: 1.25; min-width: 0; }
.app-hinweis a.grow b { font-size: 15px; font-weight: 600; }
.app-hinweis a.grow span { font-size: 13px; color: var(--muted); }
.app-hinweis .btn { flex: none; }
.app-hinweis-zu { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.app-hinweis-zu svg { width: 16px; height: 16px; }
body.has-bg .app-hinweis { -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); background: var(--glass); }

/* ---------- Dashboard: Widget-Spalte (Admin) – am PC seitlich, am Handy oben untereinander ---------- */
main.wrap.dash-breit { max-width: 1120px; }
.dash.mit-widgets { display: grid; gap: 24px; }
.widget-spalte { display: grid; gap: 12px; align-content: start; }
.widget-spalte .widgets { margin: 0; }
.dash.mit-widgets .dash-kacheln > .apps:first-child { margin-top: 0; }
@media (min-width: 900px) {
  .dash.mit-widgets { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .dash.mit-widgets .widget-spalte { order: 2; position: sticky; top: 72px; }
  .dash.mit-widgets .dash-kacheln { order: 1; }
}
.verw-widget, .status-widget { display: block; background: var(--card); border-radius: 22px; padding: 16px 20px; box-shadow: var(--shadow); color: var(--text); }
.verw-widget > .widget-head { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.verw-widget > .widget-head .chev { margin-left: auto; }
.schnell { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.schnell a { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--card2); color: var(--text); transition: transform .15s; }
.schnell a:active { transform: scale(.96); }
.schnell .zahl { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.schnell .was { font-size: 13px; color: var(--muted); }
.schnell a.offen { background: var(--red); color: #fff; } .schnell a.offen .was { color: rgba(255,255,255,.85); }
.status-widget .widget-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status-widget .widget-head .status { margin-left: auto; }
.ringe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.ring { position: relative; display: grid; justify-items: center; gap: 6px; }
.ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.6; }
.ring-bg { stroke: color-mix(in srgb, var(--gray) 22%, transparent); }
.ring-fg { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .6s cubic-bezier(.2,.8,.2,1), stroke .3s; }
.ring.warn .ring-fg { stroke: var(--orange); } .ring.voll .ring-fg { stroke: var(--red); }
.ring-wert { position: absolute; top: 0; height: 76px; display: grid; place-items: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring-name { font-size: 13px; color: var(--muted); }
body.has-bg .verw-widget, body.has-bg .status-widget { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
body.has-bg .schnell a:not(.offen) { background: color-mix(in srgb, var(--card2) 70%, transparent); }
@media (prefers-reduced-motion: reduce) { .ring-fg { transition: none; } }
body:has(main.dash-breit) .navbar .bar-in { max-width: 1120px; }
.widget-spalte .widget-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.widget-spalte .widget-body > div:first-child { grid-column: 1 / -1; }
body.has-bg #app-install .card .hint, body.has-bg .app-sheet .hint { color: var(--muted); text-shadow: none; }

/* Verwaltung: Testkonto neben der großen Admin-Kachel; Mein Konto: Zurück zum Hauptkonto */
.hero-reihe { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 12px; margin-bottom: 12px; }
.hero-reihe .member-hero-tile { margin-bottom: 0; }
.test-tile { justify-content: center; border: 1.5px dashed color-mix(in srgb, var(--blue) 45%, transparent); }
.test-tile.neu { gap: 6px; }
.test-tile .member-status { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
body.has-bg .test-tile { background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.zurueck-haupt { margin: -8px 0 20px; }
.zurueck-haupt .btn svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .hero-reihe { grid-template-columns: 1fr; } }

/* ---------- Galerie: Ordner deutlich anders als Fotos (Ordner-Karte mit Reiter, Stapel, großes Ordner-Badge) ---------- */
.albums { gap: 22px 14px; padding-top: 10px; }
.album { --ordner: var(--orange); background: color-mix(in srgb, var(--ordner) 14%, var(--card)); border-radius: 4px 18px 18px 18px; padding: 10px 10px 12px;
  box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--ordner) 28%, transparent); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.album::before { content: ""; position: absolute; left: 0; top: -10px; width: 46%; height: 14px; border-radius: 10px 12px 0 0;
  background: color-mix(in srgb, var(--ordner) 14%, var(--card)); box-shadow: inset 0 1px 0 0 color-mix(in srgb, var(--ordner) 28%, transparent), inset 1px 0 0 0 color-mix(in srgb, var(--ordner) 28%, transparent), inset -1px 0 0 0 color-mix(in srgb, var(--ordner) 28%, transparent); }
.album:hover { transform: translateY(-2px); } .album:active { transform: scale(.98); }
.album-cover { margin-top: 10px; border-radius: 12px; }
.album-cover::before { left: 10px; right: 10px; top: -8px; height: 14px; background: color-mix(in srgb, var(--ordner) 35%, var(--card)); }
.album-cover::after { content: ""; position: absolute; left: 20px; right: 20px; top: -14px; height: 14px; border-radius: 10px 10px 0 0; z-index: -2;
  background: color-mix(in srgb, var(--ordner) 22%, var(--card)); }
.album-badge { display: grid !important; left: 8px; top: 8px; bottom: auto; width: 36px; height: 36px; border-radius: 10px; background: var(--ordner); color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); -webkit-backdrop-filter: none; backdrop-filter: none; }
.album-badge svg { width: 20px; height: 20px; stroke-width: 2.2; }
.album-cover:not(.has-img) .album-leer svg { width: 52px; height: 52px; }
.album-name { font-size: 16px; font-weight: 700; margin-top: 10px; }
.album-meta { font-weight: 500; }
body.has-bg .album { background: color-mix(in srgb, var(--ordner) 20%, var(--glass)); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
body.has-bg .album::before { background: color-mix(in srgb, var(--ordner) 20%, var(--glass)); }
body.has-bg .album-name, body.has-bg .album-meta { color: var(--text); text-shadow: none; }
main.waehlen .album .sel-mark { z-index: 3; }
@media (max-width: 520px) { .albums { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; } .album { padding: 8px 8px 10px; } .album-name { font-size: 15px; } }
/* Aktionszeile am Handy in einer Reihe: Neuer Ordner/Teilen als Symbol-Knöpfe (Text bleibt für Screenreader) */
@media (max-width: 480px) {
  .toolbar { flex-wrap: nowrap; }
  .toolbar > .btn:not(.filled) { padding: 8px 12px; }
  .toolbar > .btn:not(.filled) > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .toolbar-rechts .nav-pill { padding: 8px 12px; }
}

/* Profilbilder klein in Listen; Mein Konto: Profilbild; Dashboard-Kopf */
.share-list .row .m-avatar, .list .row > .m-avatar.klein { flex: none; }
.mini-stack.links { justify-content: flex-start; margin-top: 6px; }
.profil-row .avatar { width: 56px; height: 56px; box-shadow: none; }
.kopf-avatar { display: block; border-radius: 50%; flex: none; }
.kopf-avatar .avatar { width: 48px; height: 48px; } .kopf-avatar .avatar svg { width: 26px; height: 26px; }
.kopf-avatar:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.profil-row .grow { min-width: 0; }

/* Mitglied-Details: Apps als Schalter, Admin-Apps einklappbar */
.app-schalter { display: grid; gap: 12px; }
.stack-sm { display: grid; gap: 8px; }
.app-switch { gap: 12px; }
.app-switch .grow { flex: 1; }
.admin-apps-person { margin-top: 4px; }
.admin-apps-person > .stack-sm { margin-top: 8px; }
.admin-apps-titel.klein { font-size: 17px; }
body.has-bg .admin-apps-person .admin-apps-titel { color: #fff; }

/* ---------- Übertragungen (public/transfer.js): Knopf unten links + Blatt ---------- */
.hn-tr-btn { position: fixed; z-index: 30; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); width: 52px; height: 52px; border: 0; border-radius: 50%; padding: 0;
  background: var(--card); color: var(--blue); box-shadow: 0 4px 16px rgba(0,0,0,.18); cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.hn-tr-btn[hidden] { display: none; }
.hn-tr-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
body.has-bg .hn-tr-btn { background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
body.waehlen .hn-tr-btn { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 68px); }
.hn-tr-ring { position: absolute; inset: 0; width: 52px; height: 52px; transform: rotate(-90deg); }
.hn-tr-ring circle { fill: none; stroke-width: 3.5; }
.hn-tr-ring .bg { stroke: color-mix(in srgb, var(--gray) 22%, transparent); }
.hn-tr-ring .fg { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .3s; }
.hn-tr-sym, .hn-tr-ok { width: 22px; height: 22px; position: relative; }
.hn-tr-btn.hoch .hn-tr-sym { transform: rotate(180deg); }
.hn-tr-ok { display: none; }
.hn-tr-btn.fertig { color: var(--green); } .hn-tr-btn.fertig .hn-tr-ring .fg { stroke: var(--green); }
.hn-tr-btn.fertig .hn-tr-sym { display: none; } .hn-tr-btn.fertig .hn-tr-ok { display: block; }
.hn-tr-btn.fehler { color: var(--red); } .hn-tr-btn.fehler .hn-tr-ring .fg { stroke: var(--red); }
.hn-tr-box { background: var(--card); border-radius: 16px; padding: 20px; display: grid; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.hn-tr-liste { display: grid; max-height: min(55vh, 440px); overflow-y: auto; overscroll-behavior: contain; }
.hn-tr-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.hn-tr-zeile:first-child { border-top: 0; }
.hn-tr-art { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); font-weight: 700; }
.hn-tr-zeile.ok .hn-tr-art { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.hn-tr-zeile.err .hn-tr-art { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.hn-tr-text { flex: 1; min-width: 0; }
.hn-tr-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hn-tr-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hn-tr-zeile.err .hn-tr-meta { color: var(--red); }
.hn-tr-bar { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--gray) 25%, transparent); overflow: hidden; margin-top: 5px; }
.hn-tr-bar i { display: block; height: 100%; background: var(--blue); transition: width .2s; }
.hn-tr-akt { width: 30px; height: 30px; border-radius: 50%; border: 0; flex: none; background: color-mix(in srgb, var(--gray) 18%, transparent); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.hn-tr-akt svg { width: 14px; height: 14px; }
.hn-tr-haken { width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--green); color: #fff; display: grid; place-items: center; }
.hn-tr-haken svg { width: 15px; height: 15px; }

/* Logo: Dashboard-Kopf und Anmeldung */
.brand { gap: 8px; }
.brand-logo { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.login-logo { width: 96px; height: 96px; display: block; margin: 0 auto 12px; filter: drop-shadow(0 6px 18px rgba(0, 90, 220, .35)); }
