/* VANTAGE — dunkel, warm, ein Akzent.
   Alle Werte stammen aus dem Stilblatt (Claude Design, Artboard 08). */

:root {
  --ground: #151310;
  --ink-hi: #f4efe6;
  --ink-1: #ece7dd;   /* Schrift 1 */
  --ink-warm: #c9beb2;
  --ink-time: #b7ada0;
  --ink-2: #a49c8e;   /* Schrift 2 */
  --ink-soft: #8d8578;
  --ink-3: #6f685d;   /* Schrift 3 */
  --ink-4: #57514a;   /* Marken */
  --ink-5: #453f39;
  --warn: #d98b84;
  --accent: oklch(0.90 0.17 115);
  --accent-ink: #14140c;
  --tile: linear-gradient(180deg, #252118 0%, #1e1b17 58%, #1b1814 100%);
  --tile-shadow: inset 0 1px 0 rgba(255,246,230,0.07), inset 0 0 0 1px rgba(255,242,222,0.05), 0 30px 60px -34px rgba(0,0,0,0.9);
  --line: rgba(255,242,222,0.05);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Archivo, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --pad: 44px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-1);
  font: 400 14px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 90% at 50% -14%, #221f19 0%, #1a1815 52%, #151310 100%) fixed;
}
body[data-view="heute"] .app,
body[data-view="stundenplan"] .app { height: 100dvh; }

/* ------------------------------------------------------------ Kopfzeile */

.top { display: flex; align-items: baseline; gap: 34px; padding: 32px var(--pad) 0; flex: none; }
.top .date { display: flex; align-items: baseline; gap: 12px; flex: none; }
.top .wd { font: 400 12px/1 var(--mono); letter-spacing: .16em; }
.top .dt { font: 400 12px/1 var(--mono); letter-spacing: .08em; color: var(--ink-3); }
.top .dtnav { display: flex; gap: 10px; margin-left: 6px; }
.top .dtnav button { font: 400 12px/1 var(--mono); color: var(--ink-4); transition: color .2s; }
.top .dtnav button:hover { color: var(--ink-1); }
.top .quote {
  flex: 1; min-width: 0; font-size: 14px; color: var(--ink-2); letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .24s;
}
.nav { display: flex; gap: 22px; align-items: baseline; flex: none; }
.nav a {
  font: 400 11px/1 var(--mono); letter-spacing: .14em; color: var(--ink-3); text-decoration: none;
  padding-bottom: 3px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ink-2); }
.nav a.on { color: var(--ink-1); border-bottom-color: var(--accent); }
.nav a.more { letter-spacing: .04em; color: var(--ink-4); }

.view { flex: 1; min-height: 0; display: flex; flex-direction: column; transition: opacity .24s; }

/* ------------------------------------------------------------ Kachelraster */

.grid {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 4fr 3.1fr 3.3fr;
  grid-template-rows: 1fr .46fr;
  grid-template-areas: 'a1 a2 a4' 'a1 a3 a4';
  gap: 18px;
  padding: 26px var(--pad) 0;
}
.slot { position: relative; min-width: 0; min-height: 0; transition: transform .32s var(--ease), opacity .32s; }
.tile {
  height: 100%; position: relative; border-radius: 12px; background: var(--tile); box-shadow: var(--tile-shadow);
  padding: 20px 22px 18px; display: flex; flex-direction: column; overflow: hidden;
  container-type: size;
  transition: box-shadow .32s var(--ease), filter .32s, opacity .32s, transform .32s var(--ease);
}
.tile[data-kind="habits"] { padding-bottom: 16px; }
.tile-head { display: flex; align-items: baseline; justify-content: space-between; flex: none; padding-bottom: 14px; gap: 12px; }
.tile[data-kind="woche"] .tile-head { padding-bottom: 16px; }
.tile[data-kind="habits"] .tile-head { padding-bottom: 12px; }
.tile[data-kind="todos"] .tile-head { padding-bottom: 10px; }
.tile-title { font: 400 11px/1 var(--mono); letter-spacing: .18em; color: var(--ink-soft); }
.tile-meta { font: 400 10px/1 var(--mono); letter-spacing: .1em; color: var(--ink-4); text-decoration: none; white-space: nowrap; }
.tile-meta.warn { color: var(--warn); }
@media (hover: hover) { .grid:not(.dragging) .tile-head { cursor: grab; } }

/* Ziehen: angehobene Kachel, Rest gedämpft, Zielplatz als Vertiefung */
.grid.dragging .slot:not(.placeholder) .tile {
  filter: saturate(.85); opacity: .72;
  box-shadow: inset 0 1px 0 rgba(255,246,230,0.05), inset 0 0 0 1px rgba(255,242,222,0.04);
}
.slot.displaced .tile { transform: translateX(-14px); opacity: .8 !important; }
.slot.placeholder .tile { visibility: hidden; }
.slot.placeholder::after {
  content: 'HIER ABLEGEN';
  position: absolute; inset: 0; border-radius: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.28), rgba(0,0,0,0.12));
  box-shadow: inset 0 0 0 1px oklch(0.90 0.17 115 / 0.22), inset 0 2px 14px rgba(0,0,0,0.55);
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 16px 18px;
  font: 400 10px/1 var(--mono); letter-spacing: .2em; color: oklch(0.90 0.17 115 / 0.65);
}
.drag-ghost { position: fixed; z-index: 50; pointer-events: none; margin: 0; }
.drag-ghost .tile {
  background: linear-gradient(180deg, #2b2619 0%, #221e18 58%, #1d1a15 100%);
  box-shadow: inset 0 1px 0 rgba(255,246,230,0.11), inset 0 0 0 1px oklch(0.90 0.17 115 / 0.28),
              0 60px 90px -30px rgba(0,0,0,0.95), 0 0 0 1px rgba(0,0,0,0.4);
}
.drag-ghost .tile-title { color: var(--accent); }
body.grabbing, body.grabbing * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* ------------------------------------------------------------ Kästchen */

.check {
  width: 20px; height: 20px; flex: none; border-radius: 4px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,242,222,0.16), inset 0 1px 0 rgba(255,246,230,0.06);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, box-shadow .2s;
}
.check::after {
  content: ''; width: 9px; height: 5px;
  border-left: 1.5px solid var(--accent-ink); border-bottom: 1.5px solid var(--accent-ink);
  transform: rotate(-45deg) translate(1px, -2px); opacity: 0; transition: opacity .2s;
}
.done > .check { background: var(--accent); box-shadow: inset 0 0 0 1px oklch(0.90 0.17 115 / 0.9); }
.done > .check::after { opacity: 1; }

/* ------------------------------------------------------------ Heute */

.bands { flex: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.band { display: flex; align-items: center; gap: 12px; height: 34px; border-radius: 5px; padding: 0 14px; min-width: 0; }
.band .kind { font: 400 9px/1 var(--mono); letter-spacing: .16em; color: var(--ink-warm); flex: none; }
.band .title { font-size: 13px; font-weight: 500; color: var(--ink-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.timeline { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.hour { flex: 1; min-height: 0; display: flex; border-top: 1px solid rgba(255,242,222,0.05); }
.hour span { font: 400 10px/1 var(--mono); letter-spacing: .06em; color: var(--ink-4); width: 38px; flex: none; margin-top: -6px; }
.events { position: absolute; left: 44px; right: 4px; top: 0; bottom: 0; }
.ev {
  position: absolute; border-radius: 6px; padding: 12px 14px; min-height: 18px;
  display: flex; flex-direction: column; gap: 4px; overflow: hidden;
}
.ev .t { font-size: 14px; font-weight: 500; color: var(--ink-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.ev .h { font: 400 11px/1.2 var(--mono); color: var(--ink-time); white-space: nowrap; flex-shrink: 0; }
.ev.short { flex-direction: row; align-items: center; gap: 12px; padding: 0 14px; }
.ev.short .t { font-size: 13px; flex: 0 1 auto; }
.ev.tiny { padding: 0 8px; }
.ev.tiny .t { font-size: 11px; }
.ev.tiny .h { display: none; }
.now { position: absolute; left: 0; right: 4px; height: 0; transition: top 1.2s linear; z-index: 2; pointer-events: none; }
.now .line { position: absolute; left: 38px; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, oklch(0.90 0.17 115 / 0.85), oklch(0.90 0.17 115 / 0.25)); }
.now .dot { position: absolute; left: 34px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px oklch(0.90 0.17 115 / 0.6); }
.now .lbl { position: absolute; left: 0; top: -7px; font: 400 10px/1 var(--mono); letter-spacing: .04em; color: var(--accent); }

.today-compact { display: none; flex: 1; min-height: 0; flex-direction: column; gap: 2px; overflow: hidden; }
.crow { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.crow .h { font: 400 11px/1 var(--mono); color: var(--ink-time); width: 40px; flex: none; }
.crow .t { font-size: 13px; color: var(--ink-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .c { width: 3px; align-self: stretch; border-radius: 2px; flex: none; }
.calm-quote { position: absolute; left: 44px; right: 6px; top: 22%; bottom: 26%; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.calm-quote .k { font: 400 10px/1 var(--mono); letter-spacing: .2em; color: var(--ink-4); }
.calm-quote .q { font-size: 33px; line-height: 1.28; font-weight: 400; letter-spacing: -.005em; color: var(--ink-hi); text-wrap: pretty; }
.calm-quote .bar { width: 64px; height: 1px; background: linear-gradient(90deg, oklch(0.90 0.17 115 / 0.7), rgba(255,242,222,0.05)); }

@container (max-height: 210px) {
  .timeline { display: none; }
  .today-compact { display: flex; }
  .bands { margin-bottom: 8px; }
  .band { height: 28px; }
}

/* ------------------------------------------------------------ Woche */

.week-cols { flex: 1; min-height: 0; display: flex; gap: 8px; }
.wday {
  flex: 1; min-width: 0; border-radius: 7px; background: rgba(255,242,222,0.022);
  box-shadow: inset 0 1px 0 rgba(255,246,230,0.04); padding: 10px 8px;
  display: flex; flex-direction: column; gap: 8px; overflow: hidden;
}
.wday.today {
  flex: 1.2;
  background: linear-gradient(180deg, oklch(0.90 0.17 115 / 0.09), rgba(255,242,222,0.02));
  box-shadow: inset 0 2px 0 oklch(0.90 0.17 115 / 0.85), inset 0 0 0 1px oklch(0.90 0.17 115 / 0.14);
}
.wday .d { font: 400 10px/1 var(--mono); letter-spacing: .08em; color: var(--ink-3); white-space: nowrap; }
.wday.today .d { color: var(--accent); }
.wday .i {
  font-size: 11px; line-height: 1.35; color: var(--ink-warm); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: break-word; hyphens: auto;
}
.wday.today .i { color: var(--ink-hi); }
.wday .i .short { display: none; }
/* Schmale Spalten (Woche auf dem mittleren Platz): Kurzformen, notfalls silbengetrennt. */
@container (max-width: 520px) {
  .week-cols { gap: 5px; }
  .wday { padding: 10px 4px; }
  .wday .i { font-size: 10.5px; letter-spacing: -.01em; }
  .wday .i .full { display: none; }
  .wday .i .short { display: inline; }
}
.none { font: 400 11px/1 var(--mono); color: var(--ink-5); }
.week-rows { display: none; flex: 1; min-height: 0; flex-direction: column; gap: 8px; }
.wrow { flex: 1; min-height: 0; border-radius: 7px; background: rgba(255,242,222,0.022); padding: 9px 12px; display: flex; align-items: center; gap: 14px; }
.wrow.today {
  flex: 1.25;
  background: linear-gradient(180deg, oklch(0.90 0.17 115 / 0.09), rgba(255,242,222,0.02));
  box-shadow: inset 0 2px 0 oklch(0.90 0.17 115 / 0.85);
}
.wrow .d { font: 400 10px/1 var(--mono); color: var(--ink-3); width: 44px; flex: none; }
.wrow.today .d { color: var(--accent); }
.wrow .i { font-size: 11px; color: var(--ink-warm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrow.today .i { color: var(--ink-hi); }
@container (aspect-ratio < 0.65) {
  .week-cols { display: none; }
  .week-rows { display: flex; }
}

/* ------------------------------------------------------------ Habits */

.habits { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-evenly; }
.habit {
  display: flex; align-items: center; gap: 14px; height: 44px; flex: none; cursor: pointer;
  border-radius: 6px; padding: 0 6px; transition: background .18s;
}
@media (hover: hover) { .habit:hover { background: rgba(255,242,222,0.03); } }
.habit .lbl { font-size: 14px; color: var(--ink-1); transition: color .22s .08s; }
.habit.done .lbl { color: var(--ink-soft); }

/* ------------------------------------------------------------ To-Dos */

.todos {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,242,222,0.1) transparent;
}
.todo {
  display: flex; align-items: center; gap: 13px; padding: 13px 6px; flex: none;
  border-top: 1px solid rgba(255,242,222,0.05); cursor: grab; transition: opacity .2s; position: relative;
}
.todo.done { cursor: default; }
.todo .lbl {
  flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; color: var(--ink-1);
  text-decoration-color: var(--ink-4); transition: color .24s .1s;
}
.todo.done .lbl { color: var(--ink-4); text-decoration: line-through; }
.todos.carry-gedimmt .todo.carried .lbl { color: var(--ink-2); }
.carry { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--ink-3); }
.todo.lifting { opacity: .45; }
.grip { display: none; width: 28px; margin-right: -8px; align-self: stretch; flex: none; flex-direction: column; gap: 3px; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.grip i { width: 12px; height: 1px; background: rgba(255,242,222,0.18); }
.nothing { flex: none; border-top: 1px solid rgba(255,242,222,0.05); padding-top: 18px; font: 400 11px/1 var(--mono); letter-spacing: .1em; color: var(--ink-4); }
.tile[data-kind="todos"] .nothing { margin-top: 12px; }

/* ------------------------------------------------------------ Eingabezeile */

.entry { flex: none; padding: 22px var(--pad) 26px; position: relative; display: flex; align-items: center; gap: 10px; }
.entry input {
  flex: 1; min-width: 0; background: transparent; border: none; border-radius: 0;
  border-bottom: 1px solid rgba(255,242,222,0.08); outline: none;
  color: var(--ink-1); font: 400 14px/1.4 var(--sans); padding: 10px 2px; transition: border-color .3s;
}
.entry input::placeholder { color: var(--ink-5); }
.entry input:focus { border-bottom-color: oklch(0.90 0.17 115 / 0.7); }
.entry .reply {
  position: absolute; right: var(--pad); top: 34px; max-width: 58%;
  font: 400 11px/1 var(--mono); letter-spacing: .04em; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  opacity: 0; transition: opacity .24s;
}
.entry .reply.show { opacity: 1; }
.mic { display: none; width: 44px; height: 44px; margin-right: -14px; align-items: center; justify-content: center; flex: none; }
.mic span { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,242,222,0.14); transition: background .2s, box-shadow .2s, transform .2s; }
.mic.rec span { background: var(--accent); box-shadow: 0 0 0 6px oklch(0.90 0.17 115 / 0.12); animation: breathe 1.6s ease-in-out infinite; }
.mic.busy span { background: rgba(255,242,222,0.14); animation: breathe 1s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.82); } }

/* ------------------------------------------------------------ Ruhiger Tag (Artboard 02) */

body.calm .top .quote { opacity: 0; }
body.calm .hour { border-top-color: rgba(255,242,222,0.028); }
body.calm .hour span { color: #3d3833; }
body.calm .now .line { background: linear-gradient(90deg, oklch(0.90 0.17 115 / 0.5), oklch(0.90 0.17 115 / 0.08)); }
body.calm .now .dot { background: oklch(0.90 0.17 115 / 0.75); box-shadow: none; }
body.calm .now .lbl { color: oklch(0.90 0.17 115 / 0.85); }
body.calm .wday:not(.today), body.calm .wrow:not(.today) { background: rgba(255,242,222,0.014); box-shadow: none; }
body.calm .wday:not(.today) .d { color: var(--ink-5); }
body.calm .wday:not(.today) .i { color: var(--ink-3); }
body.calm .habit.done .check { background: oklch(0.90 0.17 115 / 0.55); box-shadow: inset 0 0 0 1px oklch(0.90 0.17 115 / 0.5); }
body.calm .entry input::placeholder { color: var(--ink-5); }

/* ------------------------------------------------------------ Seiten */

.page { flex: 1; min-height: 0; padding: 44px var(--pad) 40px; }
.link {
  font: 400 11px/1.3 var(--mono); letter-spacing: .1em; color: var(--ink-soft); text-decoration: none;
  border-bottom: 1px solid rgba(255,242,222,0.14); transition: color .2s, border-color .2s; white-space: nowrap;
}
.link:hover { color: var(--ink-1); border-bottom-color: oklch(0.90 0.17 115 / 0.6); }
.label { font: 400 10px/1 var(--mono); letter-spacing: .2em; color: var(--ink-4); }
.accent-label { font: 400 10px/1 var(--mono); letter-spacing: .2em; color: var(--accent); }
.btn { font: 400 11px/1 var(--mono); letter-spacing: .12em; border-radius: 5px; padding: 11px 18px; transition: filter .2s, box-shadow .2s, color .2s; }
.btn.primary { color: var(--accent-ink); background: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { color: var(--ink-4); box-shadow: inset 0 0 0 1px rgba(255,242,222,0.07); }
.btn.ghost:hover { color: var(--ink-1); box-shadow: inset 0 0 0 1px rgba(255,242,222,0.16); }
.btn:disabled { opacity: .5; cursor: default; }
.field {
  width: 100%; background: transparent; border: none; border-radius: 0; outline: none;
  border-bottom: 1px solid rgba(255,242,222,0.08); color: var(--ink-1); font: 400 14px/1.4 var(--sans);
  padding: 10px 2px; transition: border-color .3s;
}
.field::placeholder { color: var(--ink-5); }
.field:focus { border-bottom-color: oklch(0.90 0.17 115 / 0.7); }
.empty-state { display: flex; flex-direction: column; gap: 14px; padding: 12vh 0; max-width: 520px; }
.empty-state p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }

/* Inbox (Artboard 05) */
.inbox { display: flex; flex-direction: column; gap: 30px; padding-bottom: 60px; }
.igroup { display: flex; flex-direction: column; gap: 2px; }
.igroup > .label { padding-bottom: 10px; }
.irow { display: flex; align-items: center; gap: 26px; padding: 20px 8px; border-top: 1px solid rgba(255,242,222,0.06); transition: opacity .24s; }
.igroup:last-child .irow:last-of-type { border-bottom: 1px solid rgba(255,242,222,0.06); }
.irow .kind { width: 86px; flex: none; font: 400 10px/1 var(--mono); letter-spacing: .14em; color: var(--ink-soft); }
.irow .in { width: 300px; flex: none; font-size: 15px; color: var(--ink-1); display: flex; align-items: center; gap: 14px; min-width: 0; }
.irow .in .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper {
  width: 30px; height: 40px; flex: none; border-radius: 3px; display: block;
  background: repeating-linear-gradient(180deg, rgba(255,242,222,0.16) 0 1px, transparent 1px 5px);
  box-shadow: inset 0 0 0 1px rgba(255,242,222,0.12);
}
.irow .arrow { flex: none; font: 400 13px/1 var(--mono); color: var(--ink-4); }
.irow .res { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.irow .rt { font-size: 15px; font-weight: 500; color: var(--ink-hi); white-space: nowrap; }
.irow .rt.muted { font: 400 11px/1 var(--mono); letter-spacing: .08em; color: var(--ink-3); font-weight: 400; }
.irow .rt.warn { color: var(--warn); }
.irow .rd { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.irow .chip { width: 8px; height: 8px; border-radius: 2px; flex: none; align-self: center; }
.irow .acts { flex: none; display: flex; align-items: center; gap: 20px; }
.irow .time { font: 400 11px/1 var(--mono); color: var(--ink-3); }
.irow .state { font: 400 11px/1 var(--mono); letter-spacing: .1em; color: var(--ink-4); }
.irow.undone { opacity: .5; }
.irow.undone .rt { text-decoration: line-through; text-decoration-color: var(--ink-4); }
.icorrect { padding: 0 8px 18px 112px; }

/* Stundenplan (Artboard 06) */
.timetable { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 40px var(--pad) 34px; }
.tt-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tt-head { flex: none; display: flex; gap: 12px; padding-bottom: 14px; }
.tt-head .pl { width: 92px; flex: none; }
.tt-head span:not(.pl) { flex: 1; font: 400 11px/1 var(--mono); letter-spacing: .14em; color: var(--ink-soft); }
.tt-head span.on { color: var(--accent); }
.tt-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.tt-row { flex: 1; min-height: 72px; display: flex; gap: 12px; }
.tt-row .pl { width: 92px; flex: none; display: flex; flex-direction: column; gap: 3px; padding-top: 14px; }
.tt-row .pl span { font: 400 11px/1.2 var(--mono); color: var(--ink-soft); }
.tt-row .pl .tm { font-size: 10px; color: var(--ink-4); }
.cell {
  flex: 1; min-width: 0; border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px;
  background: linear-gradient(180deg, #242017 0%, #1e1b17 100%);
  box-shadow: inset 0 1px 0 rgba(255,246,230,0.05), inset 0 0 0 1px rgba(255,242,222,0.04);
}
.cell .sub { font-size: 15px; color: var(--ink-1); }
.cell .meta { font: 400 10px/1.3 var(--mono); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .subrow { display: flex; align-items: center; gap: 8px; }
.cell.today { background: linear-gradient(180deg, #282316 0%, #201c17 100%); box-shadow: inset 0 2px 0 oklch(0.90 0.17 115 / 0.85), inset 0 0 0 1px oklch(0.90 0.17 115 / 0.12); }
.cell.today .sub { color: var(--ink-hi); }
.cell.today .meta { color: var(--ink-soft); }
.cell.off { background: repeating-linear-gradient(135deg, rgba(255,242,222,0.022) 0 6px, transparent 6px 12px); box-shadow: inset 0 0 0 1px rgba(255,242,222,0.03); }
.cell.off .sub { color: var(--ink-4); text-decoration: line-through; text-decoration-color: var(--ink-5); }
.cell.off .meta { letter-spacing: .12em; }
.cell.empty { background: none; box-shadow: inset 0 0 0 1px rgba(255,242,222,0.025); }
.cell.empty.today { box-shadow: inset 0 0 0 1px oklch(0.90 0.17 115 / 0.07); }
.cell .mark { font: 400 10px/1 var(--mono); color: var(--warn); margin-top: auto; letter-spacing: .06em; }
.vbadge { font: 400 9px/1 var(--mono); letter-spacing: .12em; color: var(--accent-ink); background: var(--ink-warm); border-radius: 3px; padding: 2px 5px; }
.tt-legend { flex: none; display: flex; align-items: center; gap: 34px; padding-top: 26px; }
.tt-legend .lg { display: flex; align-items: center; gap: 10px; font: 400 10px/1 var(--mono); letter-spacing: .12em; color: var(--ink-soft); }
.tt-legend .sw { width: 26px; height: 14px; border-radius: 3px; }
.tt-legend .sw.hatch { background: repeating-linear-gradient(135deg, rgba(255,242,222,0.05) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1px rgba(255,242,222,0.05); }
.tt-legend .sw.today { background: #201c17; box-shadow: inset 0 2px 0 oklch(0.90 0.17 115 / 0.85); }
.tt-legend .sp { flex: 1; }
.tt-legend .stand { font: 400 10px/1 var(--mono); letter-spacing: .12em; color: var(--ink-4); }

/* Journal (Artboard 07) */
.journal { display: flex; flex-direction: column; gap: 26px; padding: 40px var(--pad) 60px; }
.journal .label + .jgrid { margin-top: -6px; }
.journal .label.later { padding-top: 8px; }
.jgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.jp { display: flex; flex-direction: column; gap: 9px; text-align: left; }
.jp .pg {
  aspect-ratio: 3 / 4; border-radius: 6px; display: flex; align-items: flex-end; padding: 10px;
  background: repeating-linear-gradient(180deg, rgba(255,242,222,0.09) 0 1px, transparent 1px 9px), linear-gradient(180deg, #2a251d, #231f19);
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255,242,222,0.07), 0 20px 34px -22px rgba(0,0,0,0.9);
  transition: transform .24s var(--ease), box-shadow .24s;
}
/* Weißes Papier würde die dunkle Fläche zerreißen — gedimmt, beim Hinzeigen hell. */
.jp .pg.photo { filter: saturate(.8) brightness(.72); transition: transform .24s var(--ease), box-shadow .24s, filter .24s; }
.jp:hover .pg { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255,242,222,0.12), 0 26px 40px -22px rgba(0,0,0,0.95); }
.jp:hover .pg.photo { filter: saturate(.9) brightness(.95); }
.jp .pg span { font: 400 8px/1 var(--mono); letter-spacing: .1em; color: var(--ink-3); }
.jp .d { font: 400 10px/1 var(--mono); color: var(--ink-soft); }
.jover {
  position: fixed; inset: 0; z-index: 40; background: rgba(12,11,9,0.82);
  display: flex; align-items: center; justify-content: center; gap: 44px; cursor: zoom-out;
  animation: fade .24s var(--ease);
}
.jover img {
  height: min(700px, 86vh); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px;
  background: linear-gradient(180deg, #2f2a21, #262119);
  box-shadow: inset 0 0 0 1px rgba(255,242,222,0.09), 0 60px 100px -40px #000;
}
.jover .info { display: flex; flex-direction: column; gap: 12px; cursor: default; }
.jover .date { font: 400 22px/1 var(--mono); color: var(--ink-hi); }
.jover .t { font-size: 13px; color: var(--ink-3); max-width: 220px; line-height: 1.5; }
.jover .link { align-self: flex-start; margin-top: 10px; }
@keyframes fade { from { opacity: 0; } }

/* Einstellungen */
.settings { display: flex; flex-direction: column; gap: 44px; max-width: 760px; padding-bottom: 80px; }
.settings section { display: flex; flex-direction: column; gap: 16px; }
.settings p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.srow { display: flex; align-items: center; gap: 18px; padding: 14px 2px; border-top: 1px solid rgba(255,242,222,0.05); }
.srow .n { flex: 1; min-width: 0; }
.srow .m { font: 400 11px/1 var(--mono); color: var(--ink-3); }
.srow .field { flex: 1; width: auto; min-width: 0; }
.srow .btn { flex: none; }
.seg { display: flex; gap: 8px; }
.seg button { font: 400 11px/1 var(--mono); letter-spacing: .1em; color: var(--ink-4); padding: 9px 14px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(255,242,222,0.07); }
.seg button.on { color: var(--ink-1); box-shadow: inset 0 0 0 1px oklch(0.90 0.17 115 / 0.6); }
.codebox { font: 400 15px/1.4 var(--mono); color: var(--ink-hi); padding: 16px 18px; border-radius: 8px; background: rgba(0,0,0,0.25); box-shadow: inset 0 0 0 1px oklch(0.90 0.17 115 / 0.25); word-break: break-all; user-select: all; }
.ok { color: var(--accent); }
.bad { color: var(--warn); }

/* ------------------------------------------------------------ Hinweise */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 8px); opacity: 0;
  max-width: min(560px, 90vw); padding: 11px 16px; border-radius: 6px; background: #1e1b17;
  box-shadow: inset 0 0 0 1px rgba(255,242,222,0.08), 0 20px 40px -20px #000;
  font: 400 11px/1.4 var(--mono); letter-spacing: .04em; color: var(--ink-warm);
  transition: opacity .24s, transform .24s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.drop-hint {
  position: fixed; inset: 16px; z-index: 55; border-radius: 16px; pointer-events: none;
  box-shadow: inset 0 0 0 1px oklch(0.90 0.17 115 / 0.4); background: rgba(12,11,9,0.55);
  display: flex; align-items: center; justify-content: center;
}
.drop-hint span { font: 400 11px/1 var(--mono); letter-spacing: .2em; color: oklch(0.90 0.17 115 / 0.8); }

/* ------------------------------------------------------------ Anmeldung, Freigabe */

body.plain { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 50% -14%, #221f19 0%, #1a1815 52%, #151310 100%) fixed; }
.login, .consent { width: min(420px, 88vw); display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.brand .word { font: 400 30px/1 var(--sans); letter-spacing: .42em; color: var(--ink-1); }
.brand .bar { flex: 1; height: 1px; background: linear-gradient(90deg, oklch(0.90 0.17 115 / 0.7), rgba(255,242,222,0.05)); }
.login p, .consent p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.consent h1 { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 400; color: var(--ink-hi); }
.consent form { display: flex; gap: 12px; margin-top: 8px; }
.login .err { color: var(--warn); font: 400 11px/1.4 var(--mono); min-height: 1em; }
.login .row { display: flex; align-items: center; gap: 18px; }

/* ------------------------------------------------------------ Handy (Artboard 04) */

@media (max-width: 760px) {
  :root { --pad: 20px; }
  body[data-view="heute"] .app,
  body[data-view="stundenplan"] .app { height: auto; min-height: 100dvh; }
  .app { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .top { flex-direction: column; align-items: stretch; gap: 6px; padding: max(14px, env(safe-area-inset-top)) 20px 14px; }
  .top .date { gap: 10px; }
  .top .wd, .top .dt { font-size: 11px; }
  .top .quote { font-size: 13px; white-space: normal; }
  body.calm .top .quote { opacity: 1; }
  /* "Oben nur Lesestoff" (Artboard 04): die Navigation sitzt unten am Daumen. */
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 0; justify-content: space-around;
    padding: 12px 8px max(12px, env(safe-area-inset-bottom)); background: #151310;
    border-top: 1px solid rgba(255,242,222,0.05);
  }
  .nav a { font-size: 10px; letter-spacing: .12em; padding: 6px 4px 3px; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }

  .grid { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; }
  .slot[data-tile="heute"] { height: 264px; flex: none; }
  .slot[data-tile="woche"] { height: 104px; flex: none; }
  .slot[data-tile="todos"] { flex: none; }
  /* Die Liste wächst mit ihrem Inhalt — ohne feste Höhe keine Größen-Abfrage. */
  .slot[data-tile="todos"] .tile { height: auto; min-height: 250px; container-type: normal; }
  .slot[data-tile="habits"] { height: 150px; flex: none; }
  .tile { padding: 14px 16px; box-shadow: inset 0 1px 0 rgba(255,246,230,0.07), inset 0 0 0 1px rgba(255,242,222,0.05), 0 22px 40px -26px rgba(0,0,0,0.9); }
  .tile[data-kind="todos"] { padding-bottom: 6px; }
  .tile[data-kind="habits"] { padding-bottom: 10px; }
  .tile-head, .tile[data-kind="woche"] .tile-head { padding-bottom: 10px; touch-action: none; }
  .tile[data-kind="todos"] .tile-head { padding-bottom: 6px; }
  .tile[data-kind="habits"] .tile-head { padding-bottom: 4px; }
  .tile-title { font-size: 10px; }
  .tile-meta { font-size: 9px; }

  .band { height: 26px; padding: 0 10px; gap: 10px; border-radius: 4px; }
  .band .kind { font-size: 8px; }
  .band .title { font-size: 12px; }
  .bands { margin-bottom: 10px; }
  .hour { border-top-color: transparent; }
  .hour.major { border-top-color: rgba(255,242,222,0.05); }
  .hour span { width: 30px; font-size: 9px; letter-spacing: 0; }
  .hour:not(.major) span { visibility: hidden; }
  .events { left: 30px; right: 0; }
  .ev { padding: 7px 10px; gap: 2px; border-radius: 5px; }
  .ev .t { font-size: 12px; }
  .ev .h { font-size: 10px; }
  .ev.short { padding: 0 10px; gap: 8px; }
  .ev.short .t { font-size: 11px; }
  .ev.short .h { font-size: 9px; }
  .ev.short .h .e { display: none; }
  .now .line { left: 30px; }
  .now .dot { left: 26px; top: -2.5px; width: 6px; height: 6px; box-shadow: none; }
  .now .lbl { display: none; }
  .calm-quote { left: 30px; }
  .calm-quote .q { font-size: 22px; }

  .week-cols { gap: 4px; }
  .wday { padding: 6px 4px; gap: 4px; align-items: center; border-radius: 5px; }
  .wday.today { flex: 1.3; box-shadow: inset 0 2px 0 oklch(0.90 0.17 115 / 0.85); }
  .wday .d { font-size: 9px; letter-spacing: 0; }
  .wday .d .num { display: none; }
  .wday .i { font-size: 9px; line-height: 1.2; text-align: center; -webkit-line-clamp: 2; overflow-wrap: normal; hyphens: auto; }
  .wday .i + .i { display: none; }
  .wday .i .full { display: none; }
  .wday .i .short { display: inline; }
  .none { font-size: 9px; }

  .todo { padding: 0; min-height: 44px; flex: 1 0 44px; gap: 12px; cursor: default; }
  .todo .check { width: 22px; height: 22px; }
  .todo .lbl { font-size: 13px; }
  .grip { display: flex; }
  .habit { height: 34px; gap: 12px; padding: 0; }
  .habit .check { width: 22px; height: 22px; }
  .habit .lbl { font-size: 13px; }

  .entry { padding: 12px 20px 18px; }
  .entry input { font-size: 16px; padding: 8px 2px; }
  .entry .reply { position: static; order: -1; flex-basis: 100%; max-width: none; margin-bottom: 4px; }
  .entry { flex-wrap: wrap; }
  .mic { display: flex; }

  .page, .timetable, .journal { padding: 24px 20px 40px; }
  .irow { flex-wrap: wrap; gap: 8px 14px; padding: 16px 4px; }
  .irow .kind { width: auto; }
  .irow .in { width: auto; flex: 1 1 60%; font-size: 14px; }
  .irow .arrow { display: none; }
  .irow .res { flex-basis: 100%; flex-wrap: wrap; gap: 4px 10px; }
  .irow .acts { flex-basis: 100%; gap: 16px; }
  .icorrect { padding: 0 4px 16px; }
  .tt-scroll { overflow-x: auto; }
  .tt-head, .tt-body { min-width: 640px; }
  .tt-legend { flex-wrap: wrap; gap: 14px 22px; }
  .jgrid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .jover { flex-direction: column; gap: 18px; padding: 20px; }
  .jover img { height: auto; width: 100%; max-height: 70vh; }
}
