/* Die Vorschau im iPhone (phone.js), Stand App 1.1: Kacheln wie im Community-Bereich, Prudentia-Seite, Fokus-Seite mit Zeitleiste links.
   Formen wie in der App (src/lib/shape.ts): Prudentia rund (26 / 20 / 16), Projekte und Aufgaben kantig (4 / 3). */

.demo-col { display: grid; gap: 16px; min-width: 0; }
.phone { position: relative; width: 100%; max-width: 390px; margin: 0 auto; aspect-ratio: 9 / 18.5; max-height: 800px; border-radius: 52px; padding: 12px; background: var(--night); box-shadow: var(--shadow), inset 0 0 0 1.5px rgb(255 255 255 / 9%); }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 96px; height: 28px; border-radius: 16px; background: #000; z-index: 3; }
.screen { position: relative; height: 100%; border-radius: 41px; overflow: hidden; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.4; display: flex; flex-direction: column; }
@media (max-width: 420px) { .phone { aspect-ratio: auto; height: 640px; border-radius: 44px; padding: 10px; } .screen { border-radius: 35px; } }
.screen .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.scr-top { height: 52px; flex: none; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 26px 6px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 18px 18px; scrollbar-width: thin; }
.scr-foot { flex: none; border-top: 1px solid var(--rule); padding: 12px 14px 22px; display: flex; gap: 8px; background: var(--paper); }
.scr-foot .pbtn { flex: 1; }

.pbtn { border: 0; border-radius: 14px; padding: 13px 8px; font: 600 15px/1.1 var(--body); cursor: pointer; background: var(--copper); color: var(--copper-ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pbtn.soft { background: var(--linen); color: var(--ink); }
.pbtn.icon { flex: none !important; width: 54px; background: var(--copper-soft); color: var(--copper); }
.pbtn:disabled { opacity: 0.5; }
.chip { border: 0; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--linen); color: var(--ink-soft); font: 600 12px/1 var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--copper-soft); color: var(--copper); }
.txt-btn { border: 0; background: none; color: var(--ink-soft); font: 600 12.5px var(--body); padding: 6px; cursor: pointer; }
.back { border: 0; background: none; color: var(--copper); font: 600 15px var(--body); padding: 4px 0; cursor: pointer; }

/* Bild in seiner Form: rund (Prudentia) oder kantig (Projekt, Aufgabe) */
.badge { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--copper-soft); font-size: 20px; line-height: 1; overflow: hidden; }
.badge.r { border-radius: 50%; }
.badge.s { border-radius: 3px; }
.badge img { width: 100%; height: 100%; object-fit: cover; }
.badge.big { width: 64px; height: 64px; font-size: 36px; }

/* Paketübersicht (Kacheln) */
.lib-head { display: grid; gap: 2px; margin: 6px 0 14px; }
.lib-head h3 { font-family: var(--body); font-size: 22px; font-weight: 700; }
.lib-head p { color: var(--ink-soft); font-size: 13px; }
/* Kacheln wie im Community-Bereich der App (src/components/Tiles.tsx): drei je Reihe, Dauer oben rechts, Titel in zwei Zeilen */
.cb-band { background: var(--linen); border-radius: var(--r-md); padding: 10px 6px 10px; margin: 0 -8px 12px; }
.cb-head { font-size: 12px; font-weight: 800; letter-spacing: 0.05em; color: var(--ink-soft); margin: 2px 4px 8px; }
.cb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cb-tile { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 9px; border: 1px solid var(--rule); background: var(--vellum); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cb-tile.r { border-radius: 26px; padding: 10px 8px 12px 10px; }
.cb-tile.s { border-radius: 4px; }
.cb-tile:hover { border-color: var(--copper); }
.cb-tile.bad { border-style: dashed; opacity: 0.7; cursor: default; border-radius: 4px; }
.cb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.cb-top .badge { width: 32px; height: 32px; font-size: 19px; }
.cb-dur { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; padding-top: 2px; }
.cb-dur b { font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.cb-title { font-size: 12px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.cb-sub { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.cb-sub.bad { color: var(--danger); }
/* Übersicht: unten (in der unteren Hälfte) der Hinweis und die Ablage für ein eigenes Paket */
.scr-body.lib { display: flex; flex-direction: column; }
.lib-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 10px; }
.lib-hint { font-size: 13px; color: var(--ink-soft); text-align: center; line-height: 1.4; padding: 0 6px; }
.drop-msg { font-size: 12.5px; text-align: center; line-height: 1.4; }
.drop-msg.err { color: var(--danger); font-weight: 600; }
.drop-msg .link-btn { border: 0; background: none; padding: 0; color: var(--copper); text-decoration: underline; font: inherit; cursor: pointer; }
.drop-zone { display: grid; justify-items: center; gap: 4px; padding: 16px 12px 14px; border: 1.5px dashed var(--rule); border-radius: var(--r-md); background: var(--vellum); text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--copper); background: var(--copper-soft); }
.drop-zone .plus { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--copper-soft); color: var(--copper); font-size: 24px; font-weight: 300; line-height: 1; }
.drop-zone.over .plus { background: var(--copper); color: var(--copper-ink); }
.drop-zone b { font-size: 14px; }
.drop-zone small { font-size: 11.5px; color: var(--ink-soft); }
.drop-zone:focus-within { outline: 2px solid var(--copper); outline-offset: 2px; }
/* Schmale Bildschirme: etwas kleiner, damit Titel wie „Rückenschule“ nicht mitten im Wort umbrechen */
@media (max-width: 420px) {
  .cb-grid { gap: 5px; }
  .cb-tile.r { padding: 9px 6px 10px 8px; }
  .cb-top .badge { width: 26px; height: 26px; font-size: 16px; }
  .cb-dur b { font-size: 14px; }
  .cb-title { font-size: 11px; }
}

/* Detail (Prudentia / Projekt) */
.det-head { display: grid; gap: 4px; margin: 4px 0 12px; }
.det-head h3 { font-family: var(--body); font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; margin-top: 6px; }
.det-head .sub { color: var(--ink-soft); font-size: 13px; }
.desc { background: var(--vellum); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; color: var(--ink); margin-bottom: 14px; white-space: pre-line; }
.desc { cursor: pointer; }
.desc .clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--vellum); border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px; }
.task .ic { font-size: 20px; text-align: center; }
.task b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.task .d { color: var(--ink-soft); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.task .r { font-size: 11px; color: var(--copper); font-weight: 600; display: block; }
.task .res { font-size: 11.5px; color: var(--ink-soft); display: block; }
.round-box { border: 1.5px dashed var(--copper); border-radius: 14px; padding: 6px; display: grid; gap: 6px; }
.round-box > span { font-size: 11.5px; font-weight: 700; color: var(--copper); padding: 2px 6px 0; }
.ev-head { font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 2px 4px; }

/* Ablauf (Fokus-Seite): Symbol nur in der Zeitleiste, Titel und Timer mittig, Hinweis ohne Kasten, „Als Nächstes“ fest unten */
.run { display: flex; flex: 1; min-height: 0; }
.rail { width: 46px; flex: none; display: flex; flex-direction: column; padding: 4px 0 8px 10px; gap: 4px; }
.seg { position: relative; border-radius: 10px; overflow: hidden; background: var(--linen); border: 1.5px solid transparent; min-height: 30px; }
.seg.cur { border-color: var(--copper); }
.seg i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--copper); opacity: 0.55; }
.seg.done i { background: var(--copper-soft); opacity: 1; height: 100%; }
.seg span { position: relative; display: block; text-align: center; padding-top: 4px; font-size: 14px; }
.run-main { flex: 1; min-width: 0; overflow-y: auto; padding: 8px 16px 16px; text-align: center; }
.run-meta { color: var(--ink-soft); font-size: 12.5px; margin-bottom: 4px; }
.run-title { font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.clock { font-size: 56px; font-weight: 200; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; margin-top: 12px; line-height: 1.05; transition: opacity 0.2s; }
.clock.over { color: var(--copper); }
.clock.paused { opacity: 0.4; }
.result { text-align: left; margin-top: 14px; border-radius: 3px; background: var(--copper-soft); padding: 8px 12px; display: grid; gap: 2px; }
.result small { font-size: 10.5px; font-weight: 700; color: var(--copper); letter-spacing: 0.06em; }
.result b { font-size: 14.5px; font-weight: 600; }
.note { text-align: left; margin-top: 16px; }
.note p { white-space: pre-line; margin-top: 6px; font-size: 14.5px; overflow-wrap: anywhere; }
.note label { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; font-size: 14.5px; }
.note input { accent-color: var(--copper); margin-top: 3px; }
.note img { border-radius: 10px; margin-top: 10px; max-height: 220px; width: auto; }
.run-bottom { flex: none; border-top: 1px solid var(--rule); background: var(--paper); }
.run-bottom .scr-foot { border-top: 0; padding-top: 10px; }
.run-next { padding: 10px 18px 0; display: grid; gap: 4px; }
.run-next small { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-soft); }
.run-next .nx { display: flex; align-items: center; gap: 10px; }
.run-next .nx b { flex: 1; min-width: 0; font-size: 18px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.run-next .nx span:last-child { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.run-next .nx-ic { width: 32px; height: 32px; font-size: 22px; background: none; }
.run-next .last { font-size: 14.5px; color: var(--ink-soft); }
.run-chips { display: flex; gap: 8px; padding: 2px 14px 4px; align-items: center; }
.run-chips .sp { flex: 1; }
.center { flex: 1; display: grid; place-content: center; text-align: center; gap: 6px; padding: 24px; }
.center .big { font-size: 140px; font-weight: 200; color: var(--copper); line-height: 1; font-variant-numeric: tabular-nums; }
.intro-title { font-size: 20px; font-weight: 700; }

/* „Nicht jetzt“: Blatt von unten */
.sheet-back { position: absolute; inset: 0; background: rgb(0 0 0 / 35%); z-index: 4; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--paper); border-radius: 22px 22px 0 0; padding: 18px 16px 26px; display: grid; gap: 8px; box-shadow: 0 -8px 30px rgb(0 0 0 / 25%); }
.sh-title { font-size: 18px; }
.sh-sub { font-size: 13px; color: var(--ink-soft); }
.choice { text-align: left; border: 1px solid var(--rule); background: var(--vellum); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; cursor: pointer; color: var(--ink); font: inherit; }
.choice b { font-size: 15px; }
.choice span { font-size: 12.5px; color: var(--ink-soft); }
.choice:hover { border-color: var(--copper); }

/* Ablage für eigene Pakete */
.drop { border: 1.5px dashed var(--rule); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 6px; text-align: center; color: var(--ink-soft); font-size: 0.92rem; background: var(--vellum); transition: border-color 0.15s, background 0.15s; }
.drop.over { border-color: var(--copper); background: var(--copper-soft); }
.drop b { color: var(--ink); font-weight: 600; }
.drop label { color: var(--copper); text-decoration: underline; cursor: pointer; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .err { color: var(--danger); font-weight: 600; }
.drop .ok { color: var(--ink); }
.drop button { border: 0; background: none; color: var(--copper); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
