/* =========================================================================
   Vereinskasse – Glas-Design (hell & dunkel)
   ========================================================================= */
:root {
  --text: #16171d;
  --muted: rgba(40, 44, 60, .62);
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-hover: rgba(255, 255, 255, .75);
  --stroke: rgba(255, 255, 255, .75);
  --stroke-soft: rgba(20, 24, 40, .06);
  --sep: rgba(30, 34, 50, .09);
  --shadow: 0 10px 30px rgba(36, 44, 92, .10), 0 1px 2px rgba(36, 44, 92, .06);
  --accent: #e53935;
  --accent-2: #ff7a45;
  --accent-soft: rgba(229, 57, 53, .12);
  --accent-grad: linear-gradient(135deg, #ff6a4d 0%, #e53935 55%, #c2185b 100%);
  --ok: #1f9d55;
  --warn: #c77700;
  --err: #d32f2f;
  --radius: 22px;
  --radius-sm: 14px;
  --blur: saturate(170%) blur(22px);
  --tabbar-h: 66px;
  --bg-base: #eef1f8;
  --bg-1: rgba(255, 120, 90, .38);
  --bg-2: rgba(110, 120, 255, .30);
  --bg-3: rgba(60, 200, 210, .22);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #f3f4fa;
    --muted: rgba(225, 228, 245, .58);
    --glass: rgba(255, 255, 255, .065);
    --glass-strong: rgba(34, 37, 58, .78);
    --glass-hover: rgba(255, 255, 255, .11);
    --stroke: rgba(255, 255, 255, .11);
    --stroke-soft: rgba(255, 255, 255, .06);
    --sep: rgba(255, 255, 255, .07);
    --shadow: 0 14px 40px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .04) inset;
    --accent: #ff5a4f;
    --accent-soft: rgba(255, 90, 79, .16);
    --ok: #4cd583;
    --warn: #ffb547;
    --err: #ff6b6b;
    --bg-base: #0d1020;
    --bg-1: rgba(229, 57, 53, .32);
    --bg-2: rgba(94, 92, 230, .30);
    --bg-3: rgba(20, 160, 180, .16);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--text); background: var(--bg-base); }
body {
  min-height: 100vh;
  font: 16px/1.42 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom));
}
/* Farbiger Hintergrund (fest, damit das Glas darauf wirkt) */
body::before {
  content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48% 38% at 8% 4%, var(--bg-1), transparent 70%),
    radial-gradient(45% 40% at 100% 18%, var(--bg-2), transparent 70%),
    radial-gradient(55% 45% at 40% 100%, var(--bg-3), transparent 70%),
    var(--bg-base);
}
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* Glas-Grundbaustein */
.glass, .card, .list, .kpi, .menu-btn, .search, .input, .select, textarea, .segmented, .product, .chip, .tabbar, .book-bar, .topbar, .modal-card, .toast {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, .9); --glass-strong: #fff; }
  @media (prefers-color-scheme: dark) { :root { --glass: rgba(34, 37, 58, .92); --glass-strong: #22253a; } }
}
.glass { background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 22px 18px; }

/* ------------------------------------------------------------- Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: calc(8px + env(safe-area-inset-top)) 18px 10px;
  background: linear-gradient(to bottom, var(--glass-strong), var(--glass));
  border-bottom: 1px solid var(--stroke-soft);
}
.topbar-inner { max-width: 980px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.brand { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.page-title { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.sync-pill {
  border: 1px solid var(--stroke); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  background: var(--glass); color: var(--ok); cursor: pointer; white-space: nowrap; margin-bottom: 4px;
}
.sync-pill.warn { color: var(--warn); border-color: rgba(255, 170, 0, .35); background: rgba(255, 170, 0, .12); }
.sync-pill.err { color: #fff; background: var(--err); border-color: transparent; }

main { max-width: 980px; margin: 0 auto; padding: 14px 16px 0; }
.view > h2, .view h2 { margin: 6px 0 12px; font-size: 21px; letter-spacing: -.01em; }

/* ------------------------------------------------------------- Suche & Felder */
.search-wrap { position: relative; display: block; margin-bottom: 12px; }
.search-wrap .ico { position: absolute; z-index: 2; pointer-events: none; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.search-wrap .search { padding-left: 44px; margin: 0; }
.search, .input, .select, textarea {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.search::placeholder, .input::placeholder, textarea::placeholder { color: var(--muted); }
.search:focus, .input:focus, .select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.select { margin-bottom: 12px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea { resize: vertical; min-height: 84px; }
/* Aufklappende Listen kommen vom System: feste, gut lesbare Farben statt Glas-Transparenz */
select option, select optgroup { background-color: #ffffff; color: #16171d; }
select option:checked { background-color: #fde3e2; color: #b3261e; }
select option:disabled { color: #9a9cab; }
@media (prefers-color-scheme: dark) {
  select option, select optgroup { background-color: #23263b; color: #f3f4fa; }
  select option:checked { background-color: #4a2330; color: #ffb4ab; }
  select option:disabled { color: #7d8096; }
}
/* Ausgewählter Text im geschlossenen Feld immer kräftig */
.select, .filters .select { color: var(--text); font-weight: 500; }
/* Datums- und Monatsfelder: Kalender-Symbol im dunklen Modus sichtbar */
input[type="date"], input[type="month"] { color-scheme: light dark; min-height: 46px; }
.search { margin-bottom: 10px; }

/* ------------------------------------------------------------- Listen (gruppiert wie iOS) */
.list {
  list-style: none; margin: 0 0 14px; padding: 0; overflow: hidden;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow);
}
.list:empty { display: none; }
.list li {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px;
  padding: 10px 14px; cursor: pointer; transition: background .12s;
}
.list li + li::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--sep); }
.list li:has(> .avatar) + li::before { left: 66px; }
.list li:hover { background: var(--glass-hover); }
.list li:active { background: var(--accent-soft); }
.list > .empty { padding: 26px 16px; }
.list .sub { color: var(--muted); font-size: 13px; margin-top: 1px; }
.list .right { margin-left: auto; text-align: right; white-space: nowrap; }
.list li > div:first-child:not(.li-main) { flex: 1; min-width: 0; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--muted); width: 18px; height: 18px; opacity: .7; }
.amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.amount.credit { color: var(--ok); }
.list li.struck .li-title, .list li.struck > div:first-child { text-decoration: line-through; opacity: .55; }
.list li.dim { opacity: .5; }

.avatar {
  --h: 200;
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .02em;
  background: linear-gradient(140deg, hsl(var(--h), 78%, 62%), hsl(calc(var(--h) + 38), 72%, 46%));
  box-shadow: 0 4px 12px hsla(var(--h), 70%, 45%, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* Medaillen (Top 3 des Vormonats) – gut sichtbar */
.medals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 55%; }
.medal {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
}
.medal-ic { font-size: 22px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.medal.r1 { background: linear-gradient(135deg, rgba(255, 214, 0, .30), rgba(255, 160, 0, .18)); border-color: rgba(255, 190, 0, .55); color: #8a5a00; }
.medal.r2 { background: linear-gradient(135deg, rgba(220, 225, 235, .55), rgba(170, 180, 195, .25)); border-color: rgba(160, 170, 185, .55); color: #4a5361; }
.medal.r3 { background: linear-gradient(135deg, rgba(230, 150, 90, .30), rgba(190, 110, 60, .18)); border-color: rgba(205, 127, 50, .5); color: #7a3f12; }
@media (prefers-color-scheme: dark) {
  .medal.r1 { color: #ffd54f; } .medal.r2 { color: #dfe4ec; } .medal.r3 { color: #f0a46a; }
}
@media (max-width: 400px) { .medal-txt { display: none; } .medal { padding: 3px 5px; } .medal-ic { font-size: 24px; } }

.badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--glass-hover); color: var(--muted); border: 1px solid var(--stroke-soft);
}
.badge.warn { background: rgba(255, 170, 0, .16); color: var(--warn); }
.badge.pending { background: rgba(80, 140, 255, .16); color: #3d7bff; }

/* Zuletzt gebucht */
.chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips:empty { display: none; }
.chips-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-right: 2px; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  font-weight: 600; font-size: 14px;
}
.chip .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; }

/* ------------------------------------------------------------- Unterkopf & Zurück */
.subhead { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.subhead-title, .subhead h2 { flex: 1; text-align: right; margin: 0; font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-btn, .link-btn {
  display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; cursor: pointer;
  color: var(--accent); font-weight: 600; padding: 8px 4px 8px 0; text-decoration: none;
}
.back-btn .ico { width: 20px; height: 20px; }

/* ------------------------------------------------------------- Segment-Umschalter */
.segmented {
  display: flex; padding: 4px; margin: 0 0 14px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow);
}
.seg { flex: 1; border: 0; background: none; padding: 10px; border-radius: 12px; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .15s; }
.seg.active { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }

/* ------------------------------------------------------------- Produkte */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.product {
  position: relative; display: flex; flex-direction: column; overflow: hidden; cursor: pointer; user-select: none;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.product:active { transform: scale(.97); }
.product.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.product .img {
  height: 108px; margin: 8px 8px 0; border-radius: 16px;
  background: rgba(255, 255, 255, .92) center/contain no-repeat; background-origin: content-box; padding: 6px;
}
.product .info { padding: 10px 12px 12px; }
.product .name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.product .price { color: var(--muted); font-size: 14px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.product .count {
  position: absolute; top: 12px; right: 12px; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px;
  background: var(--accent-grad); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(229, 57, 53, .45);
}
.product .minus {
  position: absolute; top: 12px; left: 12px; width: 34px; height: 32px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(20, 22, 35, .62); color: #fff; font-size: 20px; line-height: 1;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.spacer-bar { height: 86px; }

/* ------------------------------------------------------------- Buttons */
.btn {
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 13px 18px; font-weight: 700; cursor: pointer;
  background: var(--glass); color: var(--text); transition: transform .1s, filter .15s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 20px rgba(229, 57, 53, .35); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { background: linear-gradient(135deg, #ff5d5d, #c62828); color: #fff; }
.btn.secondary { background: var(--glass); border-color: var(--stroke); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn.block { display: block; width: 100%; margin-top: 12px; text-align: center; text-decoration: none; }
a.btn { text-decoration: none; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; }
.row > .input { flex: 1; }
.row.wrap { flex-wrap: wrap; }
.row.space { justify-content: space-between; align-items: center; }

/* Buchungsleiste (schwebend über der Navigation) */
.book-bar {
  position: fixed; left: 12px; right: 12px; z-index: 25; max-width: 956px; margin: 0 auto;
  bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; padding: 10px; border-radius: 22px;
  background: var(--glass-strong); border: 1px solid var(--stroke); box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}

/* ------------------------------------------------------------- Karten & Rechnung */
.card {
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; margin-bottom: 14px;
}
.card .card { box-shadow: none; }
.card h3 { margin: 0 0 10px; font-size: 17px; letter-spacing: -.01em; }
.hint { color: var(--muted); font-size: 14px; margin: 4px 2px 10px; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table td { padding: 9px 0; border-bottom: 1px solid var(--sep); vertical-align: top; }
.table td.num { text-align: right; white-space: nowrap; padding-left: 12px; }
.table tr:last-child td { border-bottom: 0; }
.table tr.sum td { font-weight: 800; border-top: 1px solid var(--sep); }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--glass-hover); }
.table .desc { color: var(--muted); font-size: 13px; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.group-title { margin: 18px 4px 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.empty h2 { color: var(--text); }

/* ------------------------------------------------------------- Navigation (schwebend) */
.tabbar {
  position: fixed; left: 12px; right: 12px; z-index: 40; max-width: 560px; margin: 0 auto;
  bottom: calc(12px + env(safe-area-inset-bottom)); height: var(--tabbar-h);
  display: flex; padding: 6px; border-radius: 26px;
  background: var(--glass-strong); border: 1px solid var(--stroke); box-shadow: 0 18px 45px rgba(0, 0, 0, .25);
}
.tab {
  flex: 1; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em; transition: color .15s, background .15s;
}
.tab .ico { width: 24px; height: 24px; }
.tab.active { color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------- Dialog (Glas-Sheet) */
.modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(8, 10, 20, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade .18s ease-out;
}
.modal-card {
  width: 100%; max-width: 580px; max-height: 90vh; overflow: auto;
  background: var(--glass-strong); border: 1px solid var(--stroke); border-bottom: 0;
  border-radius: 28px 28px 0 0; padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .25); animation: rise .22s cubic-bezier(.2, .8, .2, 1);
}
.modal-card::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--sep); margin: 0 auto 14px; }
@media (min-width: 700px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 28px; border-bottom: 1px solid var(--stroke); }
  .modal-card::before { display: none; }
}
.modal-card h3 { margin: 4px 0 12px; font-size: 20px; letter-spacing: -.01em; }
.modal-card label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 2px 6px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.radio-row { display: flex; gap: 8px; }
.radio-row label {
  flex: 1; margin: 0; padding: 12px 8px; text-align: center; cursor: pointer; color: var(--text);
  border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--stroke); font-weight: 600;
}
.radio-row input { display: none; }
.radio-row label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: .6; } }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 70;
  bottom: calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom));
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 18px; text-align: center; font-weight: 600;
  background: rgba(24, 26, 40, .82); color: #fff; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3); animation: rise .2s ease-out;
}
.toast.ok { background: linear-gradient(135deg, rgba(36, 170, 95, .92), rgba(20, 140, 80, .92)); }
.toast.err { background: linear-gradient(135deg, rgba(235, 75, 75, .94), rgba(190, 35, 45, .94)); }

/* ------------------------------------------------------------- Kassenwart */
#admin-area { padding: 16px; }
#admin-area > h3 { margin: 0 0 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--glass); border: 1px solid var(--stroke); border-radius: 18px; padding: 14px 15px; box-shadow: var(--shadow); }
.kpi-l { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpi-v { font-size: 25px; font-weight: 800; margin: 4px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-s { font-size: 12px; color: var(--muted); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } .menu-btn { padding: 14px 4px 12px; font-size: 12.5px; } }
.menu-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 6px 14px;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: 20px; box-shadow: var(--shadow);
  cursor: pointer; font-weight: 700; font-size: 13.5px; transition: transform .12s, background .15s;
}
.menu-btn:hover { background: var(--glass-hover); transform: translateY(-1px); }
.menu-btn .ic { font-size: 28px; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .18)); }
.count-badge {
  position: absolute; top: 8px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--accent-grad); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.filters .select, .filters .input { margin: 0; padding: 11px 13px; }
.check { display: flex !important; align-items: center; gap: 10px; color: var(--text) !important; margin: 10px 2px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.neg { color: var(--err); font-weight: 700; }
.pos { color: var(--ok); font-weight: 700; }
.bar { height: 6px; background: var(--sep); border-radius: 3px; margin-top: 5px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent-grad); border-radius: 3px; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.thumb { display: inline-block; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; background: rgba(255, 255, 255, .92) center/contain no-repeat; margin-right: 2px; }
.thumb.big { width: 76px; height: 76px; flex-basis: 76px; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11px; word-break: break-all; }
#admin-area .subhead h2 { text-align: right; }
code { font-size: 13px; padding: 1px 5px; border-radius: 6px; background: var(--glass-hover); }

/* Jahresrückblick: Grafiken als feste Bilder (16:9) */
.report-card { padding: 12px; }
.report-canvas { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.report-table summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 2px; }
.report-table[open] { flex-basis: 100%; }
.report-card .row.space { flex-wrap: wrap; gap: 8px; }

/* Sortieren per Drag & Drop */
.sortable li { cursor: default; }
.drag-handle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: auto;
  border-radius: 12px; color: var(--muted); cursor: grab; touch-action: none; flex: 0 0 auto;
}
.drag-handle:active { cursor: grabbing; background: var(--accent-soft); color: var(--accent); }
.sortable li.dragging {
  z-index: 5; background: var(--glass-strong); box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  transform: scale(1.02); border-radius: 16px;
}
.sortable li.dragging::before { display: none; }
.sortable li.dragging + li::before { display: none; }
.sort-bar { position: sticky; top: calc(76px + env(safe-area-inset-top)); z-index: 10; display: flex; gap: 8px; margin-bottom: 12px; }
.sort-bar .btn { flex: 1; min-width: 0; margin: 0; padding: 12px 6px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 900px) { .page-title { font-size: 34px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
