@font-face {
  font-family: Archivo;
  src: url('/fonts/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --schwarz: #000;
  --kohle: #15110e;
  --ruß: #241d18;
  --linie: #3a2f27;
  --asche: #b0a194;
  --papier: #fff3e8;
  --signal: #ff5b00;
  --signal-hell: #ff8a47;
  --rail: 84px;
  --gap: 24px;
  --radius-s: 4px;
  --radius-m: 10px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--schwarz); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--schwarz);
  color: var(--papier);
  font: 400 16px/1.5 Archivo, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; font-stretch: 118%; line-height: 1.02; letter-spacing: -.02em; }
h2 { font-size: 1.125rem; font-weight: 700; font-stretch: 108%; line-height: 1.25; }
h3 { font-size: 1rem; font-weight: 700; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre { font-family: ui-monospace, 'Cascadia Code', Consolas, Menlo, monospace; font-size: .875rem; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: var(--signal); color: var(--schwarz); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--signal); color: var(--schwarz); padding: 8px 14px; font-weight: 700; }
.skip:focus { top: 8px; }
.muted { color: var(--asche); }
.small { font-size: .875rem; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.link { color: var(--signal-hell); text-underline-offset: 3px; }
.hot-text { color: var(--signal-hell); font-weight: 600; }
.lead { max-width: 68ch; color: var(--asche); margin-bottom: var(--gap); font-size: 1.0625rem; }

/* Bausteine */
.row { display: flex; align-items: center; gap: 12px; }
.row.tight { gap: 8px; }
.row.between { justify-content: space-between; flex-wrap: wrap; }
.row.end { justify-content: flex-end; flex-wrap: wrap; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.narrow { max-width: 480px; }
.section-gap { margin-bottom: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 16px;
  background: transparent; color: var(--papier);
  border: 1.5px solid var(--linie); border-radius: var(--radius-s);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color .12s, background-color .12s, color .12s;
}
.btn:hover { border-color: var(--papier); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--signal); border-color: var(--signal); color: var(--schwarz); font-weight: 700; }
.btn.primary:hover { background: var(--papier); border-color: var(--papier); }
.btn.danger { background: var(--papier); border-color: var(--papier); color: var(--schwarz); font-weight: 700; }
.btn.danger:hover { background: var(--signal); border-color: var(--signal); }
.btn.ghost-danger { color: var(--signal-hell); border-color: transparent; }
.btn.ghost-danger:hover { border-color: var(--signal-hell); }
.btn.small { min-height: 34px; padding: 4px 11px; font-size: .875rem; }
.btn.big { min-height: 52px; font-size: 1.0625rem; width: 100%; }
.btn.inverse { background: var(--schwarz); color: var(--papier); border-color: var(--schwarz); }
.btn.inverse:hover { background: var(--papier); color: var(--schwarz); border-color: var(--papier); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; background: none; border: 0; color: var(--asche); border-radius: var(--radius-s); flex: none; }
.icon-btn:hover { color: var(--signal); background: var(--ruß); }
.icon-btn.small { width: 30px; height: 30px; }
.icon { flex: none; }

input, select, textarea {
  width: 100%; min-height: 42px; padding: 8px 12px;
  background: var(--kohle); border: 1.5px solid var(--linie); border-radius: var(--radius-s);
  transition: border-color .12s;
}
input:hover, select:hover, textarea:hover { border-color: #5a4a3e; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--signal); }
input::placeholder, textarea::placeholder { color: #8d7f73; }
input[type='checkbox'] { width: 20px; height: 20px; min-height: 0; accent-color: var(--signal); }
input[type='range'] { padding: 0; border: 0; background: none; accent-color: var(--signal); min-height: 28px; }
input[type='search']::-webkit-search-cancel-button { filter: invert(1); }
textarea { resize: vertical; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: .875rem; font-weight: 600; }
.hint { font-size: .8125rem; color: var(--asche); }
.check-row { display: flex; align-items: center; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.form-error { color: var(--schwarz); background: var(--signal); padding: 8px 12px; border-radius: var(--radius-s); font-weight: 600; }
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border: 1.5px solid var(--signal); border-radius: 99px; font-size: .8125rem; font-weight: 600; color: var(--signal-hell); }
.chip.live { background: var(--signal); color: var(--schwarz); }
.notice { border-left: 4px solid var(--signal); background: var(--kohle); padding: 12px 16px; margin-bottom: var(--gap); }
.empty { padding: 48px 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty.full { min-height: 100dvh; justify-content: center; }
.count { margin-left: 8px; color: var(--asche); font-weight: 500; font-stretch: 100%; }
.state { color: var(--signal); flex: none; }
.state-strich { color: var(--papier); }
.state-punkt { color: var(--asche); }
.gauge { flex: none; }
.gauge-track { stroke: var(--ruß); }
.gauge-value { stroke: var(--signal); }

.tabs { display: flex; gap: 2px; border-bottom: 1.5px solid var(--linie); margin-bottom: var(--gap); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1.5px; color: var(--asche); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--papier); }
.tab[aria-selected='true'] { color: var(--papier); border-bottom-color: var(--signal); }
.tabs.small .tab { padding: 6px 12px; font-size: .875rem; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .tabs { margin-bottom: 0; flex: 1; min-width: 200px; }
.toolbar select, .toolbar input { width: auto; flex: 1 1 180px; max-width: 320px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.section-head:first-child { margin-top: 0; }
.page-head { margin-bottom: var(--gap); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--asche); text-decoration: none; margin-bottom: 12px; }
.back:hover { color: var(--signal); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .8125rem; font-weight: 600; color: var(--asche); padding: 6px 12px 8px 0; border-bottom: 1.5px solid var(--linie); white-space: nowrap; }
.table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--ruß); vertical-align: middle; }
.table .num { text-align: right; white-space: nowrap; }
.table .end { text-align: right; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--kohle); }
.table tr.off td { color: var(--asche); }
.table tr.hot td { background: #2a1305; }
.mem-cell { min-width: 130px; }
.bar-track { display: block; height: 6px; background: var(--ruß); border-radius: 2px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--signal); border-radius: 2px; }
.bars { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.bar-row { display: grid; grid-template-columns: minmax(100px, 220px) 1fr auto; gap: 14px; align-items: center; }
.bar-value { font-size: .875rem; color: var(--asche); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2px; margin-bottom: var(--gap); background: var(--linie); border: 1.5px solid var(--linie); }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--schwarz); min-width: 0; }
.stat strong { font-size: 1.625rem; font-weight: 800; font-stretch: 112%; letter-spacing: -.01em; line-height: 1.1; }
.stat span { font-size: .875rem; }
.stat input { min-height: 34px; padding: 4px 8px; }

.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px 32px; }
.chart-grid.one { grid-template-columns: 1fr; margin-bottom: var(--gap); }
.chart { margin: 0; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.chart-title { font-weight: 600; }
.chart-value { font-weight: 700; }
.chart-at { color: var(--asche); font-size: .8125rem; }
.chart-plot { display: block; width: 100%; height: 96px; touch-action: pan-y; }
.chart-empty { padding: 24px 0; border-bottom: 1px solid var(--linie); }
.inline-form { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; max-width: 760px; }
.inline-form input, .inline-form select { flex: 1 1 150px; width: auto; }
.code-block { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; background: var(--kohle); border: 1.5px solid var(--linie); padding: 12px; margin-top: 16px; border-radius: var(--radius-s); }
.code-block pre { margin: 0; overflow-x: auto; min-width: 0; }
.simple-list li { padding: 8px 0; border-bottom: 1px solid var(--ruß); }
.simple-list.dense li { padding: 5px 0; }
.simple-list.spaced { margin-top: 14px; }
.simple-list a { text-underline-offset: 3px; }
.prose { max-width: 72ch; line-height: 1.6; }
.prose > * + * { margin-top: .8em; }
.prose h2, .prose h3, .prose h4, .prose h5 { font-weight: 700; margin-top: 1.3em; }
.prose h2 { font-size: 1.375rem; font-stretch: 110%; }
.prose ul, .prose ol { padding-left: 1.3em; list-style: revert; }
.prose ul { list-style: square; }
.prose li::marker { color: var(--signal); }
.prose a { color: var(--signal-hell); text-underline-offset: 3px; }
.prose code { background: var(--ruß); padding: 1px 5px; border-radius: 3px; }
.prose pre { background: var(--kohle); padding: 12px; overflow-x: auto; border-radius: var(--radius-s); }
.prose pre code { background: none; padding: 0; }

/* Rahmen */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) auto; min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; border-right: 1.5px solid var(--linie); padding: 12px 0; overflow-y: auto; scrollbar-width: none; }
.rail-logo { display: grid; place-items: center; height: 56px; margin-bottom: 10px; color: var(--signal); flex: none; }
.logo { display: block; }
.rail-apps { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rail-foot { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; }
.nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; margin: 0 6px; background: none; border: 0; border-radius: var(--radius-s);
  color: var(--asche); text-decoration: none; font-size: .6875rem; font-weight: 600; letter-spacing: -.005em; line-height: 1.15;
  flex: none;
}
.nav-item:hover { color: var(--papier); background: var(--kohle); }
.nav-item[aria-current='page'] { color: var(--schwarz); background: var(--signal); font-weight: 700; }
.badge { position: absolute; top: 3px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--papier); color: var(--schwarz); border-radius: 9px; font-size: .6875rem; font-weight: 800; display: grid; place-items: center; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; padding: 32px clamp(16px, 3.4vw, 48px) 64px; outline: 0; min-width: 0; }
.view { max-width: 1400px; margin: 0 auto; }
.timer-bar { display: flex; align-items: center; gap: 16px; padding: 8px clamp(16px, 3.4vw, 48px); background: var(--signal); color: var(--schwarz); font-weight: 600; position: sticky; top: 0; z-index: 10; }
.timer-bar .muted { color: #3a1500; }
.timer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-clock { font-weight: 800; font-stretch: 112%; }
.tabbar { display: none; }

/* Anmeldung: der große Ring ist das eine laute Element */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); align-items: center; overflow: hidden; }
.auth-ring { color: var(--signal); display: grid; place-items: center; }
.auth-ring .logo { width: min(74vh, 58vw); height: auto; animation: ring-in 1s var(--ease) both; }
.auth-panel { padding: 32px clamp(20px, 5vw, 56px); display: flex; flex-direction: column; gap: 28px; }
.wordmark { font-size: clamp(3.5rem, 7vw, 5.5rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.045em; line-height: .9; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-lead { color: var(--asche); }
@keyframes ring-in { from { transform: rotate(-120deg) scale(.86); opacity: 0; } to { transform: none; opacity: 1; } }

/* Heute */
.today-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.today-title { font-size: clamp(2.25rem, 5.2vw, 4.25rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.035em; line-height: .98; }
.quick { display: flex; gap: 10px; }
.quick input { flex: 1; min-width: 0; min-height: 50px; font-size: 1.0625rem; background: var(--schwarz); border-width: 2px; }
.quick .btn { min-height: 50px; }
.quick.compact input, .quick.compact .btn { min-height: 42px; font-size: 1rem; }
.quick.compact { margin-bottom: 12px; }
.view[data-view='aufgaben'] .quick { margin-bottom: 20px; }
.quick-preview { display: flex; gap: 8px; flex-wrap: wrap; min-height: 26px; align-items: center; font-size: .875rem; }
.today-grid { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1.2fr) minmax(260px, .9fr); gap: 40px; align-items: start; }
.today-ring { display: flex; flex-direction: column; gap: 22px; }
.ring-slot { position: relative; width: 100%; max-width: 400px; aspect-ratio: 1; }
.day-ring { display: block; width: 100%; height: 100%; }
.ring-track { stroke: var(--kohle); }
.ring-past { stroke: var(--signal); }
.ring-plan { stroke: var(--papier); }
.ring-plan:hover { stroke: var(--signal-hell); }
.ring-now { fill: var(--schwarz); stroke: var(--papier); stroke-width: 4; }
.ring-tick { stroke: var(--linie); stroke-width: 1.5; }
.ring-tick.major { stroke: var(--asche); stroke-width: 2.5; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.ring-clock { font-size: clamp(2.75rem, 5.4vw, 4.25rem); font-weight: 900; font-stretch: 118%; letter-spacing: -.03em; line-height: 1; }
.ring-sub { color: var(--asche); font-size: .875rem; margin-top: 4px; }
.next { display: flex; flex-direction: column; gap: 8px; }
.next-label { color: var(--signal-hell); font-weight: 700; font-size: .9375rem; }
.next-title { font-size: 1.5rem; font-weight: 800; font-stretch: 108%; line-height: 1.15; letter-spacing: -.01em; text-decoration: none; }
a.next-title:hover { color: var(--signal-hell); }
.next-meta { color: var(--asche); font-size: .9375rem; margin-bottom: 6px; }
.next .row { flex-wrap: wrap; }
.capacity { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; font-size: .9375rem; }
.plan-list { border-top: 1.5px solid var(--linie); margin-bottom: 12px; }
.plan-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ruß); }
.plan-link { flex: 1; min-width: 0; text-decoration: none; }
.plan-link:hover .plan-title { color: var(--signal-hell); }
.plan-title { display: block; font-weight: 600; line-height: 1.3; }
.plan-meta { display: block; font-size: .8125rem; color: var(--asche); }
.plan-time { font-size: .875rem; color: var(--asche); white-space: nowrap; }
.check { width: 24px; height: 24px; flex: none; display: grid; place-items: center; background: none; border: 2px solid #6d5b4e; border-radius: 50%; color: transparent; padding: 0; transition: border-color .12s, color .12s, background-color .12s; }
.check:hover { border-color: var(--signal); color: var(--signal); }
.check.done { background: var(--signal); border-color: var(--signal); color: var(--schwarz); }
.attention { display: flex; flex-direction: column; gap: 2px; }
.attention-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; text-decoration: none; line-height: 1.35; }
.attention-item:hover { color: var(--signal-hell); }
.attention-item .state { margin-top: 3px; }
.attention-item.hot { font-weight: 700; }
.vitals { display: grid; gap: 12px; text-decoration: none; margin-bottom: 10px; }
.vital { display: flex; align-items: center; gap: 12px; }
.vital-text { display: flex; flex-direction: column; line-height: 1.25; }
.vital-text .muted { font-size: .8125rem; }
.vitals:hover .vital-text strong { color: var(--signal-hell); }

/* Aufgaben */
.task-group { margin-bottom: 28px; }
.task-group h2 { margin-bottom: 8px; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--ruß); }
.task-row.waiting .task-title { color: var(--asche); }
.task-main { flex: 1; min-width: 0; text-align: left; padding: 8px 0; background: none; border: 0; }
.task-main:hover .task-title { color: var(--signal-hell); }
.task-title { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.task-meta { display: block; font-size: .8125rem; color: var(--asche); }

/* Projekte */
.project-row { display: grid; grid-template-columns: 38px minmax(0, 2fr) 90px minmax(0, 1fr) minmax(0, 110px); gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ruß); text-decoration: none; }
.project-row:hover .project-name { color: var(--signal-hell); }
.project-row.hot { background: #2a1305; }
.project-name { font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.project-name .muted { font-weight: 400; font-size: .8125rem; }
.project-stage, .project-open { font-size: .875rem; color: var(--asche); }
.project-site { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.project-head { display: flex; align-items: center; gap: 18px; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); gap: 48px; align-items: start; }
.project-form { display: flex; flex-direction: column; gap: 14px; }
.project-form .section-head { margin: 0; }

/* Wissen */
.notes { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.note-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; max-height: calc(100dvh - 32px); }
.note-list { overflow-y: auto; }
.note-link { display: block; padding: 8px 10px; text-decoration: none; border-radius: var(--radius-s); }
.note-link:hover { background: var(--kohle); }
.note-link[aria-current='page'] { background: var(--ruß); border-left: 3px solid var(--signal); padding-left: 7px; }
.note-title { font-weight: 600; display: block; line-height: 1.3; overflow-wrap: anywhere; }
.note-empty { padding: 12px 10px; }
.note-editor { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.note-title-input { flex: 1 1 260px; width: auto; font-size: 1.5rem; font-weight: 800; font-stretch: 108%; border: 0; background: none; padding: 0; }
.note-panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.note-body { min-height: 60dvh; font-size: .9375rem; }

/* Betrieb */
.alert-list { display: flex; flex-direction: column; gap: 2px; }
.alert-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: var(--kohle); flex-wrap: wrap; }
.alert-item.hot { background: #2a1305; border-left: 4px solid var(--signal); }
.server-list { display: flex; flex-direction: column; }
.server-item { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--ruß); flex-wrap: wrap; }
.server-item code { background: var(--ruß); padding: 3px 8px; border-radius: 3px; overflow-wrap: anywhere; }
.log { background: var(--kohle); padding: 12px; max-height: 60dvh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0 0; }
.provider { border: 1.5px solid var(--linie); padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 14px; border-radius: var(--radius-s); }
.provider .row.tight { flex-wrap: wrap; }

/* Werkstatt */
.workshop { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.file-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.crumbs { display: flex; gap: 4px; flex-wrap: wrap; font-size: .875rem; align-items: center; }
.crumb { background: none; border: 0; padding: 2px 4px; color: var(--signal-hell); }
.file-row { display: flex; align-items: center; border-bottom: 1px solid var(--ruß); }
.file-row.active { background: var(--ruß); }
.file-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 6px; background: none; border: 0; text-align: left; }
.file-main:hover .file-name { color: var(--signal-hell); }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-main { min-width: 0; }
.work-main .tabs { margin-bottom: 12px; }
.editor { display: flex; flex-direction: column; gap: 8px; }
.editor-bar { padding-bottom: 2px; }
.editor-wrap { position: relative; height: 66dvh; border: 1.5px solid var(--linie); border-radius: var(--radius-s); background: var(--kohle); overflow: hidden; }
.editor-hl, .editor-area { position: absolute; inset: 0; margin: 0; padding: 14px; font: 14px/1.55 ui-monospace, 'Cascadia Code', Consolas, Menlo, monospace; white-space: pre; tab-size: 2; border: 0; overflow: auto; }
.editor-hl { pointer-events: none; color: var(--papier); }
.editor-hl code { font: inherit; }
.editor-area { width: 100%; height: 100%; background: transparent; color: transparent; caret-color: var(--signal); resize: none; }
.editor-area:focus { outline: 0; }
.editor-area::selection { background: rgba(255, 91, 0, .35); color: transparent; }
.tk-c { color: #8d7f73; font-style: italic; }
.tk-s { color: #ffc49e; }
.tk-n { color: #ffd9bf; }
.tk-k { color: var(--signal-hell); font-weight: 600; }
.preview, .terminal { display: flex; flex-direction: column; gap: 8px; }
.preview-frame { width: 100%; height: 70dvh; border: 1.5px solid var(--linie); background: #fff; border-radius: var(--radius-s); }
.terminal-frame { width: 100%; height: 70dvh; border: 1.5px solid var(--linie); background: var(--schwarz); border-radius: var(--radius-s); }

/* Einstellungen */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.card { border: 1.5px solid var(--linie); border-radius: var(--radius-s); padding: 20px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; min-width: 0; }
.card > .btn { align-self: flex-start; }
.card.span { grid-column: 1 / -1; }

/* Cy */
.cy-panel { position: sticky; top: 0; height: 100dvh; width: 400px; display: flex; flex-direction: column; border-left: 1.5px solid var(--linie); background: var(--schwarz); }
.cy-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1.5px solid var(--linie); }
.cy-head h2 { font-size: 1.375rem; font-weight: 900; font-stretch: 125%; color: var(--signal); margin-right: 4px; }
.cy-history { min-height: 34px; padding: 4px 8px; font-size: .875rem; flex: 1; min-width: 0; }
.cy-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.cy-welcome { display: flex; flex-direction: column; gap: 14px; color: var(--asche); }
.cy-starters { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cy-starters .btn { white-space: normal; text-align: left; color: var(--papier); height: auto; }
.cy-msg { max-width: 100%; overflow-wrap: anywhere; }
.cy-msg.user { align-self: flex-end; background: var(--signal); color: var(--schwarz); font-weight: 500; padding: 8px 12px; border-radius: var(--radius-m) var(--radius-m) 2px var(--radius-m); max-width: 88%; white-space: pre-wrap; }
.cy-msg.cy .prose { font-size: .9375rem; }
.cy-tool { color: var(--asche); font-size: .8125rem; border-left: 2px solid var(--signal); padding-left: 8px; }
.cy-foot { color: var(--asche); font-size: .75rem; }
.cy-error { background: #2a1305; border-left: 4px solid var(--signal); padding: 10px 12px; font-size: .9375rem; }
.cy-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1.5px solid var(--linie); align-items: flex-end; }
.cy-input { flex: 1; min-width: 0; resize: none; max-height: 160px; }

/* Dialoge, Palette, Hinweise */
dialog { color: inherit; }
.dialog { background: var(--kohle); border: 1.5px solid var(--linie); border-radius: var(--radius-m); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); }
.dialog.wide { width: min(980px, calc(100vw - 24px)); }
.dialog::backdrop, .palette::backdrop { background: rgba(0, 0, 0, .78); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--linie); position: sticky; top: 0; background: var(--kohle); z-index: 1; }
.dialog-head h2 { overflow-wrap: anywhere; }
.dialog-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.dialog-body input, .dialog-body select, .dialog-body textarea { background: var(--schwarz); }
.dialog .row.end { margin-top: 4px; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.more-item { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--schwarz); border: 1.5px solid var(--linie); border-radius: var(--radius-s); text-decoration: none; font-weight: 600; text-align: left; }
.palette { background: none; border: 0; padding: 0; margin: 12vh auto 0; width: min(680px, calc(100vw - 24px)); max-height: 76dvh; }
.palette-box { background: var(--kohle); border: 2px solid var(--signal); border-radius: var(--radius-m); overflow: hidden; display: flex; flex-direction: column; max-height: 72dvh; }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--linie); color: var(--signal); }
.palette-input { border: 0; background: none; min-height: 56px; font-size: 1.125rem; color: var(--papier); padding: 0; }
.palette-list { overflow-y: auto; padding: 6px; }
.palette-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 9px 10px; border-radius: var(--radius-s); cursor: pointer; align-items: baseline; }
.palette-list li.active { background: var(--signal); color: var(--schwarz); }
.palette-list li.active .palette-type, .palette-list li.active .palette-snippet { color: #3a1500; }
.palette-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-type { font-size: .8125rem; color: var(--asche); white-space: nowrap; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
.palette-snippet { grid-column: 1 / -1; grid-row: 2; font-size: .8125rem; color: var(--asche); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list .palette-empty { display: block; color: var(--asche); cursor: default; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: var(--papier); color: var(--schwarz); font-weight: 600; padding: 10px 16px; border-radius: var(--radius-s); animation: toast-in .18s var(--ease); max-width: 100%; }
.toast.fehler { background: var(--signal); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* Mittlere Breiten */
@media (max-width: 1240px) {
  .today-grid { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
  .today-grid .side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 40px; }
  .today-grid .side .section-head { margin-top: 16px; }
  body.cy-open .today-grid { grid-template-columns: minmax(0, 1fr); }
  body.cy-open .ring-slot { max-width: 340px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1040px) {
  .notes, .workshop { grid-template-columns: minmax(0, 1fr); }
  .note-side { position: static; max-height: none; }
  .note-list { max-height: 240px; }
  .note-panes { grid-template-columns: minmax(0, 1fr); }
  .note-body { min-height: 40dvh; }
  .cy-panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 30; width: min(420px, 100vw); box-shadow: -18px 0 0 rgba(0, 0, 0, .5); }
}

/* Handy: Leiste unten, alles bleibt erreichbar */
@media (max-width: 760px) {
  :root { --gap: 20px; }
  .shell { display: block; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .rail { display: none; }
  .content { padding: 20px 16px 40px; }
  .timer-bar { padding: 8px 16px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--schwarz); border-top: 1.5px solid var(--linie); padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar .nav-item { margin: 0 2px; padding: 8px 0 6px; font-size: .75rem; min-height: 54px; justify-content: center; }
  .today-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .today-grid .side { display: block; }
  .today-title { font-size: 2.25rem; }
  .ring-slot { max-width: min(340px, 100%); margin: 0 auto; }
  .quick { flex-wrap: wrap; }
  .quick input { flex-basis: 100%; }
  .quick .btn { width: 100%; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 38px; }
  .check { width: 28px; height: 28px; }
  .icon-btn { width: 44px; height: 44px; }
  .project-row { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 4px 12px; }
  .project-stage { grid-column: 2; grid-row: 2; }
  .project-open { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
  .project-site { display: none; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat strong { font-size: 1.3125rem; overflow-wrap: anywhere; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .cy-panel { width: 100vw; z-index: 40; box-shadow: none; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .auth-ring { padding-top: 28px; }
  .auth-ring .logo { width: min(46vw, 28vh); }
  .auth-panel { gap: 20px; padding-top: 16px; }
  .wordmark { font-size: 3.5rem; }
  .palette { margin-top: 6vh; }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
  /* Breite Tabellen werden auf dem Handy zu Karten, statt seitlich zu scrollen */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 0; border-bottom: 1px solid var(--linie); }
  .table td { border: 0; padding: 3px 0; text-align: left !important; }
  .table td:empty { display: none; }
  .table .end .row { justify-content: flex-start; margin-top: 6px; }
  .table-wrap { overflow: visible; }
}

/* Baskets: die Oberfläche. Die Tools sind als Flechtwerk gelegt, jedes Feld startet direkt ein Tool. */
.view[data-view='baskets'] { max-width: none; }
.deck { display: flex; flex-direction: column; gap: 20px; }
.deck-head { display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(220px, auto); gap: 28px; align-items: center; }
.deck-brand { display: flex; align-items: center; gap: 14px; color: var(--signal); }
.deck-word { font-size: clamp(3rem, 6.4vw, 6rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.05em; line-height: .9; color: var(--papier); }
.deck-search { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; background: none; border: 2px solid var(--linie); border-radius: var(--radius-s); color: var(--asche); text-align: left; transition: border-color .12s, color .12s; min-width: 0; }
.deck-search:hover { border-color: var(--signal); color: var(--papier); }
.deck-search span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-search .icon { color: var(--signal); }
kbd { font: inherit; font-size: .75rem; border: 1px solid var(--linie); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.deck-now { display: flex; align-items: center; gap: 16px; text-decoration: none; min-width: 0; max-width: 460px; }
.deck-now:hover .deck-next { color: var(--signal-hell); }
.deck-clock { font-size: 2.25rem; font-weight: 900; font-stretch: 118%; letter-spacing: -.03em; line-height: 1; }
.deck-next { font-size: .9375rem; line-height: 1.3; font-weight: 600; min-width: 0; }
.deck-next .muted { font-weight: 400; }
.deck-alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--signal); color: var(--schwarz); font-weight: 700; text-decoration: none; }
.deck-alert svg circle { stroke: var(--schwarz) !important; }
.deck-alert svg circle[r='2.5'] { fill: var(--schwarz) !important; stroke: none !important; }
.deck-recent { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.recent { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1.5px solid var(--linie); border-radius: 99px; text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .875rem; }
.recent:hover { border-color: var(--signal); }

.basket-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; background: var(--linie); border: 2px solid var(--linie); }
.basket { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--schwarz); min-width: 0; grid-column: span 4; min-height: 300px; }
.basket-grid > .basket:nth-child(1) { grid-column: span 5; background: var(--signal); color: var(--schwarz); }
.basket-grid > .basket:nth-child(2) { grid-column: span 4; }
.basket-grid > .basket:nth-child(3) { grid-column: span 3; }
.basket-grid > .basket:nth-child(4) { grid-column: span 3; }
.basket-grid > .basket:nth-child(5) { grid-column: span 4; }
.basket-grid > .basket:nth-child(6) { grid-column: span 5; }
.basket-grid > .basket:nth-child(7) { grid-column: span 7; }
.basket-grid > .basket:nth-child(8) { grid-column: span 5; }
.basket.trouble { box-shadow: inset 0 0 0 3px var(--signal); }
.basket-open { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.basket-name { font-size: clamp(2rem, 3.5vw, 3.5rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.04em; line-height: .95; overflow-wrap: anywhere; width: fit-content; }
.basket-open:hover .basket-name { color: var(--signal); }
.basket-grid > .basket:nth-child(1) .basket-open:hover .basket-name { color: var(--papier); }
.basket-tag { color: var(--asche); font-weight: 500; }
.basket-grid > .basket:nth-child(1) .basket-tag, .basket-grid > .basket:nth-child(1) .basket-foot { color: #3a1500; }
.weave { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 3px; margin-top: auto; }
.weave-cell {
  display: grid; place-items: center; aspect-ratio: 1; text-decoration: none;
  font-size: .8125rem; font-weight: 800; font-stretch: 115%; letter-spacing: -.02em;
  background: var(--ruß); color: var(--papier); border-radius: 2px;
  transition: transform .14s var(--ease), background-color .1s, color .1s;
}
.weave-cell.on { background: var(--signal); color: var(--schwarz); }
.weave-cell:hover, .weave-cell:focus-visible { background: var(--papier); color: var(--schwarz); transform: translateY(-3px) scale(1.08); position: relative; z-index: 2; }
.basket-grid > .basket:nth-child(1) .weave-cell { background: var(--schwarz); color: var(--papier); }
.basket-grid > .basket:nth-child(1) .weave-cell.on { background: #c64600; color: var(--schwarz); }
.basket-grid > .basket:nth-child(1) .weave-cell:hover, .basket-grid > .basket:nth-child(1) .weave-cell:focus-visible { background: var(--papier); color: var(--schwarz); }
.basket-grid > .basket:nth-child(1) :focus-visible { outline-color: var(--schwarz); }
.basket-foot { font-size: .8125rem; color: var(--asche); }
.basket-new { align-items: center; justify-content: center; border: 0; color: var(--asche); font-weight: 700; font-size: 1.0625rem; text-align: center; }
.basket-new:hover { color: var(--signal); background: var(--kohle); }
.deck-status { max-width: 72ch; }

.basket-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.basket-title { font-size: clamp(3rem, 9vw, 8.5rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.05em; line-height: .88; width: fit-content; color: var(--signal); overflow-wrap: anywhere; }
.basket-tagline { font-size: 1.25rem; color: var(--asche); margin-bottom: 8px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0; padding: 1px; }
.tool { position: relative; background: var(--schwarz); display: flex; align-items: stretch; min-width: 0; outline: 1px solid var(--linie); margin: 1px; }
.tool:hover { background: var(--kohle); }
.tool.hot { background: #2a1305; }
.tool-link { flex: 1; min-width: 0; display: flex; gap: 14px; padding: 16px 44px 16px 16px; text-decoration: none; align-items: flex-start; }
.tool-link:hover .tool-name { color: var(--signal-hell); }
.glyph { display: grid; place-items: center; width: 46px; height: 46px; flex: none; background: var(--ruß); color: var(--papier); font-size: .875rem; font-weight: 800; font-stretch: 115%; border-radius: 2px; transition: background-color .1s, color .1s; }
.glyph.on { background: var(--signal); color: var(--schwarz); }
.glyph.tiny { width: 26px; height: 26px; font-size: .625rem; border-radius: 99px; background: var(--signal); color: var(--schwarz); }
.tool-link:hover .glyph { background: var(--papier); color: var(--schwarz); }
.tool-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.tool-name { font-weight: 700; font-size: 1.0625rem; line-height: 1.2; overflow-wrap: anywhere; }
.tool-note { color: var(--asche); font-size: .875rem; line-height: 1.3; }
.tool-kind { color: var(--signal-hell); font-size: .75rem; font-weight: 600; margin-top: 2px; }
.tool-state { position: absolute; left: 50px; top: 50px; background: var(--schwarz); border-radius: 50%; line-height: 0; padding: 1px; }
.tool-edit { position: absolute; right: 6px; top: 6px; }
.basket-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; }
.basket-project { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ruß); text-decoration: none; line-height: 1.25; }
.basket-project:hover strong { color: var(--signal-hell); }
::view-transition-group(*) { animation-duration: .34s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

@media (max-width: 1240px) {
  .deck-head { grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr); }
  .deck-now { grid-column: 1 / -1; max-width: none; }
  .basket-grid > .basket:nth-child(n) { grid-column: span 6; }
}
@media (max-width: 760px) {
  .deck-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .deck-brand .logo { width: 40px; height: 40px; }
  .deck-word { font-size: 3.25rem; }
  .deck-search kbd { display: none; }
  .deck-clock { font-size: 1.75rem; }
  .basket-grid { grid-template-columns: minmax(0, 1fr); }
  .basket-grid > .basket:nth-child(n) { grid-column: auto; min-height: 0; }
  .basket-name { font-size: 2.5rem; }
  .weave { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .weave-cell { font-size: .75rem; }
  .basket-title { font-size: clamp(2.75rem, 15vw, 4.5rem); }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ========== Cycle als Betriebssystem ========== */
.boot { position: fixed; inset: 0; z-index: 900; background: #000; overflow: hidden; transition: opacity .48s ease; }
.boot.out { opacity: 0; }
.boot-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.boot-word { position: absolute; left: 0; right: 0; top: 70%; display: flex; justify-content: center; font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.05em; line-height: 1; }
.boot-word span { opacity: 0; transform: translateY(.3em); filter: blur(10px); transition: opacity .55s var(--ease), transform .55s var(--ease), filter .55s var(--ease); }
.boot-word.on span { opacity: 1; transform: none; filter: none; }
.boot-word.on span:nth-child(2) { transition-delay: .07s; } .boot-word.on span:nth-child(3) { transition-delay: .14s; } .boot-word.on span:nth-child(4) { transition-delay: .21s; } .boot-word.on span:nth-child(5) { transition-delay: .28s; }
.boot-log { position: absolute; left: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 36px); display: flex; flex-direction: column; gap: 3px; font-size: .8125rem; color: var(--asche); }
.boot-log li { display: flex; gap: 10px; animation: log-in .25s var(--ease); }
.boot-tick { color: var(--signal); font-weight: 700; min-width: 3.2em; }
.boot-value { color: var(--papier); font-weight: 600; }
@keyframes log-in { from { opacity: 0; transform: translateX(-8px); } }
.boot-skip { position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 36px); background: none; border: 0; color: var(--asche); font-size: .8125rem; padding: 8px; }
.boot-skip:hover { color: var(--papier); }
.down { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, .9); display: grid; place-items: center; animation: fade-in .4s ease; }
.down-ring { position: absolute; width: 60vmin; height: 60vmin; border-radius: 50%; border: 9vmin solid var(--signal); transition: transform .9s cubic-bezier(.7, 0, .9, .3), opacity .9s; }
.down.collapse .down-ring { transform: scale(.01); opacity: 0; }
.down.collapse { background: #000; }
.boot-log.center { position: relative; left: auto; bottom: auto; align-items: center; color: var(--papier); font-size: 1rem; font-weight: 600; text-shadow: 0 0 12px #000; }
@keyframes fade-in { from { opacity: 0; } }
.off { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; }
.power { width: 96px; height: 96px; display: grid; place-items: center; background: none; border: 3px solid var(--signal); border-radius: 50%; color: var(--signal); transition: background-color .15s, color .15s, box-shadow .2s; }
.power:hover { background: var(--signal); color: #000; box-shadow: 0 0 60px rgba(255, 91, 0, .6); }

.lock { position: fixed; inset: 0; z-index: 800; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 7vh 16px 9vh; overflow: hidden; animation: fade-in .5s ease; }
.lock-ring { position: absolute; right: -14vmin; bottom: -22vmin; color: var(--signal); animation: lock-ring-in 1.4s var(--ease) both; pointer-events: none; }
@keyframes lock-ring-in { from { transform: rotate(-120deg) scale(.86); opacity: 0; } to { transform: none; opacity: .2; } }
.lock-ring .logo { width: 120vmin; height: 120vmin; }
.lock.opening { animation: lock-open .85s cubic-bezier(.7, 0, .2, 1) forwards; pointer-events: none; }
@keyframes lock-open { from { clip-path: circle(150% at 50% 50%); } to { clip-path: circle(0% at 50% 50%); } }
.lock-clock { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.lock-time { font-size: clamp(5rem, 16vw, 13rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.055em; line-height: .9; }
.lock-date { font-size: clamp(1rem, 2vw, 1.5rem); font-weight: 600; color: var(--signal-hell); }
.lock-form { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(420px, 100%); }
.lock-avatar { width: 84px; height: 84px; display: grid; place-items: center; background: var(--signal); color: #000; border-radius: 50%; }
.lock-name { font-size: 1.5rem; font-weight: 800; font-stretch: 110%; }
.lock-lead { text-align: center; color: var(--asche); }
.lock-form .field { width: 100%; }
.lock-row { display: flex; width: 100%; gap: 6px; }
.lock-input { min-height: 52px; background: rgba(0, 0, 0, .7); border-width: 2px; font-size: 1.0625rem; }
.lock-go { width: 52px; flex: none; background: var(--signal); border: 0; border-radius: var(--radius-s); color: #000; display: grid; place-items: center; }
.lock-go:hover { background: var(--papier); }
.lock-go:disabled { opacity: .55; }

.os { position: fixed; inset: 0; display: grid; grid-template-rows: 38px minmax(0, 1fr); background: #000; overflow: hidden; }
.wallpaper { position: absolute; inset: 0; width: 100%; height: 100%; }
.bar { position: relative; z-index: 400; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 6px; background: rgba(0, 0, 0, .82); border-bottom: 1px solid var(--linie); backdrop-filter: blur(14px); font-size: .875rem; }
.bar-logo { display: grid; place-items: center; width: 34px; height: 30px; background: none; border: 0; color: var(--signal); border-radius: var(--radius-s); }
.bar-logo:hover { background: var(--ruß); }
.bar-app { font-weight: 700; }
.bar .timer-bar { position: static; padding: 2px 4px 2px 10px; border-radius: 99px; gap: 8px; font-size: .8125rem; max-width: 40vw; }
.bar .timer-bar .btn { min-height: 24px; padding: 0 8px; font-size: .75rem; border-radius: 99px; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.bar-icon { position: relative; display: grid; place-items: center; width: 34px; height: 30px; background: none; border: 0; color: var(--papier); border-radius: var(--radius-s); }
.bar-icon:hover, .bar-vitals:hover, .bar-clock:hover { background: var(--ruß); }
.bar-icon .badge { top: -2px; right: 0; min-width: 16px; height: 16px; background: var(--signal); color: #000; }
.bar-vitals { display: flex; align-items: center; gap: 12px; height: 30px; padding: 0 10px; background: none; border: 0; font-size: .8125rem; font-weight: 600; border-radius: var(--radius-s); }
.vital-mini { display: inline-flex; align-items: center; gap: 5px; }
.bar-clock { display: flex; align-items: baseline; gap: 8px; height: 30px; padding: 0 10px; background: none; border: 0; font-size: .8125rem; border-radius: var(--radius-s); white-space: nowrap; }
.sys-menu { position: absolute; z-index: 500; top: 40px; left: 6px; width: 240px; padding: 6px; background: var(--kohle); border: 1.5px solid var(--linie); border-radius: var(--radius-m); display: flex; flex-direction: column; }
.sys-menu hr { border: 0; border-top: 1px solid var(--linie); margin: 6px 0; width: 100%; }
.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: none; border: 0; border-radius: var(--radius-s); text-align: left; font-weight: 600; }
.menu-item:hover { background: var(--signal); color: #000; }
.menu-item:hover kbd { border-color: #000; }
.center { position: absolute; z-index: 500; top: 40px; right: 6px; bottom: 90px; width: min(380px, 90vw); padding: 16px; background: rgba(21, 17, 14, .96); border: 1.5px solid var(--linie); border-radius: var(--radius-m); overflow-y: auto; animation: slide-in .22s var(--ease); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.center-list { display: flex; flex-direction: column; gap: 4px; }
.center-item { display: flex; gap: 10px; padding: 10px; background: #000; border-radius: var(--radius-s); }
.center-item.hot { border-left: 3px solid var(--signal); }
.link.plain { background: none; border: 0; padding: 0; text-decoration: underline; }
.stage { position: relative; min-height: 0; }
.desk { position: absolute; inset: 0; overflow-y: auto; padding: 22px clamp(16px, 3vw, 40px) 104px; outline: 0; scrollbar-width: thin; scrollbar-color: var(--linie) transparent; }
.desk .view { max-width: 1680px; }
.desk .deck-now { background: rgba(0, 0, 0, .55); padding: 8px 12px; border-radius: var(--radius-s); }
.desk .basket { background: rgba(0, 0, 0, .74); backdrop-filter: blur(6px); }
.desk .basket-grid > .basket:nth-child(1) { background: var(--signal); }
.desk .basket-grid { background: rgba(58, 47, 39, .7); }
.win-layer { position: absolute; inset: 0 0 84px 0; pointer-events: none; }
.win-layer > * { pointer-events: auto; }
.win { position: absolute; display: flex; flex-direction: column; background: #070504; border: 1.5px solid var(--linie); border-radius: var(--radius-m); box-shadow: 0 24px 70px rgba(0, 0, 0, .75); min-width: 0; }
.win.focused { border-color: #7a3a14; box-shadow: 0 30px 90px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 91, 0, .35); }
.win.minimized { display: none; }
.win.snapped { border-radius: 0; }
.win.glide { transition: left .22s var(--ease), top .22s var(--ease), width .22s var(--ease), height .22s var(--ease); }
.win.dragging { opacity: .93; user-select: none; }
.win-bar { flex: none; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 4px 0 12px; border-bottom: 1px solid var(--linie); cursor: grab; touch-action: none; user-select: none; background: var(--kohle); border-radius: var(--radius-m) var(--radius-m) 0 0; }
.win.snapped .win-bar { border-radius: 0; }
.win.dragging .win-bar { cursor: grabbing; }
.win-glyph { color: var(--asche); display: grid; }
.win.focused .win-glyph { color: var(--signal); }
.win-title { flex: 1; min-width: 0; font-size: .875rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-buttons { display: flex; }
.win-btn { width: 36px; height: 30px; display: grid; place-items: center; background: none; border: 0; border-radius: var(--radius-s); color: var(--papier); }
.win-btn:hover { background: var(--ruß); }
.win-btn.close:hover { background: var(--signal); color: #000; }
.bar-min { width: 11px; height: 2px; background: currentColor; }
.bar-max { width: 11px; height: 11px; border: 2px solid currentColor; }
.win-body { flex: 1; min-height: 0; overflow: auto; padding: 22px clamp(14px, 2.4vw, 30px) 30px; container-type: inline-size; scrollbar-width: thin; scrollbar-color: var(--linie) transparent; border-radius: 0 0 var(--radius-m) var(--radius-m); }
.win-grip { position: absolute; z-index: 3; touch-action: none; }
.win-grip.e, .win-grip.w { top: 8px; bottom: 8px; width: 7px; cursor: ew-resize; } .win-grip.e { right: -3px; } .win-grip.w { left: -3px; }
.win-grip.s, .win-grip.n { left: 8px; right: 8px; height: 7px; cursor: ns-resize; } .win-grip.s { bottom: -3px; } .win-grip.n { top: -3px; }
.win-grip.se, .win-grip.sw, .win-grip.ne, .win-grip.nw { width: 14px; height: 14px; }
.win-grip.se { right: -4px; bottom: -4px; cursor: nwse-resize; } .win-grip.nw { left: -4px; top: -4px; cursor: nwse-resize; }
.win-grip.sw { left: -4px; bottom: -4px; cursor: nesw-resize; } .win-grip.ne { right: -4px; top: -4px; cursor: nesw-resize; }
.win.snapped .win-grip { display: none; }
.snap-preview { position: absolute; top: 0; bottom: 0; background: rgba(255, 91, 0, .16); border: 2px solid var(--signal); }
.exposing .win { cursor: pointer; }
.exposing .win * { pointer-events: none; }
.exposing .win:hover { border-color: var(--signal); box-shadow: 0 0 0 4px var(--signal); }
.dock { position: absolute; z-index: 390; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 4px; padding: 7px 10px; background: rgba(12, 9, 7, .84); border: 1.5px solid var(--linie); border-radius: 18px; backdrop-filter: blur(16px); }
.dock-apps { display: flex; align-items: flex-end; gap: 4px; }
.dock-item { position: relative; width: 50px; height: 50px; display: grid; place-items: center; flex: none; background: var(--ruß); border: 0; border-radius: 12px; color: var(--papier); transform-origin: 50% 100%; transition: transform .1s linear, background-color .12s, color .12s; }
.dock-item:hover { background: var(--signal); color: #000; }
.dock-item.home { background: var(--signal); color: #000; }
.dock-item.home:hover { background: var(--papier); }
.dock-item.running::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 5px; height: 5px; margin-left: -2.5px; background: var(--signal); border-radius: 50%; }
.dock-item.active { outline: 2px solid var(--signal); outline-offset: 1px; }
.dock-item .badge { top: -5px; right: -5px; background: var(--signal); color: #000; }
.orb { position: relative; width: 50px; height: 50px; flex: none; display: grid; place-items: center; background: #000; border: 0; border-radius: 50%; transform-origin: 50% 100%; transition: transform .1s linear; }
.orb-ring { position: absolute; inset: 3px; border-radius: 50%; background: conic-gradient(from 0deg, var(--signal), #7a2c00, var(--papier), var(--signal)); animation: orb-spin 5s linear infinite; mask: radial-gradient(circle, transparent 58%, #000 60%); }
.orb-dot { width: 13px; height: 13px; background: var(--signal); border-radius: 50%; box-shadow: 0 0 18px var(--signal); animation: orb-breathe 3.2s ease-in-out infinite; }
button.orb:hover .orb-dot { background: var(--papier); }
@keyframes orb-spin { to { transform: rotate(360deg); } }
@keyframes orb-breathe { 50% { transform: scale(.7); box-shadow: 0 0 8px var(--signal); } }
.cybar { background: none; border: 0; padding: 0; margin: 16vh auto 0; width: min(760px, calc(100vw - 32px)); max-height: 72dvh; overflow: visible; }
.cybar::backdrop { background: rgba(0, 0, 0, .66); backdrop-filter: blur(5px); }
.cybar-box { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #0b0806; border: 2px solid var(--signal); border-radius: 16px; box-shadow: 0 0 80px rgba(255, 91, 0, .32); }
.cybar-input { border: 0; background: none; font-size: 1.375rem; font-weight: 600; min-height: 50px; padding: 0 4px; }
.cybar-hint { margin: 10px 14px 0; font-size: .875rem; color: var(--asche); text-shadow: 0 0 10px #000; }
.cybar-answer { margin-top: 10px; padding: 16px 18px; background: #0b0806; border: 1.5px solid var(--linie); border-radius: 16px; max-height: 48dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.brief { position: absolute; z-index: 395; right: 14px; top: 50px; display: flex; gap: 14px; width: min(430px, 90vw); padding: 14px 16px; background: rgba(12, 9, 7, .92); border: 1.5px solid var(--signal); border-radius: 16px; backdrop-filter: blur(14px); animation: slide-in .5s var(--ease); transition: opacity .5s, transform .5s; }
.brief.out { opacity: 0; transform: translateX(30px); }
.brief strong { font-size: 1.125rem; font-stretch: 108%; }
.brief p { color: var(--asche); font-size: .9375rem; margin-top: 2px; }
.about { display: flex; flex-direction: column; gap: 14px; }
.about-mark { display: flex; align-items: center; gap: 14px; color: var(--signal); }
.about-word { font-size: 3rem; font-weight: 900; font-stretch: 125%; letter-spacing: -.05em; color: var(--papier); }
.about-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 0; }
.about-list dt { color: var(--asche); }
.about-list dd { margin: 0; font-weight: 600; }
.cy-window { display: flex; flex-direction: column; height: 100%; margin: -22px -30px -30px; max-width: none; }
.cy-window .cy-head h2 { display: none; }

/* In Fenstern zählt die Fensterbreite, nicht die Bildschirmbreite. */
@container (max-width: 1100px) {
  .today-grid { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
  .today-grid .side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 40px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .basket-grid > .basket:nth-child(n) { grid-column: span 6; }
  .deck-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@container (max-width: 900px) {
  .notes, .workshop { grid-template-columns: minmax(0, 1fr); }
  .note-side { position: static; max-height: none; }
  .note-list { max-height: 220px; }
  .note-panes { grid-template-columns: minmax(0, 1fr); }
  .note-body { min-height: 40vh; }
}
@container (max-width: 680px) {
  .today-grid { grid-template-columns: minmax(0, 1fr); }
  .today-grid .side { display: block; }
  .project-row { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 4px 12px; }
  .project-stage { grid-column: 2; grid-row: 2; }
  .project-open { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
  .project-site { display: none; }
  .basket-grid { grid-template-columns: minmax(0, 1fr); }
  .basket-grid > .basket:nth-child(n) { grid-column: auto; min-height: 0; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { flex-wrap: wrap; }
  .quick input, .quick .btn { flex-basis: 100%; width: 100%; }
}
@media (max-height: 760px) and (min-width: 1000px) {
  .lock { padding-top: 3vh; padding-bottom: 4vh; }
  .lock-time { font-size: clamp(4rem, 13vw, 8rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media (forced-colors: active) {
  .ring-past, .gauge-value { stroke: Highlight; }
  .btn.primary, .nav-item[aria-current='page'] { forced-color-adjust: none; }
}

/* Große Überschriften richten sich im Fenster nach dem Fenster. */
.win-body .today-title { font-size: clamp(1.75rem, 6cqi, 3.5rem); }
.win-body h1 { font-size: clamp(1.75rem, 4.6cqi, 2.75rem); }
.win-body .basket-title { font-size: clamp(2.75rem, 11cqi, 7rem); }
.win-body .ring-clock { font-size: clamp(2.25rem, 5cqi, 3.75rem); }
