/* Palette matches dieleuchte-stagelight.de: black background, the exact
   brand gold already used in the header logo mark, bold condensed display
   type ("Staatliches", the site's headline font) and Roboto for body copy —
   see public/index.html for the Google Fonts <link> that loads them. */
:root{
  --bg:#0C0B09; --surface:#19160F; --surface-2:#211D15; --fg:#F4F1E9; --muted:#A79D8A;
  --border:#352F22; --accent:#CCAA3C; --accent-ink:#17130A;
  --st-planned:#4A87C9; --st-progress:#D98F2E; --st-review:#A98AE0; --st-done:#3FA57E; --st-critical:#E1614A;
  --font-display:"Staatliches","DIN Alternate","Barlow",system-ui,sans-serif;
  --font-body:"Roboto","IBM Plex Sans",system-ui,-apple-system,sans-serif;
  --font-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,monospace;
  color-scheme: dark;
}

*{box-sizing:border-box;}
/* Several elements below (.login-screen, .tabs, .sources, .main-switch, …)
   set an explicit "display" that would otherwise outrank the browser's own
   "[hidden]{display:none}" rule once an element also carries a CSS class —
   without this, toggling .hidden via JS would leave them visually shown. */
[hidden]{display:none !important;}
html,body{margin:0; padding:0;}
body{background:var(--bg); color:var(--fg); font-family:var(--font-body); -webkit-font-smoothing:antialiased;}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
h1,h2,h3{font-family:var(--font-display); font-weight:400; text-transform:uppercase; letter-spacing:.01em; margin:0; text-wrap:balance;}
.eyebrow{font-family:var(--font-mono); font-size:11px; letter-spacing:.11em; text-transform:uppercase; color:var(--muted); font-weight:500; display:block;}
.mono{font-family:var(--font-mono); font-variant-numeric:tabular-nums;}
.scope{font-family:var(--font-body); font-size:15px; font-weight:400; color:var(--muted);}

/* ---------- App-Rahmen: Seitenleiste links (macOS), Inhalt rechts ---------- */
.shell{display:grid; grid-template-columns:248px minmax(0,1fr); min-height:100vh;}
.sidebar{position:sticky; top:0; height:100vh; overflow-y:auto; display:flex; flex-direction:column; gap:18px;
  padding:14px 12px 14px; background:#12100C; border-right:1px solid var(--border);}
.sb-brand{display:flex; flex-direction:column; gap:2px;}
.sb-illustration{display:block; width:100%; height:auto; margin-bottom:-4px;}
.sb-wordmark{display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding-inline:10px;}
.sb-name{font-family:var(--font-display); font-size:24px; letter-spacing:.01em; line-height:1; text-transform:uppercase;}

.main-switch{display:flex; flex-direction:column; gap:2px;}
.sb-item{display:flex; align-items:center; gap:10px; width:100%; height:34px; padding:0 10px; border:none; border-radius:8px;
  background:transparent; color:var(--fg); font:500 13.5px/1 var(--font-body); text-align:left; cursor:pointer;}
.sb-item:hover{background:rgba(244,241,233,.06);}
.sb-item[aria-current="page"]{background:var(--accent); color:var(--accent-ink);}
.sb-item.sb-settings{margin-top:10px;}
.sb-icon{display:flex; width:19px; height:19px; color:var(--accent); flex-shrink:0;}
.sb-icon svg{width:100%; height:100%;}
.sb-item[aria-current="page"] .sb-icon{color:var(--accent-ink);}

.sb-section{display:flex; flex-direction:column; gap:4px;}
.sb-label{font:600 11.5px/1 var(--font-body); text-transform:none; letter-spacing:.01em; color:var(--muted); padding:0 10px 4px;}
.tabs{display:flex; flex-direction:column; gap:2px;}
.tab{display:flex; align-items:center; gap:10px; width:100%; height:32px; padding:0 10px; border:none; border-radius:8px;
  background:transparent; color:var(--fg); font:400 13px/1 var(--font-body); text-align:left; cursor:pointer;}
.tab:hover{background:rgba(244,241,233,.06);}
.tab[aria-pressed="true"]{background:rgba(204,170,60,.16); color:var(--fg); font-weight:600;}
.tab-label{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.avatar{display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; flex-shrink:0;
  background:var(--surface-2); border:1px solid var(--border); color:var(--fg); font:600 9.5px/1 var(--font-body); letter-spacing:.02em;}
.avatar.all{color:var(--accent); font-size:14px;}
.tab[aria-pressed="true"] .avatar{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}

.sb-foot{margin-top:auto; display:flex; flex-direction:column; gap:12px; padding-top:12px; border-top:1px solid var(--border);}
.sources{display:flex; flex-direction:column; gap:5px; padding-inline:10px; font-size:11.5px; color:var(--muted);}
.sources span b{color:var(--fg); font-weight:500;}
.dot{display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:6px; vertical-align:middle; flex-shrink:0;}
.account-block{display:flex; align-items:center; gap:10px; padding:4px 6px 0 10px;}
.account-block .avatar{width:30px; height:30px; font-size:11px; background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
.account-name{display:flex; flex-direction:column; gap:2px; min-width:0; flex:1;}
.account-name b{font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.account-name small{font-size:11px; color:var(--muted);}
.sb-logout{border:1px solid var(--border); background:transparent; color:var(--muted); border-radius:7px; height:28px; padding:0 10px; font:500 12px/1 var(--font-body); cursor:pointer;}
.sb-logout:hover{color:var(--fg); border-color:var(--accent);}

.content{min-width:0; padding:0 32px 48px;}
header.top{position:sticky; top:0; z-index:5; display:flex; align-items:flex-end; justify-content:space-between; gap:12px 24px; flex-wrap:wrap;
  padding:22px 0 16px; margin-bottom:22px; border-bottom:1px solid var(--border);
  background:rgba(12,11,9,.82); -webkit-backdrop-filter:saturate(1.4) blur(14px); backdrop-filter:saturate(1.4) blur(14px);}
header.top h1{font-size:clamp(30px,4vw,40px); line-height:1;}
.top-title{display:flex; flex-direction:column;}
.contact-links{display:flex; flex-wrap:wrap; gap:2px 12px;}
.contact-links a{color:var(--muted); text-decoration:none;}
.contact-links a:hover{color:var(--accent);}
.top-right{display:flex; flex-direction:column; align-items:flex-end; gap:6px; margin-left:auto;}
.top-logo{display:block; height:64px; width:auto; color:var(--fg);}
.date{font-size:13px; color:var(--muted);}

.module{background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:20px; min-width:0;}
.module > .eyebrow{display:none;}
.module h2{font-size:24px; margin-bottom:14px;}
.empty{font-size:13px; color:var(--muted); padding-block:10px;}
.empty.small{font-size:12px; padding-block:4px 2px;}

.cal-module{margin-bottom:20px;}
.cal-toolbar{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:22px; margin-bottom:18px;}
.cal-nav{display:flex; align-items:center; gap:6px;}
.nav-btn{width:26px; height:26px; display:flex; align-items:center; justify-content:center; border:1px solid var(--border); background:var(--surface-2); color:var(--fg); border-radius:6px; cursor:pointer; font-size:14px; line-height:1; padding:0;}
.nav-btn:hover{border-color:var(--accent);}
.nav-today{font-size:11.5px; font-weight:600; color:var(--fg); background:var(--surface-2); border:1px solid var(--border); border-radius:6px; padding:0 10px; height:26px; cursor:pointer;}
.nav-today:hover{border-color:var(--accent);}
.cal-period{font-size:12.5px; color:var(--muted); margin-left:4px; white-space:nowrap;}
.seg{display:flex; gap:4px; background:var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:3px;}
.seg-btn{font-family:var(--font-body); font-size:12px; font-weight:600; color:var(--muted); background:transparent; border:none; border-radius:5px; padding:5px 12px; cursor:pointer;}
.seg-btn[aria-selected="true"]{background:var(--accent); color:var(--accent-ink);}

.agenda-h{display:flex; gap:12px; overflow-x:auto; padding-block:2px 6px;}
.ev-card{flex:0 0 208px; border:1px solid var(--border); border-radius:10px; padding:13px; background:var(--surface-2); display:flex; flex-direction:column; gap:6px;}
.ev-card.next{border-color:var(--accent); border-width:2px; padding:12px;}
.ev-card .time{font-family:var(--font-mono); font-size:13px; color:var(--muted);}
.ev-card.next .time{color:var(--accent); font-weight:600;}
.ev-title{font-weight:600; font-size:14px; line-height:1.3;}
.ev-meta{font-size:12px; color:var(--muted);}
.ev-meta b{color:var(--fg); font-weight:600;}
.tag-next{display:inline-block; font-family:var(--font-mono); font-size:9.5px; letter-spacing:.08em; color:var(--accent-ink); background:var(--accent); border-radius:4px; padding:1px 6px; text-transform:uppercase; align-self:flex-start;}

.week-flex{display:flex; gap:10px; overflow-x:auto; padding-bottom:4px;}
.week-col{flex:1 1 0; min-width:140px; border:1px solid var(--border); border-radius:10px; padding:10px; background:var(--surface-2);}
.week-col.today{border-color:var(--accent); border-width:2px; padding:9px;}
.week-day-head{font-size:12px; font-weight:600; color:var(--muted); margin-bottom:8px;}
.week-day-head.today{color:var(--accent);}
.wk-ev{display:flex; flex-direction:column; gap:1px; font-size:12px; padding-block:5px; border-top:1px solid var(--border);}
.wk-ev:first-of-type{border-top:none;}
.wk-ev.project{border-left:3px solid var(--st-planned); padding-left:8px; margin-block:2px; border-top:none; background:rgba(74,135,201,.12); border-radius:0 6px 6px 0;}
.wk-ev .wk-meta{font-size:11px; color:var(--muted);}
.cell-dot.project{background:var(--st-planned);}
.day-ev.project .day-ev-time{color:var(--st-planned);}
.day-ev-link{font-size:14.5px; font-weight:600; color:var(--fg); text-decoration:none;}
.day-ev-link:hover{color:var(--accent);}
.wk-ev .time{font-family:var(--font-mono); color:var(--muted); font-size:11px;}

.month-head-row{display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-bottom:6px;}
.month-head-row span{font-family:var(--font-mono); font-size:10.5px; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); text-align:center;}
.month-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:6px;}
.month-cell{font:inherit; color:inherit; text-align:left; width:100%; min-height:64px; border:1px solid var(--border); border-radius:8px; padding:6px; display:flex; flex-direction:column; gap:5px; background:var(--surface-2); cursor:pointer;}
.month-cell:hover{border-color:var(--accent);}
.month-cell.outside{opacity:.38;}
.month-cell.today{border-color:var(--accent); border-width:2px; padding:5px;}
.cell-num{font-family:var(--font-mono); font-size:12px; font-weight:600;}
.cell-dots{display:flex; flex-wrap:wrap; gap:2px; align-items:center;}
.cell-dot{width:5px; height:5px; border-radius:50%; background:var(--accent); flex-shrink:0;}
.cell-more{font-family:var(--font-mono); font-size:9px; color:var(--muted);}

.lower-grid{display:flex; flex-direction:column; gap:20px;}

.proj{padding-block:14px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:8px; position:relative;}
.proj:first-child{border-top:none; padding-top:0;}
.proj.overdue{padding-left:12px;}
.proj.overdue::before{content:""; position:absolute; left:-1px; top:14px; bottom:14px; width:3px; background:var(--st-critical); border-radius:2px;}
.proj-head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px;}
.proj-name{font-weight:600; font-size:14.5px;}
.pill{display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; padding:3px 9px 3px 7px; border-radius:100px; white-space:nowrap; flex-shrink:0; background:var(--surface-2); border:1px solid var(--border);}
.pill .dot{margin-right:0;}
.bar-track{height:6px; border-radius:4px; background:var(--surface-2); border:1px solid var(--border); overflow:hidden;}
.bar-fill{height:100%; border-radius:4px 0 0 4px;}
.proj-meta{display:flex; justify-content:space-between; font-size:12px; color:var(--muted); gap:10px;}
.proj-meta .due.overdue{color:var(--st-critical); font-weight:600;}

.loc-module{margin-bottom:20px;}
.loc-list{display:flex; flex-direction:column;}
.loc-row{padding-block:16px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:8px;}
.loc-list .loc-row:first-child{border-top:none; padding-top:0;}
.loc-head{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.loc-name{font-weight:600; font-size:14.5px;}
.loc-tag{font-size:11px; font-weight:600; padding:3px 10px; border-radius:100px; white-space:nowrap; background:var(--surface-2); border:1px solid var(--border); color:var(--muted); flex-shrink:0;}
.loc-tag.away{border-color:var(--accent); color:var(--accent);}
.loc-place{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--fg);}
.loc-place .ic{width:16px; height:16px; color:var(--muted); flex-shrink:0;}
.loc-place b{font-weight:600;}
.loc-sub{font-size:12px; color:var(--muted); margin-left:24px;}
.loc-row .bar-track{margin-top:2px;}
.loc-meta{display:flex; justify-content:space-between; font-size:12px; color:var(--muted); gap:10px;}
.loc-meta .remain{font-weight:600; color:var(--accent);}

.tools-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px;}
.tool-card{border:1px solid var(--border); border-radius:10px; padding:16px; background:var(--surface-2); display:flex; flex-direction:column; align-items:flex-start; gap:10px; min-height:150px;}
.tool-card.add{align-items:center; justify-content:center; text-align:center; border-style:dashed; color:var(--muted); font-size:13px; cursor:default;}
.tool-icon{width:36px; height:36px; border-radius:9px; background:var(--surface); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--accent); flex-shrink:0;}
.tool-card h3{font-size:15px;}
.tool-card p{margin:0; font-size:12px; color:var(--muted); line-height:1.5;}
.tool-open{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--accent-ink); background:var(--accent); padding:7px 14px; border-radius:7px; text-decoration:none; border:none; cursor:pointer;}
.tool-open:hover{opacity:.9;}
.tool-note{font-size:10.5px; color:var(--muted);}
.tool-note b{color:var(--fg); font-weight:600;}

.notes-module{border-style:dashed; opacity:.92; display:flex; flex-direction:column; gap:12px;}
.notes-head{display:flex; align-items:center; gap:12px;}
.lock-icon{width:36px; height:36px; border-radius:10px; background:var(--surface-2); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.notes-head h3{font-size:16px;}
.notes-module p{margin:0; font-size:12.5px; color:var(--muted);}
.chips{display:flex; flex-wrap:wrap; gap:8px;}
.chip{font-size:12px; color:var(--muted); border:1px dashed var(--border); border-radius:100px; padding:5px 12px; white-space:nowrap;}
.chip.link{border-style:solid; background:var(--surface-2); color:var(--fg); text-decoration:none; display:inline-flex; align-items:center; gap:6px;}
.chip.link:hover{border-color:var(--accent); color:var(--accent);}

.settings-lock{display:flex; flex-direction:column; align-items:center; text-align:center; gap:12px; max-width:300px; margin:12px auto 4px;}
.settings-lock p{margin:0; font-size:13px; color:var(--muted);}
.settings-lock input{width:100%; padding:10px 14px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--fg); font-size:14px; font-family:var(--font-body);}
.settings-lock input:focus{outline:none; border-color:var(--accent);}
.settings-error{font-size:12px; color:var(--st-critical); min-height:14px;}
.settings-form{display:flex; flex-direction:column; gap:26px; max-width:620px; margin:4px auto 0;}
.settings-section{display:flex; flex-direction:column; gap:12px;}
.settings-section h3{font-size:14px; padding-bottom:8px; border-bottom:1px solid var(--border);}
.settings-row{display:flex; flex-direction:column; gap:4px;}
.settings-row label{font-size:11.5px; color:var(--muted); font-weight:600; letter-spacing:.02em;}
.settings-row input, .settings-row select{padding:9px 12px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--fg); font-size:13px; font-family:var(--font-body);}
.settings-row input:focus, .settings-row select:focus{outline:none; border-color:var(--accent);}
.settings-row .hint{font-size:11px; color:var(--muted);}
.settings-emp-row{display:flex; gap:8px; align-items:center;}
.settings-emp-row input{flex:1;}
.settings-emp-row .emp-tag{font-size:11px; color:var(--muted); width:64px; flex-shrink:0;}
.settings-save-bar{display:flex; align-items:center; justify-content:center; gap:10px; margin-top:4px;}
.settings-note{font-size:11px; color:var(--muted); text-align:center;}
.settings-saved{font-size:12px; color:var(--st-done); text-align:center; font-weight:600; min-height:16px;}
.outlook-status{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;}
.outlook-status .acct{font-size:13px;}
.outlook-status .acct b{font-weight:600;}
.outlook-status .acct .dotlive{display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--st-done); margin-right:7px; vertical-align:middle;}
.cal-map-list{display:flex; flex-direction:column; gap:8px; margin-top:4px;}
.cal-map-row{display:flex; gap:8px; align-items:center;}
.cal-map-row .emp-tag{font-size:11px; color:var(--muted); width:64px; flex-shrink:0;}
.cal-map-row select{flex:1;}

.login-screen{position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:var(--bg); padding:20px; z-index:50;}
.login-card{width:100%; max-width:380px; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:28px 26px; display:flex; flex-direction:column; gap:16px;}
.login-illustration{display:block; width:calc(100% + 20px); height:auto; margin:-10px -10px -6px;}
.login-brand{display:flex; flex-direction:column; gap:4px; text-align:center;}
.login-brand h1{font-size:30px;}
.login-sub{margin:0; font-size:13px; color:var(--muted); text-align:center;}
#login-form{display:flex; flex-direction:column; gap:14px;}
.login-submit{width:100%; height:42px; font-size:14px; background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
.login-submit:hover{border-color:var(--accent); filter:brightness(1.08);}

.users-list{display:flex; flex-direction:column; gap:8px;}
.user-row{display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); font-size:12.5px;}
.user-row .user-main{display:flex; flex-direction:column; gap:2px; min-width:120px;}
.user-row .user-main b{font-size:13.5px;}
.user-row .user-tags{display:flex; gap:6px; flex-wrap:wrap;}
.user-row .user-actions{display:flex; gap:6px; margin-left:auto;}
.pill-tag{font-size:10.5px; font-weight:600; letter-spacing:.02em; padding:2px 8px; border-radius:100px; background:var(--surface); border:1px solid var(--border); color:var(--muted); white-space:nowrap;}
.pill-tag.admin{border-color:var(--accent); color:var(--accent);}
.pill-tag.external{border-color:var(--st-progress); color:var(--st-progress);}

.contacts-toolbar{display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; margin-bottom:18px;}
.contacts-toolbar input[type="text"]{padding:8px 12px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--fg); font-size:13px; font-family:var(--font-body); min-width:170px;}
.contacts-toolbar input[type="text"]:focus{outline:none; border-color:var(--accent);}
.contact-group-toggle{display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--fg); cursor:pointer; font-weight:400;}
.contact-sort{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted);}
.contact-sort select{padding:7px 10px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--fg); font-size:12.5px; font-family:var(--font-body);}
.contact-sort select:focus{outline:none; border-color:var(--accent);}
.contacts-list{display:flex; flex-direction:column; gap:18px; margin-bottom:22px;}
.contact-group-label{font-family:var(--font-mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding-bottom:4px; border-bottom:1px solid var(--border);}
.contact-group-rows{display:flex; flex-direction:column; gap:8px; margin-top:8px;}
.contact-export-actions{display:flex; gap:8px; margin-left:auto;}

.users-form{display:flex; flex-direction:column; gap:14px; padding-top:6px;}
.views-check, .emp-scope-list{display:flex; flex-wrap:wrap; gap:8px 14px;}
.views-check label, .emp-scope-list label, .emp-scope-all{display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--fg); cursor:pointer; font-weight:400;}
.emp-scope{display:flex; flex-direction:column; gap:8px;}

footer.note{margin-top:26px; font-size:11.5px; color:var(--muted); text-align:center;}

/* ---------- Einstellungen: wie macOS-Systemeinstellungen ---------- */
.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
.btn-primary,.btn-secondary,.btn-plain{display:inline-flex; align-items:center; justify-content:center; gap:6px; height:32px; padding:0 14px; border-radius:8px;
  font:600 12.5px/1 var(--font-body); cursor:pointer; text-decoration:none; white-space:nowrap; border:1px solid transparent;}
.btn-primary{background:var(--accent); color:var(--accent-ink);}
.btn-primary:hover{filter:brightness(1.08);}
.btn-secondary{background:var(--surface-2); border-color:var(--border); color:var(--fg);}
.btn-secondary:hover{border-color:var(--accent);}
.btn-plain{background:transparent; color:var(--muted); height:28px; padding:0 9px; font-weight:500;}
.btn-plain:hover{color:var(--fg); background:rgba(244,241,233,.06);}
.btn-plain.danger:hover{color:var(--st-critical);}

.settings-view{display:grid; grid-template-columns:230px minmax(0,1fr); gap:24px; align-items:start;}
.set-nav{position:sticky; top:110px; display:flex; flex-direction:column; gap:2px;}
.set-nav-item{display:flex; flex-direction:column; gap:3px; padding:10px 12px; border:none; border-radius:9px; background:transparent; color:var(--fg); text-align:left; cursor:pointer;}
.set-nav-item:hover{background:rgba(244,241,233,.05);}
.set-nav-item[aria-current="page"]{background:var(--surface-2); box-shadow:inset 3px 0 0 var(--accent);}
.set-nav-title{font:600 13.5px/1.2 var(--font-body);}
.set-nav-sub{font-size:11.5px; color:var(--muted); line-height:1.3;}
.set-panes{display:flex; flex-direction:column; gap:18px; min-width:0;}
.set-pane{display:flex; flex-direction:column; gap:18px;}
.set-card{background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:18px 20px; display:flex; flex-direction:column; gap:12px;}
.set-card h3{font-size:19px;}
.set-card-head{display:flex; align-items:flex-start; justify-content:space-between; gap:16px;}
.set-card-head > div{display:flex; flex-direction:column; gap:4px;}
.set-desc{margin:0; font-size:12.5px; line-height:1.5; color:var(--muted); max-width:60ch;}
.set-hint{font-size:12px; color:var(--muted); line-height:1.5;}
.set-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 16px;}
.settings-row.narrow{max-width:280px;}
.settings-row .hint b{color:var(--fg); font-weight:600;}

.set-list{display:flex; flex-direction:column;}
.set-row{display:flex; align-items:center; gap:12px; padding:11px 0; border-top:1px solid var(--border);}
.set-row:first-child{border-top:none;}
.avatar.lg{width:34px; height:34px; font-size:11.5px;}
.avatar.ext{border-color:var(--st-progress); color:var(--st-progress);}
.set-row-main{display:flex; flex-direction:column; gap:3px; min-width:0; flex:1;}
.set-row-main b{font-size:14px; font-weight:600;}
.set-row-sub{display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; font-size:12px; color:var(--muted);}
.set-row-sub .muted{color:var(--muted);}
.login-badge{font:500 11.5px/1 var(--font-mono); color:var(--fg); background:var(--surface-2); border:1px solid var(--border); border-radius:5px; padding:3px 6px;}
.login-badge.admin{border-color:var(--accent); color:var(--accent);}
.login-badge.ext{border-color:var(--st-progress); color:var(--st-progress);}
.set-row-actions{display:flex; gap:2px; flex-shrink:0;}

.status-pill{flex-shrink:0; display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; color:var(--muted); background:var(--surface-2); border:1px solid var(--border); border-radius:100px; padding:4px 10px;}
.status-pill::before{content:""; width:7px; height:7px; border-radius:50%; background:var(--muted);}
.status-pill.ok{color:var(--st-done); border-color:rgba(63,165,126,.45);}
.status-pill.ok::before{background:var(--st-done);}
.outlook-status:empty,.cal-map-list:empty,.set-hint:empty{display:none;}

.chip-list{display:flex; flex-wrap:wrap; gap:8px;}
.set-chip{display:inline-flex; align-items:center; background:var(--surface-2); border:1px solid var(--border); border-radius:100px; overflow:hidden;}
.set-chip-label{border:none; background:transparent; color:var(--fg); font:500 12.5px/1 var(--font-body); padding:7px 4px 7px 12px; cursor:pointer;}
.set-chip-label:hover{color:var(--accent);}
.set-chip-x{border:none; background:transparent; color:var(--muted); font-size:15px; line-height:1; padding:6px 10px 6px 6px; cursor:pointer;}
.set-chip-x:hover{color:var(--st-critical);}
.inline-form{display:flex; gap:8px; align-items:center; flex-wrap:wrap;}
.inline-form input[type="text"]{flex:1; min-width:200px; padding:8px 12px; border:1px solid var(--border); border-radius:8px; background:var(--bg); color:var(--fg); font:13px var(--font-body);}
.inline-form input[type="text"]:focus{outline:none; border-color:var(--accent);}
.settings-error:empty{display:none;}

.set-savebar{position:sticky; bottom:16px; display:flex; align-items:center; justify-content:flex-end; gap:14px; padding:10px 12px; border:1px solid var(--border); border-radius:12px;
  background:rgba(25,22,15,.92); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);}
.set-savebar .settings-saved{min-height:0;}

dialog.sheet{width:min(440px,calc(100vw - 32px)); padding:0; border:1px solid var(--border); border-radius:14px; background:var(--surface); color:var(--fg); box-shadow:0 24px 60px rgba(0,0,0,.55);}
dialog.sheet.wide{width:min(640px,calc(100vw - 32px));}
dialog.sheet::backdrop{background:rgba(0,0,0,.6); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);}
.sheet-body{display:flex; flex-direction:column; gap:16px; padding:22px; max-height:calc(100vh - 64px); overflow-y:auto;}
.sheet-body h3{font-size:22px;}
.sheet-actions{display:flex; justify-content:flex-end; gap:8px; padding-top:4px;}
.sheet-actions .btn-plain{height:32px;}
.views-check, .emp-scope-list{display:flex; flex-wrap:wrap; gap:8px 16px;}

/* Monday: Board-Auswahl (Einstellungen) und Board-Filter (Projekte) */
.token-remove{align-self:flex-start; margin-top:2px; padding:0 6px;}
.board-picker{display:flex; flex-direction:column; gap:10px; border-top:1px solid var(--border); padding-top:14px;}
.board-picker-head{display:flex; align-items:center; gap:4px; flex-wrap:wrap;}
.board-picker-title{font-weight:600; font-size:13.5px; margin-right:6px;}
.board-picker-count{font-size:12px; color:var(--muted); margin-right:auto;}
.board-search{width:100%; padding:8px 12px; border:1px solid var(--border); border-radius:8px; background:var(--bg); color:var(--fg); font:13px var(--font-body);}
.board-search:focus{outline:none; border-color:var(--accent);}
.board-list{display:flex; flex-direction:column; gap:12px; max-height:360px; overflow-y:auto; padding-right:4px;}
.board-group{display:flex; flex-direction:column; gap:2px;}
.board-group-title{font-size:11.5px; font-weight:600; color:var(--muted); padding:2px 0 4px;}
.board-item{display:flex; align-items:center; gap:10px; padding:7px 8px; border-radius:8px; cursor:pointer; font-size:13px;}
.board-item:hover{background:rgba(244,241,233,.05);}
.board-item input{accent-color:var(--accent); width:16px; height:16px; flex-shrink:0;}
.board-name{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.board-meta{font-size:11.5px; color:var(--muted); white-space:nowrap;}

.cal-head{display:flex; align-items:baseline; justify-content:space-between; gap:8px 16px; flex-wrap:wrap; margin-bottom:14px;}
.cal-head h2{margin-bottom:0;}
.cal-sources{display:flex; gap:14px; font-size:12px; color:var(--muted);}
.cal-sources b, .sources b{font-weight:600;}
.src-line{display:inline-flex; align-items:center;}
.src-line.off .dot{box-shadow:inset 0 0 0 1.5px var(--muted);}
.src-line.live b{color:var(--st-done);}
.src-line.error b{color:var(--st-critical);}
.diag{display:flex; flex-direction:column; gap:10px; border-top:1px solid var(--border); padding-top:14px;}
.diag-board{display:flex; flex-direction:column; gap:8px; padding:12px; border:1px solid var(--border); border-radius:10px; background:var(--bg);}
.diag-head{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.diag-grid{display:grid; grid-template-columns:110px minmax(0,1fr); gap:4px 12px; font-size:12.5px;}
.diag-grid span:nth-child(odd){color:var(--muted);}
.diag-cols{color:var(--muted); font-size:11.5px; line-height:1.5;}
#monday-diag{display:flex; flex-direction:column; gap:8px;}
.board-filter{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px;}
.board-chip{display:inline-flex; align-items:center; gap:7px; height:32px; padding:0 12px; border-radius:100px; border:1px solid var(--border); background:var(--surface-2); color:var(--fg); font:500 12.5px/1 var(--font-body); cursor:pointer;}
.board-chip:hover{border-color:var(--accent);}
.board-chip[aria-pressed="true"]{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
.board-chip-n{font-size:11px; color:var(--muted); font-weight:600;}
.board-chip[aria-pressed="true"] .board-chip-n{color:var(--accent-ink); opacity:.7;}
.proj-group{display:flex; flex-direction:column; margin-bottom:8px;}
.proj-group + .proj-group{border-top:1px solid var(--border); padding-top:14px;}
.proj-group-title{display:flex; align-items:center; gap:8px; font-size:15px; margin-bottom:8px;}
.proj-more{align-self:flex-start; margin-top:6px; color:var(--accent);}
a.proj-name{color:var(--fg); text-decoration:none;}
a.proj-name:hover{color:var(--accent);}

/* Tages-Fenster in der Monatsansicht */
dialog.day-sheet::backdrop{background:rgba(0,0,0,.35); -webkit-backdrop-filter:none; backdrop-filter:none;}
.day-list{display:flex; flex-direction:column;}
.day-ev{display:grid; grid-template-columns:72px minmax(0,1fr); gap:12px; padding:12px 0; border-top:1px solid var(--border);}
.day-ev:first-child{border-top:none; padding-top:2px;}
.day-ev-time{font-size:13px; color:var(--accent); padding-top:2px;}
.day-ev-main{display:flex; flex-direction:column; gap:3px; font-size:13px; color:var(--muted);}
.day-ev-main b{font-size:14.5px; color:var(--fg); font-weight:600;}
.day-ev-who{color:var(--fg);}

/* ---------- Kalender im BusyCal-Stil ---------- */
:root{--lane-h:21px;}
.mcal{border:1px solid var(--border); border-radius:12px; overflow:hidden; background:var(--bg);}
.mcal-head{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); background:var(--surface-2); border-bottom:1px solid var(--border);}
.mcal-head span{font-size:11.5px; font-weight:600; color:var(--muted); text-align:right; padding:7px 10px;}
.mcal-head span.we{color:#8a8170;}
.mweek{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); row-gap:2px; min-height:128px; position:relative;}
.mweek + .mweek{border-top:1px solid var(--border);}
.mday{grid-row:1 / -1; display:flex; justify-content:flex-end; align-items:flex-start; padding:5px 7px; margin:0; border:none; border-left:1px solid var(--border); background:transparent; color:var(--fg); font:inherit; cursor:pointer; min-width:0;}
.mday:first-child{border-left:none;}
.mday.we{background:rgba(244,241,233,.018);}
.mday:hover{background:rgba(204,170,60,.06);}
.mday-num{font-size:12.5px; font-weight:600; line-height:22px; min-width:22px; height:22px; padding:0 6px; border-radius:100px; text-align:center;}
.mday.outside .mday-num{color:var(--muted); opacity:.55;}
.mday.today .mday-num{background:var(--accent); color:var(--accent-ink);}
.mev{position:relative; z-index:1; pointer-events:none; display:flex; align-items:center; min-width:0; height:calc(var(--lane-h) - 2px); margin:0 4px; padding:0 6px; border-radius:5px; font-size:11.5px; line-height:1; color:var(--fg); overflow:hidden; white-space:nowrap;}
.mev.bar{background:color-mix(in srgb, var(--c) 45%, var(--bg)); box-shadow:inset 3px 0 0 var(--c);}
.mev.bar.cont-l{margin-left:0; border-top-left-radius:0; border-bottom-left-radius:0; box-shadow:none;}
.mev.bar.cont-r{margin-right:0; border-top-right-radius:0; border-bottom-right-radius:0;}
.mev.timed{padding-left:4px;}
.mev.timed::before{content:""; width:7px; height:7px; border-radius:50%; background:var(--c); margin-right:6px; flex-shrink:0;}
.cev-label{display:flex; align-items:center; gap:5px; min-width:0;}
.cev-time{font:500 10.5px/1 var(--font-mono); color:var(--muted); flex-shrink:0;}
.cev-title{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500;}
.mmore{position:relative; z-index:1; pointer-events:none; font-size:11px; font-weight:600; color:var(--muted); padding:2px 10px 0; white-space:nowrap; overflow:hidden;}

.tcal{border:1px solid var(--border); border-radius:12px; overflow:hidden; background:var(--bg); --gutter:58px;}
.tcal-head, .tcal-allday{display:grid; grid-template-columns:var(--gutter) minmax(0,1fr);}
.tcal-head{grid-template-columns:var(--gutter) repeat(var(--cols),minmax(0,1fr)); background:var(--surface-2); border-bottom:1px solid var(--border);}
.tcal-gutter{font-size:10.5px; color:var(--muted); padding:6px 8px 0 0; text-align:right;}
.tcal-day{display:flex; align-items:baseline; justify-content:center; gap:6px; padding:8px 4px; border-left:1px solid var(--border);}
.tcal-wd{font-size:11.5px; font-weight:600; color:var(--muted);}
.tcal-num{font-size:18px; font-weight:500; min-width:30px; height:30px; line-height:30px; text-align:center; border-radius:100px;}
.tcal-day.today .tcal-num{background:var(--accent); color:var(--accent-ink); font-weight:700;}
.tcal-day.today .tcal-wd{color:var(--accent);}
.tcal-allday{border-bottom:1px solid var(--border); background:var(--surface);}
.tcal-allday-grid{display:grid; grid-template-columns:repeat(var(--cols),minmax(0,1fr)); row-gap:2px; padding:4px 0; min-height:30px;}
.tcal-adcell{border:none; border-left:1px solid var(--border); background:transparent; cursor:pointer; margin:-4px 0;}
.tcal-adcell:hover{background:rgba(204,170,60,.06);}
.tcal-scroll{max-height:min(640px, 70vh); overflow-y:auto;}
.tcal-body{display:grid; grid-template-columns:var(--gutter) minmax(0,1fr);}
.tcal-hours{position:relative;}
.tcal-hours span{position:absolute; right:8px; transform:translateY(-50%); font:500 10.5px/1 var(--font-mono); color:var(--muted);}
.tcal-hours span:first-child{transform:none; top:3px !important;}
.tcal-cols{display:grid; grid-template-columns:repeat(var(--cols),minmax(0,1fr));
  background-image:linear-gradient(to bottom, var(--border) 1px, transparent 1px); background-size:100% 48px;}
.tcal-col{position:relative; border-left:1px solid var(--border); cursor:pointer;}
.tcal-col.today{background:rgba(204,170,60,.045);}
.tev{position:absolute; display:flex; flex-direction:column; gap:1px; padding:3px 7px; border-radius:6px; overflow:hidden; cursor:default;
  background:color-mix(in srgb, var(--c) 40%, var(--bg)); box-shadow:inset 3px 0 0 var(--c); font-size:11.5px; line-height:1.25;}
.tev-time{font:500 10.5px/1 var(--font-mono); color:var(--muted);}
.tev-title{font-weight:600; overflow:hidden; text-overflow:ellipsis;}
.tev-meta{color:var(--muted); font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.tcal-now{position:absolute; left:0; right:0; height:2px; background:var(--st-critical); z-index:2; pointer-events:none;}
.tcal-now::before{content:""; position:absolute; left:-5px; top:-4px; width:10px; height:10px; border-radius:50%; background:var(--st-critical);}

.wlist{display:flex; flex-direction:column; gap:6px;}
.wl-day{display:grid; grid-template-columns:48px minmax(0,1fr); gap:12px; align-items:start; width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); color:var(--fg); font:inherit; text-align:left; cursor:pointer;}
.wl-day.today{border-color:var(--accent);}
.wl-day.empty{padding-block:7px; background:transparent;}
.wl-date{display:flex; flex-direction:column; align-items:center; gap:1px;}
.wl-wd{font-size:11px; font-weight:600; color:var(--muted);}
.wl-num{font-size:19px; font-weight:500; line-height:1.1;}
.wl-day.today .wl-wd{color:var(--accent);}
.wl-day.today .wl-num{color:var(--accent); font-weight:700;}
.wl-day.empty .wl-num{font-size:15px;}
.wl-items{display:flex; flex-direction:column; gap:6px; min-width:0; padding-top:2px;}
.wl-ev{display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:8px; padding-left:9px; box-shadow:inset 3px 0 0 var(--c);}
.wl-time{font:500 11px/1.5 var(--font-mono); color:var(--muted); white-space:nowrap;}
.wl-title{font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.wl-meta{grid-column:2; font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.wl-none{font-size:12.5px; color:var(--muted); line-height:22px;}
.day-ev .day-ev-time{color:var(--c);}
.day-ev{box-shadow:inset 3px 0 0 var(--c); padding-left:10px;}

/* ---------- Handy/Tablet: wie eine iOS-App ----------
   Kopfzeile (Illustration + Seitentitel) oben, Team-Filter darunter,
   Inhalt, Tab-Leiste fest unten. Seitenleiste und Inhalt werden dafür
   per display:contents aufgelöst, damit sich ihre Teile neu ordnen lassen. */
@media (max-width:860px){
  .shell{display:flex; flex-direction:column; min-height:100vh;}
  .sidebar, .content{display:contents;}
  .sb-brand, .sources{display:none;}

  header.top{order:1; position:sticky; top:0; z-index:15; margin:0; padding:10px 60px 10px 16px; gap:12px;
    flex-wrap:nowrap; align-items:center; justify-content:flex-start; border-bottom:1px solid var(--border);}
  .top-illustration{display:block; width:76px; height:auto; flex-shrink:0;}
  .top-title{display:flex; flex-direction:column; gap:3px; min-width:0;}
  header.top h1{font-size:26px; line-height:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .top-date{display:block; font-size:11.5px;}
  .top-right{display:none;}

  .sb-foot{position:fixed; top:12px; right:12px; z-index:30; margin:0; padding:0; border:none;}
  .account-block{padding:0;}
  .account-block .avatar, .account-name{display:none;}
  .sb-logout{width:36px; height:36px; padding:0; border-radius:50%; font-size:0; background:var(--surface); position:relative;}
  .sb-logout::before{content:""; position:absolute; inset:9px; background:var(--muted);
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 17l5-5-5-5M15 12H4'/%3E%3C/svg%3E") center/contain no-repeat;
            mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 17l5-5-5-5M15 12H4'/%3E%3C/svg%3E") center/contain no-repeat;}

  .sb-section{order:2; padding:12px 0 4px 16px;}
  .sb-label{display:none;}
  .tabs{flex-direction:row; gap:6px; overflow-x:auto; padding:0 16px 6px 0; scrollbar-width:none;}
  .tabs::-webkit-scrollbar{display:none;}
  .tab{width:auto; flex-shrink:0; height:36px; padding:0 14px 0 6px; border-radius:100px; background:var(--surface); border:1px solid var(--border);}
  .tab[aria-pressed="true"]{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
  .tab[aria-pressed="true"] .avatar{background:var(--accent-ink); border-color:var(--accent-ink); color:var(--accent);}

  main{order:3; padding:12px 16px 104px; min-width:0;}
  footer.note{display:none;}

  .main-switch{position:fixed; z-index:20; left:0; right:0; bottom:0; flex-direction:row; justify-content:space-around; gap:0;
    padding:4px 4px calc(4px + env(safe-area-inset-bottom)); background:rgba(18,16,12,.92);
    -webkit-backdrop-filter:saturate(1.4) blur(16px); backdrop-filter:saturate(1.4) blur(16px); border-top:1px solid var(--border);}
  .sb-item{flex:1; min-width:0; flex-direction:column; justify-content:center; gap:4px; height:54px; padding:0 2px; font-size:10.5px; text-align:center; color:var(--muted); border-radius:10px;}
  .sb-item:hover{background:transparent;}
  .sb-item.sb-settings{margin-top:0;}
  .sb-item[aria-current="page"]{background:transparent; color:var(--accent);}
  .sb-item[aria-current="page"] .sb-icon{color:var(--accent);}
  .sb-icon{width:24px; height:24px; color:var(--muted);}
  .sb-text{max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}

  /* Module: weniger Rahmen, mehr Platz */
  .module{padding:16px; border-radius:14px;}
  .module h2{font-size:20px; margin-bottom:12px;}

  /* Kalender: Tage untereinander statt seitlich scrollen */
  .cal-toolbar{flex-direction:column; align-items:stretch; gap:10px; margin-bottom:14px;}
  .cal-nav{gap:8px;}
  .nav-btn{width:38px; height:38px; font-size:18px; border-radius:10px;}
  .nav-today{height:38px; padding:0 16px; font-size:13px; border-radius:10px;}
  .cal-period{font-size:13px; margin-left:auto;}
  .seg{width:100%;}
  .seg-btn{flex:1; padding:9px 0; font-size:13px;}
  .week-flex{flex-direction:column; gap:8px; overflow:visible;}
  .week-col{min-width:0; display:grid; grid-template-columns:64px minmax(0,1fr); gap:4px 12px; padding:12px;}
  .week-col.today{padding:11px;}
  .week-col:not(.today):not(:has(.wk-ev)){padding-block:8px;}
  .week-day-head{margin:0; padding-top:5px;}
  .week-col > :not(.week-day-head){grid-column:2;}
  .wk-ev{font-size:13.5px; padding-block:5px;}
  .wk-ev .time{font-size:12px;}
  .agenda-h{flex-direction:column; overflow:visible;}
  .ev-card{flex:none;}
  .month-grid, .month-head-row{gap:4px;}
  .month-cell{min-height:48px; padding:5px 4px; border-radius:7px;}
  .month-cell.today{padding:4px 3px;}

  /* Kalender BusyCal-Stil am Handy */
  :root{--lane-h:16px;}
  .mweek{min-height:86px;}
  .mcal-head span{text-align:center; padding:6px 0; font-size:10.5px;}
  .mday{justify-content:center; padding:3px 0;}
  .mday-num{font-size:12px; height:20px; line-height:20px; min-width:20px; padding:0 4px;}
  .mev{margin:0 1px; padding:0 3px; font-size:9.5px; border-radius:3px;}
  .mev.timed{padding-left:2px;}
  .mev.timed::before{width:5px; height:5px; margin-right:3px;}
  .cev-time{display:none;}
  .mmore{font-size:9.5px; padding:0 3px; text-align:center;}
  .tcal{--gutter:44px;}
  .tcal-scroll{max-height:62vh;}

  /* Projekte, Standorte, Tools */
  .board-filter{flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-right:-16px; padding-right:16px;}
  .board-chip{flex-shrink:0; height:36px;}
  .board-item{padding:10px 8px;}
  .proj-meta, .loc-meta{font-size:12.5px;}
  .tools-grid{grid-template-columns:minmax(0,1fr);}
  .tool-card{min-height:0;}

  /* Kontakte */
  .contacts-toolbar{flex-direction:column; align-items:stretch; gap:10px;}
  .contacts-toolbar input[type="text"]{min-width:0; width:100%; height:40px; font-size:16px;}
  .contact-sort{flex-wrap:wrap;}
  .contact-sort select{flex:1; min-width:0; height:38px;}
  .contact-export-actions{margin-left:0; display:grid; grid-template-columns:2fr 1fr 1fr; gap:8px;}
  .contact-export-actions button{height:40px;}
  .user-row{flex-direction:column; align-items:stretch; gap:8px; padding:12px;}
  .user-row .user-actions{margin-left:0; justify-content:flex-start; gap:4px;}

  /* Einstellungen */
  .settings-view{grid-template-columns:minmax(0,1fr); gap:14px;}
  .set-nav{position:static; flex-direction:row; overflow-x:auto; gap:6px; scrollbar-width:none; margin-right:-16px; padding-right:16px;}
  .set-nav::-webkit-scrollbar{display:none;}
  .set-nav-item{flex-shrink:0; padding:9px 14px; border-radius:100px; background:var(--surface); border:1px solid var(--border);}
  .set-nav-item[aria-current="page"]{background:var(--accent); color:var(--accent-ink); box-shadow:none; border-color:var(--accent);}
  .set-nav-sub{display:none;}
  .set-card{padding:16px;}
  .set-card-head{flex-direction:column;}
  .set-card-head .btn-primary, .set-card-head .btn-secondary{width:100%; height:40px;}
  .set-grid{grid-template-columns:minmax(0,1fr);}
  .set-row{flex-wrap:wrap;}
  .set-row-actions{width:100%; padding-left:38px; gap:0; flex-wrap:nowrap;}
  .set-row-actions .btn-plain{padding:0 8px; font-size:12.5px;}
  .set-savebar{bottom:84px;}
  .inline-form input[type="text"]{min-width:0; width:100%; flex-basis:100%; height:40px; font-size:16px;}
  .inline-form button{flex:1; height:40px;}

  /* Formulare: 16px verhindert das Reinzoomen auf dem iPhone */
  .settings-row input, .settings-row select{font-size:16px; height:42px;}
  .btn-plain{height:36px;}

  /* Dialoge als Sheet von unten */
  dialog.day-sheet .sheet-body{max-height:62vh;}
  dialog.sheet, dialog.sheet.wide{width:100%; max-width:100%; margin:auto 0 0; border-radius:18px 18px 0 0; border-bottom:none;}
  .sheet-body{padding:20px 16px calc(20px + env(safe-area-inset-bottom)); max-height:88vh;}
  .sheet-actions .btn-primary, .sheet-actions .btn-plain{flex:1; height:44px;}
}
.top-illustration, .top-date{display:none;}
@media (max-width:860px){ .top-illustration, .top-date{display:block;} }

.set-card .settings-row input, .set-card .settings-row select, .sheet .settings-row input, .sheet .settings-row select{background:var(--bg);}
