/* Paula's Garden – Farben und Schriften aus der Briefing-Präsentation */
:root {
  --paper: #F5F8F7; --card: #FCFEFD; --ink: #22302B; --body: #3A4843; --muted: #5E6A65; --line: #D8E3DF;
  --sage: #75A394; --sage-d: #467466; --tint: #E7F1ED; --tint2: #D7E7E1;
  --forest: #1E332C; --forest2: #27443A;
  --orange: #C0622B; --orange-t: #FBEADF;
  --pm: #2F6E8E; --pm-t: #E6F0F5; --kr: #7A4B7E; --kr-t: #F2EAF3; --team: #467466; --team-t: #E7F1ED;
  --phase-a: #F5F8F7; --phase-b: #EDF3F0;
  --doing: #A8761A; --doing-t: #F7EEDB;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14221D; --card: #1A2B25; --ink: #E9F0ED; --body: #C9D6D1; --muted: #93A59E; --line: #2C433A;
    --sage: #8DB8A9; --sage-d: #9CC7B8; --tint: #213A31; --tint2: #29473C;
    --forest: #0F1B17; --forest2: #1E332C;
    --orange: #E08452; --orange-t: #3A2519;
    --pm: #7FB0CB; --pm-t: #1C2E38; --kr: #C095C4; --kr-t: #2E2231; --team: #8DB8A9; --team-t: #213A31;
    --phase-a: #172720; --phase-b: #1B2D26;
    --doing: #E0B45A; --doing-t: #362C16;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 14px/1.5 Poppins, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 700; margin: 0; letter-spacing: -.01em; }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 12px; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { font-family: Caveat, cursive; font-weight: 700; font-size: 22px; line-height: 1; color: var(--sage-d); }

/* Logo */
.logo { display: inline-block; width: 58px; height: 58px; flex: none; }
.logo img { width: 100%; height: 100%; display: block; }
.logo .logo-paper { display: none; }
@media (prefers-color-scheme: dark) { .logo .logo-ink { display: none; } .logo .logo-paper { display: block; } }
.logo.big { width: 110px; height: 110px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-sub { font-size: 11px; line-height: 1.35; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--sage); }
.btn.primary { background: var(--sage-d); border-color: var(--sage-d); color: #fff; }
.btn.primary:hover { background: var(--forest2); border-color: var(--forest2); }
@media (prefers-color-scheme: dark) { .btn.primary { color: var(--forest); } .btn.primary:hover { background: var(--sage); border-color: var(--sage); } }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--orange); border-color: transparent; background: transparent; }
.btn.danger:hover { border-color: var(--orange); }
.btn.icon { width: 36px; height: 36px; padding: 0; }
.btn.wide { width: 100%; padding: 10px; }
.link { border: 0; background: none; padding: 4px 0; cursor: pointer; color: var(--muted); font-weight: 500; }
.link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
:is(.btn, .tab, .link, input, select, textarea):focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 600; color: var(--sage-d); }
.hint { font-size: 11.5px; color: var(--muted); }
input, select, textarea { width: 100%; border: 2px solid var(--line); background: var(--card); border-radius: 10px; padding: 7px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--sage); outline: none; }
textarea { resize: vertical; }
input[disabled], select[disabled] { opacity: .6; }
.form-error { color: var(--orange); font-size: 13px; margin: 0; }
.form-error:empty { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2.nr-row { grid-template-columns: 80px 1fr; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--line); }
.stack h3 { font-size: 15px; }

/* Anmeldung */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(380px, 100%); background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.auth-card .logo { align-self: center; margin-bottom: 4px; }
.auth-card h1 { font-size: 26px; }

/* Kopf */
.top { display: flex; align-items: center; gap: 28px; padding: 10px 24px; background: var(--card); border-bottom: 3px solid var(--sage); flex-wrap: wrap; }
.tabs { display: flex; gap: 22px; align-self: stretch; }
.tab { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 600; color: var(--muted); position: relative; display: flex; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -13px; height: 3px; background: var(--orange); border-radius: 3px 3px 0 0; }
.user { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.user-name { font-weight: 600; }

/* Kennzahlen: eine Leiste statt vieler Kacheln */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 24px 0; background: var(--card); border: 2px solid var(--line); border-radius: 16px; }
.stat { padding: 14px 20px; min-width: 0; border-left: 2px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--sage-d); }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-xp .stat-value { color: var(--orange); }
.bar { height: 6px; background: var(--tint2); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar-fill { display: block; height: 100%; background: var(--sage-d); border-radius: 6px; transition: width .8s var(--ease); }
.ms-dots { display: flex; gap: 5px; margin: 6px 0 4px; flex-wrap: wrap; }
.ms-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; border: 2px solid var(--orange); color: var(--orange); }
.ms-dot.done { background: var(--orange); color: #fff; }
.alert { grid-column: 1 / -1; color: var(--orange); padding: 14px 20px; }

/* Ansicht */
.view { padding: 16px 24px 28px; }
.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 14px; height: 10px; border-radius: 3px; border: 2px solid; }
.lg.area-pm::before { border-color: var(--pm); background: var(--pm-t); }
.lg.area-design::before { border-color: var(--kr); background: var(--kr-t); }
.lg.area-team::before { border-color: var(--team); background: var(--team-t); }
.lg.crit::before { border-color: var(--orange); }
.lg.ms::before { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); border-color: var(--orange); }
.lg-key b { font-weight: 600; color: var(--ink); }
.zoom { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.zoom-level { font-size: 12px; color: var(--muted); min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.netz-scroll { overflow: auto; background: var(--card); border: 2px solid var(--line); border-radius: 16px; height: calc(100vh - 270px); min-height: 380px; cursor: grab; }
.netz-scroll.dragging { cursor: grabbing; user-select: none; }
svg.netz { display: block; }

/* SVG-Netzplan (wie im PDF) */
.phase-bg.even { fill: var(--phase-a); } .phase-bg.odd { fill: var(--phase-b); }
.phase-kicker { font-size: 10px; font-weight: 600; letter-spacing: .08em; fill: var(--muted); }
.phase-title { font-size: 15px; font-weight: 700; fill: var(--ink); }
.edge { fill: none; stroke: var(--muted); stroke-width: 1.3; opacity: .65; }
.edge.crit { stroke: var(--orange); stroke-width: 2.2; opacity: 1; }
.edge.hl { stroke-width: 3; opacity: 1; }
.arrow { fill: var(--muted); } .arrow.crit { fill: var(--orange); }
.node { cursor: pointer; outline: none; }
.node .box { fill: var(--card); stroke: var(--line); stroke-width: 2; }
.node.area-pm .box { stroke: var(--pm); } .node.area-pm .stripe { fill: var(--pm); }
.node.area-design .box { stroke: var(--kr); } .node.area-design .stripe { fill: var(--kr); }
.node.area-team .box { stroke: var(--team); } .node.area-team .stripe { fill: var(--team); }
.node.critical .box { stroke: var(--orange); stroke-width: 2.6; }
.node.status-done .box { fill: var(--tint); }
.node.status-doing .box { fill: var(--doing-t); }
.node:hover .box, .node:focus-visible .box { stroke-width: 3.2; }
.node.selected .box { stroke: var(--ink); stroke-width: 3.2; }
.node .grid { stroke: var(--line); stroke-width: 1; fill: none; }
.node .cell { font-size: 12.5px; fill: var(--ink); font-variant-numeric: tabular-nums; }
.node .cell.strong { font-weight: 700; }
.node .cell.zero { fill: var(--orange); }
.node .nr { font-size: 12.5px; font-weight: 700; fill: var(--ink); }
.node .name { font-size: 12px; font-weight: 500; fill: var(--ink); }
.kw { font-size: 10px; font-weight: 600; fill: var(--muted); letter-spacing: .04em; }
.badge-done { fill: var(--sage-d); stroke: var(--card); stroke-width: 2; }
.badge-check { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.badge-doing { fill: var(--doing); }
.badge-doing-text { font-size: 10px; font-weight: 600; fill: #fff; }
.ms { fill: var(--orange); stroke: var(--card); stroke-width: 3; }
.node.status-done .ms { fill: var(--sage-d); }
.node.selected .ms, .node:hover .ms { stroke: var(--ink); }
.ms-text { font-size: 12px; font-weight: 700; fill: #fff; }
.ms-check { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ms-label { font-size: 10.5px; font-weight: 600; fill: var(--ink); }
.ms-sub { font-size: 9.5px; fill: var(--muted); }
.terminal { fill: var(--forest); }
.terminal-text { font-size: 12px; font-weight: 700; fill: #fff; }
@media (prefers-color-scheme: dark) { .terminal { fill: var(--sage-d); } .terminal-text { fill: var(--forest); } }
.band { cursor: pointer; outline: none; }
.band-rect { stroke-width: 1.6; stroke-dasharray: 6 5; }
.band.area-design .band-rect { fill: var(--kr-t); stroke: var(--kr); }
.band.area-pm .band-rect { fill: var(--pm-t); stroke: var(--pm); }
.band.area-team .band-rect { fill: var(--team-t); stroke: var(--team); }
.band.done .band-rect { stroke: var(--sage-d); }
.band:hover .band-rect, .band.selected .band-rect { stroke-width: 2.6; }
.band-title { font-size: 12.5px; font-weight: 700; fill: var(--ink); }
.band-note { font-size: 11px; fill: var(--muted); }

/* Liste */
.list-wrap { overflow: auto; background: var(--card); border: 2px solid var(--line); border-radius: 16px; }
table.list { border-collapse: collapse; width: 100%; font-size: 13px; }
.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--sage-d); padding: 10px; border-bottom: 2px solid var(--line); position: sticky; top: 0; background: var(--card); white-space: nowrap; }
.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tbody tr { cursor: pointer; }
.list tbody tr:hover, .list tr.selected { background: var(--tint); }
.list tr.critical td.nr { box-shadow: inset 3px 0 0 var(--orange); }
.list td.nr { font-weight: 700; white-space: nowrap; }
.list td.num { text-align: right; font-variant-numeric: tabular-nums; }
.list td.zero { color: var(--orange); font-weight: 700; }
.list tr.status-done td:nth-child(2) { color: var(--muted); }
.tag { font-size: 10.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; margin-left: 6px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot.area-pm { background: var(--pm); } .dot.area-design { background: var(--kr); } .dot.area-team { background: var(--team); }
.pill { font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 99px; white-space: nowrap; border: 1.5px solid var(--line); color: var(--muted); }
.pill.status-doing { border-color: var(--doing); color: var(--doing); }
.pill.status-done { border-color: var(--sage-d); background: var(--sage-d); color: #fff; }
@media (prefers-color-scheme: dark) { .pill.status-done { color: var(--forest); } }

/* Seitenleiste */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--card); border-left: 2px solid var(--line); transform: translateX(105%); transition: transform .3s var(--ease); overflow-y: auto; z-index: 20; }
.drawer.open { transform: none; }
.drawer-form { padding: 22px 24px 30px; display: flex; flex-direction: column; gap: 14px; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.drawer-head h2 { font-size: 20px; line-height: 1.25; margin-top: 2px; }
.kicker { font-size: 12px; color: var(--sage-d); font-weight: 600; }
.calc { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.calc-cell { padding: 7px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.calc-cell:nth-child(3n) { border-right: 0; }
.calc-cell span { font-size: 11px; color: var(--muted); font-weight: 600; }
.calc-cell b { font-variant-numeric: tabular-nums; }
.calc-cell.zero b { color: var(--orange); }
.calc-foot { grid-column: 1 / -1; padding: 7px 10px; font-size: 12px; color: var(--muted); background: var(--paper); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg-opt input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: block; text-align: center; padding: 7px 6px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg-opt input:focus-visible + span, .chip input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }
.seg-opt.status-open input:checked + span { border-color: var(--ink); color: var(--ink); }
.seg-opt.status-doing input:checked + span { border-color: var(--doing); background: var(--doing-t); color: var(--doing); }
.seg-opt.status-done input:checked + span { border-color: var(--sage-d); background: var(--sage-d); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip span { display: inline-block; padding: 4px 12px; border-radius: 99px; border: 2px solid var(--line); cursor: pointer; font-size: 13px; font-weight: 500; }
.chip input:checked + span { border-color: var(--sage-d); background: var(--tint); color: var(--sage-d); font-weight: 600; }
.xp-line { margin: -2px 0 0; font-size: 12.5px; color: var(--orange); border-left: 3px solid var(--orange); padding: 2px 0 2px 10px; }
.xp-line:empty { display: none; }
.checks { max-height: 220px; overflow-y: auto; border: 2px solid var(--line); border-radius: 10px; padding: 4px; }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.check:hover { background: var(--tint); }
.check input { width: auto; margin: 0; accent-color: var(--sage-d); }
.check.disabled { opacity: .4; cursor: not-allowed; }
.check-nr { font-weight: 700; min-width: 34px; }
.drawer-actions { display: flex; justify-content: space-between; gap: 10px; }

/* Dialog */
.modal { border: 2px solid var(--line); border-radius: 16px; padding: 24px; width: min(520px, calc(100vw - 32px)); background: var(--card); color: var(--ink); }
.modal::backdrop { background: rgba(15, 27, 23, .5); }
.modal h2 { font-size: 20px; }
.team { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.team li { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--sage-d); display: grid; place-items: center; font-weight: 700; flex: none; }

/* Karten */
.card { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 22px 24px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.card h2 { font-size: 26px; line-height: 1.15; }
.card > .eyebrow { margin-bottom: 12px; }
.empty { padding: 18px 0; color: var(--muted); }

/* Rangliste */
.rank-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.rank-side { display: flex; flex-direction: column; gap: 16px; }
.team-xp { color: var(--muted); } .team-xp b { color: var(--ink); font-size: 18px; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px 12px 10px; border: 2px solid var(--line); border-radius: 12px; }
.board-row.lead { background: var(--forest); border-color: var(--forest); color: #F5F8F7; }
.board-row.me:not(.lead) { border-color: var(--sage); }
.board-rank { font-family: Caveat, cursive; font-weight: 700; font-size: 34px; line-height: 1; text-align: center; color: var(--sage-d); }
.lead .board-rank { color: var(--sage); }
.board-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-name { font-weight: 700; font-size: 15px; }
.you { font-size: 11px; font-weight: 600; margin-left: 6px; padding: 1px 7px; border-radius: 99px; border: 1.5px solid currentColor; opacity: .75; }
.board-bar { display: block; height: 5px; background: var(--tint2); border-radius: 5px; margin: 7px 0 4px; overflow: hidden; }
.lead .board-bar { background: var(--forest2); }
.board-fill { display: block; height: 100%; background: var(--sage-d); border-radius: 5px; transition: width .8s var(--ease); }
.lead .board-fill { background: var(--orange); }
.board-meta { font-size: 12px; color: var(--muted); }
.lead .board-meta { color: #9DB5AC; }
.board-xp { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.board-xp small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.lead .board-xp small { color: #9DB5AC; }
@media (prefers-color-scheme: dark) { .board-row.lead { background: var(--forest2); border-color: var(--sage-d); } }
.badge-icons { display: inline-flex; gap: 4px; }
.badge-mini { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--sage-d); }
.badge-mini .ico { width: 13px; height: 13px; }
.lead .badge-mini { background: var(--forest2); color: var(--sage); }
.rules { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--line); }
.rules-title { font-size: 12px; font-weight: 600; color: var(--sage-d); margin-bottom: 6px; }
.rules ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; font-size: 13px; color: var(--body); }
.rules b { color: var(--orange); }
.feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.feed li { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; }
.feed-xp { flex: none; min-width: 44px; text-align: right; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.feed-title { font-weight: 600; }
.badge-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.badge { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.badge-icon { width: 38px; height: 38px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; flex: none; color: var(--line); }
.badge-name { font-weight: 600; }
.badge.got { color: var(--ink); }
.badge.got .badge-icon { border: 0; background: var(--sage-d); color: #fff; }
@media (prefers-color-scheme: dark) { .badge.got .badge-icon { color: var(--forest); } }

/* Garten */
.garden-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.garden-legend li { display: flex; align-items: center; gap: 6px; }
.garden-legend span { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lg-seed { background: #8A6A4B; } .lg-sprout { background: var(--sage); } .lg-bloom { background: var(--kr); } .lg-tree { background: var(--sage-d); }
.garden-wrap { overflow-x: auto; margin: 0 -8px 10px; }
svg.garden { display: block; width: 100%; min-width: 980px; height: auto; }
.garden-card .muted.small { margin: 0; }

/* Meldungen */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--forest); color: #F5F8F7; padding: 12px 20px; border-radius: 12px; font-weight: 600; z-index: 50; transition: opacity .4s, transform .4s var(--ease); max-width: calc(100vw - 32px); }
.toast .ico { color: var(--sage); width: 20px; height: 20px; }
.toast.err { background: var(--orange); }
.toast.party { animation: rise .5s var(--ease); }
.toast.out { opacity: 0; transform: translate(-50%, 12px); }
@keyframes rise { from { transform: translate(-50%, 20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast.party { animation: none; } .drawer, .bar-fill, .board-fill { transition: none; } }

/* Kleinere Bildschirme */
@media (max-width: 1100px) {
  .rank-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 2px solid var(--line); }
}
@media (max-width: 640px) {
  .top { padding: 8px 16px 0; gap: 8px 14px; }
  .logo { width: 48px; height: 48px; }
  .brand-sub { display: none; }
  .tabs { order: 3; width: 100%; gap: 18px; overflow-x: auto; padding-bottom: 10px; }
  .tab.active::after { bottom: -10px; }
  .user { gap: 12px; font-size: 13px; }
  .stats { margin: 12px 16px 0; }
  .stat { padding: 10px 14px; }
  .stat-value { font-size: 22px; }
  .view { padding: 12px 16px 20px; }
  .legend { display: none; }
  .netz-scroll { height: 70vh; }
  .row2 { grid-template-columns: 1fr; } .row2.nr-row { grid-template-columns: 70px 1fr; }
  .card { padding: 18px 16px; }
  .board-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px 10px 6px; }
  .board-xp { font-size: 20px; }
  .rules ul { grid-template-columns: 1fr; }
}

/* Garten-Zeichnung (Strichstil des Logos) */
.g-bed-label { font-family: Caveat, cursive; font-weight: 700; font-size: 20px; fill: var(--sage-d); }
.g-frame { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.g-soil-line { fill: none; stroke: var(--line); stroke-width: 2; stroke-linecap: round; }
.g-plant { cursor: pointer; outline: none; }
.g-hit { fill: transparent; }
.g-plant:hover .g-hit, .g-plant:focus-visible .g-hit { fill: var(--tint); }
.g-ink { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.g-seed { fill: #8A6A4B; stroke: var(--ink); stroke-width: 1.2; }
.g-stem { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.g-stake { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 2 2; }
.g-leaf { fill: var(--sage); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.g-petal { fill: var(--paper); stroke: var(--ink); stroke-width: 1.3; }
.area-pm .g-petal { fill: #BFD7E4; } .area-design .g-petal { fill: #D9C2DB; } .area-team .g-petal { fill: #F2D9A8; }
.g-center { fill: var(--orange); stroke: var(--ink); stroke-width: 1.2; }
.g-trunk { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.g-crown { fill: var(--sage); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.g-fruit { fill: var(--orange); stroke: var(--ink); stroke-width: 1; }
.g-label { font-family: Caveat, cursive; font-weight: 700; font-size: 17px; fill: var(--ink); text-anchor: middle; }
.g-plant.st-open .g-label { fill: var(--muted); }
.g-plant.st-done .g-art { animation: sprout-up .8s var(--ease); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes sprout-up { from { transform: scaleY(.2); opacity: 0; } }
@media (prefers-color-scheme: dark) {
  .area-pm .g-petal { fill: #3E6378; } .area-design .g-petal { fill: #5E4561; } .area-team .g-petal { fill: #6B5A35; }
  .g-leaf, .g-crown { fill: #4F7F6F; }
}
@media (prefers-reduced-motion: reduce) { .g-plant.st-done .g-art { animation: none; } }
