/* Angemeldetes Board: warme Flächen, klare Aufgaben, Platz für die Familie.
   Die bestehenden Komponenten behalten ihre Funktionsklassen; hier liegt
   die gemeinsame Gestaltung für Tagesboard, Kalender, Listen und Dialoge. */
:root {
  --color-surface: #fffefa;
  --color-surface-raised: #f8f7f2;
  --color-surface-sunken: #f5f4ee;
  --color-surface-warm: #f8e6db;
  --color-text: #283d35;
  --color-text-muted: #68736b;
  --color-border: #e3e5dc;
  --color-border-strong: #b7bfb2;
  --color-accent: #91472e;
  --color-accent-ink: #753923;
  --color-accent-soft: #f9e5d9;
  --color-accent-line: #e4b49e;
  --color-accent-alt: #527765;
  --color-success-fill: #46765a;
  --color-success-ink: #3d684e;
  --color-success-soft: #edf3e9;
  --color-warning-soft: #f6efd9;
  --shadow-card: 0 3px 12px #283d3505;
  --shadow-modal: 0 24px 90px #23372d33;
  --peach: #f1b49a;
  --sidebar-width: 218px;
}
body { background: var(--bg); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.app { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); height: 100dvh; }
.sidebar, .sidebar:hover, .sidebar:focus-within {
  width: var(--sidebar-width); padding: 30px 16px 20px;
  background: #293f35; color: #fff7ec; border: 0; box-shadow: none;
  align-items: stretch; gap: 12px; z-index: 20;
}
.brand { gap: 10px; padding: 0 0 38px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: var(--peach); color: #293f35; }
.brand-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.brand-eyebrow { font-size: 8px; letter-spacing: .14em; font-weight: 700; color: #d6e0ce; }
.brand-name { display: block; opacity: 1; color: #fff7ec; font-size: 15px; }
.brand .rudelfunk-mark { width:42px; height:42px; flex-shrink:0; }
.brand .rudelfunk-wordmark { color:#fff7ec; font-size:20px; font-weight:800; letter-spacing:-.055em; }
.brand .brand-name { font-size:11px; line-height:1.3; color:#d6e0ce; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.auth-brand { display:flex; flex-direction:column; align-items:center; gap:10px; margin:0 auto 26px; width:fit-content; color:var(--ink); text-decoration:none; }
.auth-brand span { font-size:28px; line-height:1; font-weight:800; letter-spacing:-.055em; }
.auth-brand img { display:block; }
.nav-label { display: block; opacity: 1; }
.nav-group { gap: 8px; align-self: stretch; }
.nav-item { min-height: 54px; font-size: 14px; font-weight: 600; padding: 0 14px; gap: 12px; color: #d5dfd2; border-radius: 13px; justify-content: flex-start; }
.nav-item:hover { background: #ffffff0b; color: #fff7ec; }
.nav-item.active, .nav-item.active:hover { background: var(--peach); color: #293f35; }
.nav-item .icon { width: 21px; height: 21px; }
.nav-foot { margin-top: 0; border-top-color: #ffffff24; padding-top: 16px; }
.nav-foot .nav-item { min-height: 46px; }
.main { min-height: 0; }
.topbar { padding: 30px 30px 22px; align-items: center; gap: 16px; }
.board-eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--ink-soft); margin-bottom: 9px; }
.board-eyebrow.rudelfunk-heading { display:flex; align-items:center; gap:7px; font-size:14px; font-weight:800; letter-spacing:-.045em; line-height:1; color:var(--ink); }
.rudelfunk-heading img { display:block; flex-shrink:0; }
.topbar-title { font-size: clamp(23px, 2.1vw, 32px); font-weight: 600; letter-spacing: -.045em; }
.topbar-date { font-size: 12px; font-weight: 500; margin-top: 7px; }
.topbar-tools { gap: 14px; flex-wrap: wrap; }
.topbar-clock { font-size: 24px; font-weight: 500; padding-left: 16px; border-left: 1px solid var(--line); }
.segment { background: #eaece3; border: 0; border-radius: 12px; padding: 4px; }
.segment-btn { min-height: 38px; font-size: 12px; border-radius: 9px; padding: 0 11px; }
.segment-btn.active { background: #fffefa; color: var(--ink); box-shadow: 0 2px 5px #283d3510; }
.ghost-btn { box-shadow: none; border: 1px solid var(--line); border-radius: 10px; min-width: 40px; min-height: 42px; }
.pager { gap: 5px; }
.board-overview { margin: 0 30px 24px; padding: 22px 24px; display: grid; grid-template-columns: minmax(250px, 1.6fr) minmax(150px, 1fr) minmax(135px, .8fr); gap: 24px; align-items: center; background: #f3e3d6; border: 1px solid #ead7c7; border-radius: 20px; flex-shrink: 0; }
.overview-stat { min-width: 0; border-left: 1px solid #dcc6b5; padding-left: 24px; }
.overview-label { display: block; font-size: 9px; letter-spacing: .13em; color: #735c4d; font-weight: 700; margin-bottom: 7px; }
.overview-stat strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.035em; overflow-wrap: anywhere; }
#overviewProgress { display: block; width: 100%; height: 5px; border: 0; border-radius: 20px; overflow: hidden; margin-top: 12px; background: #e0cbbb; appearance: none; accent-color: #57735b; }
#overviewProgress::-webkit-progress-bar { background: #e0cbbb; border-radius: 20px; }
#overviewProgress::-webkit-progress-value { background: #57735b; border-radius: 20px; }
#overviewProgress::-moz-progress-bar { background: #57735b; border-radius: 20px; }
.board { gap: 18px; padding: 0 30px 26px; min-height: 0; scrollbar-width: thin; scrollbar-color: #c8ccbf transparent; }
.column { min-width: 280px; max-width: none; border: 1px solid var(--line); border-radius: 20px; background: #fffefa; box-shadow: var(--shadow-card); }
.col-progress { height: 4px; background: color-mix(in srgb, var(--person) 17%, #f5f4ee); }
.col-header { padding: 23px 20px 15px; background: color-mix(in srgb, var(--person, #9aa884) 10%, #fffefa); border-bottom: 1px solid color-mix(in srgb, var(--person, #9aa884) 15%, #eaece3); }
.col-top { gap: 12px; }
.col-avatar { width: 46px; height: 46px; box-shadow: 0 0 0 3px #fffefa; }
.col-name { font-size: 21px; font-weight: 650; letter-spacing: -.04em; }
.col-stats { font-size: 11px; font-weight: 500; margin-top: 5px; }
.col-points { min-width: 57px; min-height: 49px; padding: 7px 9px; background: #fffefaad; border: 1px solid #ffffff; border-radius: 12px; }
.col-points b { font-size: 19px; font-weight: 650; }
.col-points i { font-size: 9px; margin-top: 4px; }
.history-strip { margin-top: 18px; padding-top: 12px; border-top: 1px solid #283d3510; }
.history-day { gap: 6px; }
.history-day i { font-size: 9px; font-weight: 600; }
.history-dot { width: 9px; height: 9px; }
.col-tasks { padding: 16px 14px; gap: 10px; scrollbar-width: thin; scrollbar-color: #c8ccbf transparent; }
.task { background: #fffefa; border: 1px solid #e6e8df; border-radius: 13px; gap: 10px; padding: 13px 11px; min-height: 80px; flex-shrink: 0; box-shadow: 0 2px 4px #283d3503; }
.task:hover:not(:disabled):not([aria-disabled="true"]) { border-color: #aab8a6; box-shadow: 0 3px 10px #283d3509; }
.task-icon { width: 35px; height: 39px; border-radius: 11px; }
.task-icon svg { width: 21px; height: 21px; }
.task-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.task-meta { font-size: 10px; font-weight: 500; margin-top: 6px; gap: 5px; }
.task-points { font-size: 10px; font-weight: 600; padding: 2px 6px; }
.task-check { width: 32px; height: 32px; border: 1.5px solid #bcc6b7; border-radius: 50%; }
.task.done { background: #f1f5ec; border-color: #e1e8d8; opacity: 1; }
.task.done .task-check { background: #547b57; border-color: #547b57; }
.task.done .task-icon { opacity: .65; }
.quick-add { min-height: 50px; margin-top: 4px; border: 1px dashed #c9cebf; border-radius: 12px; background: transparent; font-size: 12px; font-weight: 500; color: #65745e; flex-shrink: 0; }
.quick-add:hover { background: #f2f4ec; color: var(--ink); border-color: #8d9a81; }
.column.all-done { border-color: #cedab7; background: #fffefa; box-shadow: none; }
.column.all-done .col-header { background: #eef2dd; }
.column.all-done .col-progress-fill { background: #8b9b60; }
.column-ghost { min-height: 320px; background: #f1f2e8; border: 1px dashed #a8b59b; justify-content: center; }
.ghost-avatar { background: #dce5cd; color: #4c6945; }
.ghost-title { color: var(--ink); }
.family-band { margin: -6px 30px 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 15px; box-shadow: none; flex-shrink: 0; }
.event-card { background: #f9eee5; border-color: #ebd1bd; border-left-color: #be8059; border-radius: 10px; }
.event-title { font-weight: 600; font-size: 14px; }
.event-time { font-size: 11px; }
.events-label { color: var(--ink-soft); font-size: 10px; letter-spacing: .1em; }
.range-view, .agenda-view { padding: 0 30px 26px; }
.week-grid, .month-grid { background: #fffefa; padding: 20px; border: 1px solid var(--line); border-radius: 20px; gap: 8px; }
.week-head { padding-bottom: 15px; }
.week-cell { border-radius: 12px; background: #f8f8f2; }
.week-cell.today, .week-events.today, .month-day.today { box-shadow: inset 0 0 0 2px #ce8c69; }
.week-head.today b { background: var(--peach); color: var(--ink); }
.week-person { font-weight: 600; }
.week-cell.open { background: #fbefdf; border-color: #ebd9bb; }
.week-cell.done { background: #edf3e4; border-color: #d9e4ca; }
.month-grid { min-width: 610px; }
.month-head { padding: 10px 0 14px; }
.month-day { border-radius: 12px; background: #fafaf5; min-height: 105px; padding: 10px; }
.month-num { font-size: 18px; font-weight: 500; }
.month-event, .week-event { background: #f7e6d8; border-left-color: #c18b68; color: #79563b; }
.daycal { border-radius: 18px; border-color: var(--line); background: #fffefa; }
.list-column { max-width: 460px; }
.list-header { align-items: flex-start; padding: 22px; background: #edf0e3; }
.list-icon { background: #dce5ce; color: #4f6749; width: 46px; height: 46px; border-radius: 13px; margin-bottom: 12px; }
.list-meta { font-size: 12px; font-weight: 500; }
.list-toggle { background: #fffefa; border-color: #e4e7dc; border-radius: 11px; min-height: 64px; }
.list-title { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.list-add { padding: 0 14px 14px; }
.list-add input { background: #f8f8f2; min-width: 0; font-size: 16px; }
.list-add-btn { background: var(--peach); color: var(--ink); border-radius: 10px; }
.list-clear { margin: 0 14px 14px; }
.list-empty { width: 100%; background: #fffefa; border: 1px dashed #b5c2a9; border-radius: 20px; }
.btn-primary, .tab.active { background: var(--peach); color: #293f35; box-shadow: none; }
.btn-primary:hover { background: #eaa184; }
.modal-backdrop { background: #20372b66; backdrop-filter: blur(8px); }
.modal { background: #fffefa; border-radius: 24px; box-shadow: var(--shadow-modal); border: 1px solid #fffefa; }
.modal-header { padding-bottom: 20px; }
.modal-header h2 { font-weight: 600; font-size: 25px; letter-spacing: -.035em; }
.tabs { gap: 6px; padding-bottom: 16px; }
.tab { border-radius: 10px; font-weight: 600; font-size: 13px; }
.admin-item, .template-chip { background: #f6f7f0; border-color: #e1e5d8; }
.admin-form input:not([type=checkbox]):not([type=radio]), .admin-form select, .field input { background: #fafaf5; border-color: #bac3b2; border-radius: 11px; }
.admin-form input:focus, .admin-form select:focus, .field input:focus { background: #fffefa; border-color: #91472e; box-shadow: 0 0 0 3px #f1b49a33; }
.auth-view { background: radial-gradient(ellipse at 15% 15%, #f4ddc7 0, transparent 48%), #f4f4ed; height: 100dvh; }
.auth-card { box-shadow: 0 20px 80px #293f3510; border-color: #e0e2d8; padding: 44px 36px; }
.auth-logo { background: var(--peach); color: var(--ink); }
.auth-card h1 { font-size: 28px; font-weight: 600; letter-spacing: -.04em; }
button:focus-visible { outline: 3px solid #a3593b; outline-offset: 3px; }
.sidebar button:focus-visible { outline-color: #f1b49a; }
@media (min-width: 701px) and (max-width: 1190px) {
  :root { --sidebar-width: 88px; }
  .sidebar, .sidebar:hover, .sidebar:focus-within { padding: 24px 10px 16px; }
  .brand { justify-content: center; padding-bottom: 24px; }
  .brand-copy { display: none; }
  .nav-item { flex-direction: column; justify-content: center; gap: 7px; padding: 10px 2px; min-height: 68px; }
  .nav-label { display: block; opacity: 1; font-size: 9px; letter-spacing: -.025em; }
  .nav-foot { margin-top: auto; }
  .nav-foot .nav-item { min-height: 62px; }
  .topbar { padding: 24px 22px 20px; }
  .topbar-title { font-size: 25px; }
  .topbar-clock { display: none; }
  .board-overview { margin: 0 22px 20px; padding: 20px; gap: 18px; grid-template-columns: 1.4fr 1fr; }
  .overview-events { display: none; }
  .col-header { padding: 16px 16px 12px; }
  .history-strip { margin-top: 12px; padding-top: 9px; }
  .col-tasks { padding: 12px; gap: 9px; }
  .task { min-height: 70px; padding: 10px; }
  .family-band { padding-top: 8px; padding-bottom: 8px; }
  .board, .range-view, .agenda-view { padding-left: 22px; padding-right: 22px; }
  .family-band { margin-left: 22px; margin-right: 22px; }
}
@media (min-width: 701px) and (max-height: 740px) {
  .topbar { padding-top: 18px; padding-bottom: 15px; }
  .board-overview { padding-top: 15px; padding-bottom: 15px; margin-bottom: 16px; }
  .col-header { padding-top: 16px; }
  .history-strip { margin-top: 12px; padding-top: 9px; }
  .nav-foot { margin-top: auto; }
}
@media (max-width: 700px) {
  body { overflow: auto; }
  .app { display: block; height: auto; min-height: 100dvh; overflow: visible; padding-bottom: calc(83px + env(safe-area-inset-bottom)); }
  .main { overflow: visible; }
  .sidebar, .sidebar:hover, .sidebar:focus-within { position: fixed; width: 100%; bottom: 0; left: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); flex-direction: row; gap: 4px; border-radius: 20px 20px 0 0; box-shadow: 0 -4px 24px #283d3515; }
  .brand, #fullscreenBtn { display: none; }
  .nav-group { flex-direction: row; gap: 3px; flex: 4; min-width: 0; }
  .nav-foot { flex: 1; margin: 0; padding: 0; border: 0; }
  .nav-item, .nav-foot .nav-item { flex: 1; flex-direction: column; min-width: 0; min-height: 60px; gap: 6px; justify-content: center; padding: 7px 1px; border-radius: 12px; }
  .nav-label { display: block; opacity: 1; font-size: 9px; letter-spacing: -.04em; max-width: 100%; }
  .topbar { padding: 25px 20px 18px; gap: 18px; }
  .board-eyebrow { font-size: 9px; margin-bottom: 9px; }
  .topbar-title { font-size: 25px; line-height: 1.25; max-width: 350px; }
  .topbar-tools { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 8px; }
  .topbar-clock { display: none; }
  .segment-btn span:not(.icon) { display: inline; }
  .segment-btn { font-size: 11px; padding: 0 8px; min-height: 40px; gap: 5px; }
  .segment-btn .icon { width: 15px; height: 15px; }
  .ghost-btn { min-width: 36px; padding: 0 7px; font-size: 11px; }
  .board-overview { margin: 0 20px 22px; padding: 20px; grid-template-columns: 1fr 1fr; gap: 20px 12px; border-radius: 17px; }
  .overview-stat { padding: 0; border-left: 0; }
  .overview-events { display: block; border-left: 1px solid #dcc6b5; padding-left: 14px; }
  .overview-stat strong { font-size: 14px; }
  .overview-label { font-size: 8px; }
  .board { padding: 0 20px 24px; gap: 22px; overflow: visible; }
  .column { min-width: 0; width: 100%; max-width: none; min-height: 0; }
  .col-header { padding: 22px 20px 16px; }
  .col-tasks { padding: 16px; overflow: visible; }
  .task { min-height: 82px; padding: 13px; }
  .task-title { font-size: 16px; }
  .task-meta { font-size: 11px; }
  .family-band { margin: 0 20px 20px; flex-direction: column; align-items: stretch; }
  .band-events { overflow-x: auto; }
  .range-view, .agenda-view { padding: 0 20px 24px; overflow: auto; }
  .week-grid { min-width: 720px; }
  .month-grid { min-width: 610px; padding: 12px; }
  .week-person, .week-grid > .week-corner:first-child { background: #fffefa; }
  .month-day { min-height: 100px; }
  .modal-backdrop { padding: 12px; }
  .modal { border-radius: 20px; padding: 22px 18px; max-height: calc(100dvh - 24px); }
  .tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 12px; }
  .tab { flex-shrink: 0; min-height: 44px; }
  .auth-card { padding: 32px 24px; }
}
@media (max-width: 360px) {
  .topbar, .board { padding-left: 14px; padding-right: 14px; }
  .board-overview { margin-left: 14px; margin-right: 14px; padding: 17px; }
  .segment-btn { padding: 0 5px; }
  .today-btn { padding: 0 4px; }
  .nav-label { font-size: 8px; }
}

/* Arbeitsfläche zuerst: nur nützliche Zahlen, Navigation bei Bedarf öffnen. */
.nav-foot { margin-top: auto; }
.sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid #ffffff30; border-radius: 12px; color: #f8e8db; background: transparent; align-self: flex-end; }
.sidebar-toggle:hover { background: #ffffff12; }
.sidebar-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.board-overview { display: flex; gap: 24px; padding: 13px 20px; margin-bottom: 18px; border-radius: 14px; }
.overview-stat { flex: 1; padding-left: 0; border: 0; }
.overview-events { display: block; border-left: 1px solid #dcc6b5; padding-left: 24px; flex: 0 1 240px; }
.overview-label { margin-bottom: 4px; }
.overview-stat strong { font-size: 15px; letter-spacing: -.015em; }
#overviewProgress { max-width: 220px; margin-top: 7px; }
.task-date-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 30px 16px; padding: 12px 16px; background: #fffefa; border: 1px solid #d8dfce; border-radius: 12px; font-size: 13px; color: var(--ink-soft); flex-shrink: 0; }
.task-date-notice .ghost-btn { flex-shrink: 0; color: var(--ink); }
.task:disabled, .task[aria-disabled="true"] { cursor: not-allowed; }
.task:disabled .task-check, .task[aria-disabled="true"] .task-check { background: #f0f1ea; border-style: dashed; }
.task[aria-busy="true"] { cursor: progress; }
.task[aria-busy="true"] .task-check { border-style: solid; border-color: #b87555; background: #f9e5d9; }
@media (min-width: 701px) {
  .app { --sidebar-width: 218px; }
  .app.nav-collapsed { --sidebar-width: 72px; }
  .app .sidebar, .app .sidebar:hover, .app .sidebar:focus-within { width: var(--sidebar-width); padding: 16px 12px; }
  .app .brand { padding: 8px 0 20px; }
  .app .brand-copy { display: flex; }
  .app .nav-item { flex-direction: row; justify-content: flex-start; min-height: 54px; padding: 0 12px; gap: 12px; }
  .app .nav-label { display: block; font-size: 14px; }
  .app.nav-collapsed .sidebar { padding-left: 10px; padding-right: 10px; }
  .app.nav-collapsed .sidebar-toggle { align-self: center; margin-bottom: 18px; }
  .app.nav-collapsed .brand, .app.nav-collapsed .nav-label { display: none; }
  .app.nav-collapsed .nav-item { justify-content: center; padding: 0; }
}
@media (max-width: 700px) {
  .sidebar-toggle { display: none; }
  .board-overview { padding: 13px 16px; gap: 16px; }
  .overview-events { flex: 0 1 110px; padding-left: 16px; }
  .overview-stat strong { font-size: 13px; }
  .task-date-notice { margin: 0 20px 16px; padding: 12px; font-size: 12px; }
}

/* Wochenplan: jeder Tag eine Spalte mit Terminen und Familienaufgaben. */
.calendar-view { display: flex; flex-direction: column; gap: 16px; }
.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; flex-shrink: 0; font-size: 11px; color: var(--ink-soft); }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.calendar-legend i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.calendar-legend .calendar-open-hint { margin-left: auto; font-size: 11px; }
[data-public-demo] #logoutBtn { display: none; }
.planner-week { display: grid; grid-template-columns: repeat(7, minmax(144px, 1fr)); gap: 10px; min-height: 0; flex: 1; }
.planner-day { display: flex; flex-direction: column; min-width: 0; background: #fffefa; border: 1px solid #dfe4d7; border-radius: 16px; overflow: hidden; }
.planner-day.weekend { background: #f0f2e8; }
.planner-day.today { border-color: #c68c6b; box-shadow: 0 0 0 1px #c68c6b; }
.planner-day-head { display: flex; flex-direction: column; gap: 8px; border: 0; border-bottom: 1px solid #e3e7db; padding: 17px 14px; text-align: left; background: transparent; flex-shrink: 0; }
.planner-day-head:hover { background: #f8e6dba6; }
.planner-weekday { font-size: 11px; font-weight: 600; }
.planner-date { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.planner-date b { font-size: 32px; line-height: 1.1; letter-spacing: -.055em; font-weight: 500; }
.planner-date > span { font-size: 10px; color: var(--ink-soft); }
.planner-day.today .planner-day-head { background: #f5dfcf; }
.planner-day.today .planner-date > span { color: #803f2a; font-weight: 700; }
.planner-section-label { display: block; font-size: 9px; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); letter-spacing: .06em; padding: 0 2px; margin-bottom: 9px; }
.planner-events { padding: 15px 10px; min-height: 140px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.planner-event-button { display: block; width: 100%; text-align: left; background: transparent; border: 0; margin-bottom: 8px; border-radius: 9px; }
.planner-event-button:hover { box-shadow: 0 0 0 1px #ba9d87; }
.planner-event { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px; border-radius: 9px; border-left: 3px solid var(--event-color); background: color-mix(in srgb, var(--event-color) 13%, #fffefa); }
.planner-event-time { font-size: 10px; font-weight: 500; color: #596458; font-variant-numeric: tabular-nums; }
.planner-event-title { font-size: 12px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.planner-event-person { font-size: 9px; color: #626e5c; overflow-wrap: anywhere; }
.planner-people { padding: 13px 9px; border-top: 1px solid #e4e7dc; background: #f7f8f1; flex-shrink: 0; }
.planner-person { display: flex; gap: 7px; align-items: center; padding: 9px 3px; min-height: 55px; width: 100%; border: 0; border-radius: 9px; background: transparent; text-align: left; }
.planner-person:hover { background: #e8edde; }
.planner-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; width: 28px; height: 28px; flex-shrink: 0; overflow: hidden; font-size: 11px; font-weight: 600; }
.planner-avatar img, .planner-avatar .av-figure { width: 100%; height: 100%; object-fit: cover; }
.planner-person-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.planner-person-copy b { font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.planner-person-copy small { font-size: 9px; color: var(--ink-soft); }
.planner-person.done .planner-person-copy small { color: #46704a; }
.planner-person-check { margin-left: auto; width: 13px; height: 13px; color: #46704a; flex-shrink: 0; }
.planner-person-check svg { display: block; width: 100%; height: 100%; }
.planner-empty { font-size: 11px; color: var(--ink-soft); padding: 8px 2px; }

/* Monatsblatt: ruhiges Raster; Termine stehen im Vordergrund, Aufgaben unten. */
.calendar-view .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 38px repeat(var(--calendar-weeks, 6), minmax(118px, 1fr)); grid-auto-rows: minmax(118px, 1fr); min-height: calc(39px + var(--calendar-weeks, 6) * 119px); gap: 1px; background: #dfe4d7; border: 1px solid #dfe4d7; border-radius: 16px; padding: 0; min-width: 640px; overflow: hidden; flex: 1 0 auto; }
.calendar-view .month-head { display: flex; align-items: center; justify-content: flex-start; padding: 0 14px; font-size: 11px; font-weight: 500; background: #eef1e6; text-transform: none; }
.calendar-view .month-day { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 9px; padding: 11px; border: 0; border-radius: 0; background: #fffefa; min-height: 118px; box-shadow: none; text-align: left; }
.calendar-view .month-day.weekend { background: #f4f5ee; }
.calendar-view .month-day.outside { opacity: 1; background: #eeefe8; }
.calendar-view .month-day.outside > * { opacity: .55; }
.calendar-view .month-day:hover { background: #f9ebdf; box-shadow: inset 0 0 0 1px #cda27e; }
.calendar-view .month-day.today { background: #fcf0e6; box-shadow: inset 0 0 0 2px #c68c6b; }
.month-day-heading { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.calendar-view .month-num { display: inline-flex; justify-content: center; align-items: center; width: 25px; height: 25px; font-size: 14px; font-weight: 500; margin: 0; }
.month-day.today .month-num { border-radius: 50%; background: var(--peach); color: #283d35; }
.month-today-label { font-size: 9px; font-weight: 600; color: #8e5139; }
.calendar-view .month-events { display: flex; flex-direction: column; gap: 5px; width: 100%; margin: 0; }
.planner-event.compact { display: flex; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; padding: 4px 6px; border-radius: 5px; border-left-width: 2px; }
.planner-event.compact .planner-event-time { font-size: 9px; }
.planner-event.compact .planner-event-title { font-size: 10px; font-weight: 600; }
.month-more { font-size: 9px; font-weight: 500; color: var(--ink-soft); padding-left: 6px; }
.month-day-footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: space-between; margin-top: auto; }
.calendar-view .month-dots { justify-content: flex-start; gap: 3px; }
.calendar-view .month-dot { width: 8px; height: 8px; border-width: 1px; font-size: 6px; }
.calendar-view .month-count { font-size: 9px; line-height: 1.3; color: var(--ink-soft); font-weight: 500; margin: 0; }
.month-mobile-events { display: none; }
@media (max-width: 1100px) and (min-width: 701px) {
  .planner-week { grid-template-columns: repeat(7, minmax(144px, 1fr)); }
  .calendar-view { overflow-x: auto; }
  .calendar-view .month-grid { grid-auto-rows: minmax(115px, 1fr); }
}
@media (max-width: 700px) {
  .calendar-view { padding: 0 14px 22px; gap: 14px; overflow: visible; }
  .calendar-legend { gap: 8px 14px; padding: 0 6px; font-size: 10px; }
  .calendar-legend .calendar-open-hint { width: 100%; margin: 0; font-size: 10px; }
  .planner-week { display: flex; flex-direction: column; gap: 14px; }
  .planner-day { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; }
  .planner-day-head { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .planner-date { gap: 9px; }
  .planner-date b { font-size: 25px; }
  .planner-weekday { font-size: 13px; }
  .planner-events { min-height: 0; padding: 14px 12px; }
  .planner-people { border-top: 0; border-left: 1px solid #e4e7dc; padding: 14px 10px; }
  .planner-person { min-height: 50px; }
  .calendar-view .month-grid { min-width: 0; min-height: calc(31px + var(--calendar-weeks, 6) * 86px); grid-template-rows: 30px repeat(var(--calendar-weeks, 6), minmax(85px, auto)); grid-auto-rows: minmax(85px, auto); border-radius: 12px; }
  .calendar-view .month-head { padding: 0; justify-content: center; font-size: 10px; }
  .calendar-view .month-day { min-height: 85px; padding: 6px 3px; gap: 5px; }
  .month-day-heading { justify-content: center; }
  .month-today-label { display: none; }
  .calendar-view .month-events { display: none; }
  .month-mobile-events { display: block; font-size: 8px; text-align: center; color: #885332; }
  .month-day-footer { flex-direction: column; gap: 4px; justify-content: flex-end; }
  .calendar-view .month-count { font-size: 8px; text-align: center; overflow-wrap: anywhere; }
  .calendar-view .month-dot { width: 6px; height: 6px; font-size: 5px; }
}

/* Rechtstexte in der Verwaltung. Sie sollen auffindbar sein, aber nicht mit
   den Knöpfen darüber um Aufmerksamkeit ringen – deshalb Textlinks in einer
   Zeile statt vier weiterer Schaltflächen. */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
}

.legal-links a {
  color: var(--color-text-muted);
  text-underline-offset: 3px;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: var(--color-text);
}

/* ===== Neu anlegen: Knopf und Radialmenü =====
 *
 * Der Knopf trägt die Akzentfarbe, weil er die einzige Stelle der Leiste ist,
 * an der etwas entsteht statt nur umgeschaltet zu werden.
 *
 * Das Menü fährt als Fächer auf. Die Punkte liegen auf einem Kreisbogen um die
 * Knopfmitte: Jeder Eintrag setzt nur seinen Winkel, den Rest rechnet CSS. So
 * bleibt der Abstand zum Knopf für alle gleich – bei Werten von Hand wandert
 * sonst der eine Punkt näher als der andere, und der Bogen sieht schief aus.
 *
 * Richtung nach Ort der Leiste: am linken Rand nach rechts ins Board, als
 * untere Leiste auf dem Telefon nach oben. Ein Fächer, der aus dem Bildschirm
 * hinausläuft, ist keiner.
 */
.nav-create { align-self: stretch; margin-bottom: 4px; }

.nav-create-btn {
  width: 100%;
  background: var(--peach);
  color: #293f35;
  font-weight: 700;
}

.nav-create-btn:hover { background: #f6c4ad; color: #293f35; }

.nav-create-btn .icon { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.nav-create-btn[aria-expanded="true"] .icon { transform: rotate(135deg); }

/* Liegt im Betrieb direkt am <body>, nicht in der Leiste: `.sidebar` hat
   `overflow: hidden` (nötig, damit die Beschriftungen beim Einklappen sauber
   abschneiden) und in der Breitenabfrage einen eigenen z-index. Beides würde
   den Fächer abschneiden bzw. unter den Vorhang schieben. app.js hängt das
   Menü beim Öffnen um und setzt left/top auf die Knopfmitte. */
.radial-menu {
  --radius: 108px;
  --spread: 34deg; /* halbe Öffnung des Fächers */
  --direction: 0deg; /* 0 = nach rechts */
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 60;
}

.radial-item {
  --angle: 0deg;
  /* Erst auf den Bogen drehen, dann den Punkt selbst wieder geradestellen –
     sonst stünde die Beschriftung schräg. */
  --shift: rotate(calc(var(--direction) + var(--angle))) translateX(var(--radius))
           rotate(calc(-1 * (var(--direction) + var(--angle))));
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fffdf8;
  color: #293f35;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px #1c2c2440, 0 0 0 1px #ffffff2e;
  opacity: 0;
  transform: scale(.3);
  pointer-events: none;
  transition: transform .34s cubic-bezier(.34, 1.56, .64, 1), opacity .18s ease;
}

.radial-item .icon { width: 22px; height: 22px; }
.radial-label { line-height: 1; }

.radial-menu.open .radial-item {
  opacity: 1;
  transform: var(--shift) scale(1);
  pointer-events: auto;
}

/* Der zweite Punkt startet eine Spur später – der Fächer klappt auf, statt zu
   erscheinen. */
.radial-menu.open .radial-item:nth-child(2) { transition-delay: .05s; }

.radial-item:hover,
.radial-item:focus-visible {
  background: #fff;
  box-shadow: 0 14px 30px #1c2c2452, 0 0 0 2px var(--peach);
}

.radial-menu.open .radial-item:hover,
.radial-menu.open .radial-item:focus-visible { transform: var(--shift) scale(1.07); }

/* Zwei Einträge: einer über, einer unter der Mittellinie. */
.radial-item:nth-child(1) { --angle: calc(-1 * var(--spread)); }
.radial-item:nth-child(2) { --angle: var(--spread); }

/* Fängt den Klick daneben ab und nimmt dem Board etwas Aufmerksamkeit. */
.radial-scrim {
  position: fixed;
  inset: 0;
  z-index: 55; /* über der Leiste (30), unter dem Fächer (60) */
  background: #1c2c2426;
  border: 0;
  padding: 0;
  animation: radial-scrim-in .2s ease;
}

@keyframes radial-scrim-in { from { opacity: 0; } to { opacity: 1; } }

/* Als untere Leiste fächert das Menü nach oben auf. */
@media (max-width: 700px) {
  .nav-create { align-self: auto; flex: 1; margin-bottom: 0; }
  .nav-create-btn { height: 100%; }
  .radial-menu { --direction: -90deg; --radius: 96px; --spread: 40deg; }
  .radial-item { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-create-btn .icon,
  .radial-item { transition: none; }
  .radial-scrim { animation: none; }
}

/* ===== Abo im Konto-Tab =====
 *
 * Die Tarifwahl steht als zwei gleichrangige Karten da. Kein „beliebtester
 * Tarif"-Aufkleber, keine durchgestrichenen Vergleichspreise: Wer hier ist,
 * hat sich für das Produkt schon entschieden und soll nur noch wählen, wie
 * er zahlt.
 */
.abo-bereich { margin-bottom: 8px; }

.abo-tarife { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 14px 0 16px; }

.abo-tarif {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  cursor: pointer;
  line-height: 1.4;
}

.abo-tarif:has(input:checked) { border-color: var(--peach); box-shadow: 0 0 0 2px var(--peach); }
.abo-tarif input { position: absolute; opacity: 0; pointer-events: none; }
.abo-tarif-kopf { font-size: 15px; }
.abo-tarif-kopf strong { font-size: 20px; }
.abo-tarif-sub { color: var(--color-text-muted); font-size: 13px; }

/* Die Zustimmung zum sofortigen Beginn. Nie vorangekreuzt – ohne sie erlischt
   das Widerrufsrecht nicht, und ein gesetztes Häkchen wäre unwirksam. */
.abo-zustimmung {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.abo-zustimmung input { margin-top: 3px; flex-shrink: 0; }

.abo-klein { font-size: 13px; margin-top: 8px; }
.abo-verwalten { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.abo-hinweis-still { color: var(--color-danger-ink); }

/* ===== Abo-Leiste über dem Board =====
 *
 * Sitzt, wo auch der Offline-Hinweis sitzt, und sieht ihm ähnlich: Beides sind
 * Nachrichten über den Zustand des Boards, keine Werbung. Drei Stufen, weil
 * eine Leiste, die 30 Tage lang gleich laut ist, am letzten Tag nicht mehr
 * gelesen wird.
 */
.abo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 30px 0;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.45;
}

.abo-bar .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--color-text-muted); }
.abo-bar > span:not(.icon) { flex: 1; min-width: 0; }

/* Letzte Tage der Probezeit: wärmer, aber noch nicht alarmierend. */
.abo-bar-knapp { border-color: #e6cf9a; background: #fdf6e4; }
.abo-bar-knapp .icon { color: #7a5a12; }

/* Nur-Lesen: der Zustand, der erklärt werden muss, bevor jemand etwas antippt. */
.abo-bar-gesperrt { border-color: #f0b9b9; background: var(--color-danger-soft); }
.abo-bar-gesperrt .icon { color: var(--color-danger-ink); }

.abo-bar-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-surface);
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.abo-bar-btn:hover { background: var(--peach); border-color: var(--peach); color: #293f35; }

/* ===== Nur-Lesen: sichtbar gesperrt =====
 *
 * Was nicht mehr geht, sieht auch so aus – sonst erfährt man es erst beim
 * Antippen, und eine Aufgabe, die sich nicht abhaken lässt, wirkt wie ein
 * Fehler statt wie eine offene Rechnung.
 *
 * Gelesen wird weiter alles: Termine, Punkte, Historie, Listen. Nur das
 * Verändern ist weg. Deshalb wird hier nichts ausgegraut, was man nur ansieht.
 */
.abo-nur-lesen .task-check,
.abo-nur-lesen .nav-create-btn,
.abo-nur-lesen .quick-add,
.abo-nur-lesen .list-add {
  opacity: .45;
  pointer-events: none;
}

/* Der Punktestand bleibt anklickbar – er ZEIGT etwas. Gesperrt wird erst das
   Einlösen darin, sonst nähme man der Familie die Auskunft über ihre Punkte. */
.abo-nur-lesen .reward-card {
  opacity: .45;
  pointer-events: none;
}

/* Die Karte IST ein Knopf: Ein Klick irgendwo darauf hakt ab. Ohne
   pointer-events geht der Wunsch trotzdem raus und wird abgelehnt – für die
   Familie sähe das aus, als passiere gar nichts. Der Text bleibt voll lesbar,
   nur das Auslösen ist weg. */
.abo-nur-lesen .task {
  cursor: default;
  pointer-events: none;
}

/* Der Knopf zum Anlegen bleibt sichtbar, aber unbenutzbar – er verschwinden zu
   lassen hieße, die Oberfläche unter der Familie umzubauen. */
.abo-nur-lesen .nav-create-btn {
  filter: grayscale(.7);
}

@media (max-width: 700px) {
  .abo-bar { margin: 10px 16px 0; flex-wrap: wrap; }
  .abo-bar-btn { width: 100%; }
}

/* ===== Einrichtung für neue Familien =====
 *
 * Ruhig und knapp: Wer hier steht, will loslegen, nicht eine Produkttour
 * durchklicken. Drei Punkte oben zeigen, dass es gleich vorbei ist.
 */
.setup-schritte { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.setup-punkt {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.setup-punkt.aktiv { background: var(--peach); color: #293f35; }
.setup-punkt.fertig { background: var(--color-surface-raised); color: var(--color-text); }

.setup-text { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--color-text-muted); }
.setup-leer { margin: 0; font-size: 14px; color: var(--color-text-muted); }
.setup-hinweis { margin: 10px 0 0; font-size: 13px; color: var(--color-text-muted); }

.setup-personen { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.setup-person {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-surface-warm);
  font-size: 14px;
  font-weight: 600;
}

.setup-form { display: flex; gap: 10px; }
.setup-form input { flex: 1; min-width: 0; }
.setup-auswahl { width: 100%; margin-bottom: 14px; }

/* Die Vorlagen als anklickbare Zeilen statt als Liste mit Kästchen am Rand –
   auf einem Tablet trifft man die ganze Zeile, nicht ein 16px-Quadrat. */
.setup-vorlagen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}

.setup-vorlage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  font-size: 14px;
  cursor: pointer;
}

.setup-vorlage:has(input:checked) { border-color: var(--peach); background: var(--color-surface-warm); }
.setup-vorlage .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--color-text-muted); }

.setup-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.setup-aktionen { display: flex; gap: 10px; }

@media (max-width: 700px) {
  .setup-fuss { flex-direction: column-reverse; align-items: stretch; }
  .setup-aktionen .btn { flex: 1; }
}
