/* Startseite: interaktiver Tagesplan im Abschnitt #tagesplan. Alles unter .tp. */
.feature-row.tp-row { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.feature-row.tp-row .feature-text { padding-top: 0; }
@media (max-width: 900px) { .feature-row.tp-row { grid-template-columns: 1fr; gap: 32px; } .feature-row.tp-row .feature-text { padding-top: 0; } }

.tp {
  --paper: #eceff3;
  --line: rgba(26,26,46,0.09);
  --ink: #1a1a2e;
  --ink-2: #4a4f5c;
  --ink-3: #5f6470;
  --blue: #0e6470;
  --green: #2f9e6e;
  --green-ink: #1f7a52;
  --red: #b42318;
  --display: 'Bricolage Grotesque', 'DM Sans', sans-serif;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); gap: 18px; align-items: start;
  padding: 22px; background: var(--paper); border-radius: 18px; color: var(--ink); text-align: left;
}
.tp button { font: inherit; color: inherit; }
.tp svg.i { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Kopf */
.tp-kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.tp-head h3 { margin: 2px 0 0; font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.tp-air { margin: 4px 0 0; font-size: 0.88rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tp-air b { color: var(--green-ink); }
.tp-air.over b { color: var(--red); }

/* Plan: Zeitspalte, Balken, Text */
.tp-list { position: relative; list-style: none; margin: 16px 0 0; padding: 0; }
.tp-list::before { content: ''; position: absolute; left: 67px; top: 8px; bottom: 8px; width: 2px; background: rgba(26,26,46,0.1); }
.tp-row { position: relative; display: grid; grid-template-columns: 48px 40px minmax(0, 1fr) 28px; column-gap: 12px; align-items: start; min-height: var(--h, 44px); margin-bottom: 6px; }
.tp-time { padding-top: 4px; font-size: 0.82rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tp-bar { position: relative; z-index: 1; height: var(--h, 44px); border-radius: 12px; display: flex; justify-content: center; padding-top: 10px; background: var(--fill, #d5d9e0); box-shadow: inset 0 0 0 1.5px var(--edge, #b4bac4); }
.tp-row.meet .tp-bar { --fill: #4b5160; --edge: #4b5160; color: #fff; }
.tp-row.pause .tp-bar { --fill: #fff; --edge: #c4c9d1; }
.tp-body { min-width: 0; padding-top: 3px; }
.tp-body b { display: block; font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.tp-body span { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tp-x { width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.tp-x:hover { background: rgba(26,26,46,0.06); color: var(--ink); }
.tp-check { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--edge, #b4bac4); display: grid; place-items: center; cursor: pointer; }
.tp-check svg { width: 11px; height: 11px; fill: none; stroke: var(--edge, #b4bac4); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.tp-check:hover svg { opacity: 1; }
.tp-row.done .tp-check { background: var(--edge, #9aa1ad); }
.tp-row.done .tp-check svg { opacity: 1; stroke: #fff; }
.tp-row.done .tp-body b { text-decoration: line-through; color: var(--ink-3); }
.tp-row.done .tp-bar { opacity: 0.6; }
/* Fortsetzung einer geteilten Aufgabe: gestrichelt, Titel zurückgenommen */
.tp-row.cont .tp-bar { background: transparent; box-shadow: none; border: 1.5px dashed var(--edge, #b4bac4); }
.tp-row.cont .tp-body b { font-weight: 500; color: var(--ink-3); }
.tp-row.cont .tp-body b::before { content: '↳ '; }
/* Freie Lücke: Ablageziel */
.tp-row.free .tp-bar { background: rgba(255,255,255,0.5); box-shadow: none; border: 1.5px dashed #b4bac4; }
.tp-row.free .tp-time { color: var(--ink-3); font-weight: 500; }
.tp-row.free .tp-body b { font-weight: 500; color: var(--ink-3); }
.tp-row.free .tp-body em { display: none; font-style: normal; font-size: 0.8rem; font-weight: 600; color: var(--blue); }
.tp.dragging-on .tp-row.free .tp-bar { border-color: rgba(14,100,112,0.5); }
.tp-row.free.drop-on .tp-bar { background: #ddeff0; border: 2px solid var(--blue); }
.tp-row.free.drop-on .tp-body span { display: none; }
.tp-row.free.drop-on .tp-body em { display: block; margin-top: 2px; }
.tp-row.over .tp-bar { --fill: #fde3e0; --edge: var(--red); }
.tp-row.over .tp-body span { color: var(--red); font-weight: 600; }
.tp-row.end { min-height: 0; margin: 4px 0 10px; align-items: center; }
.tp-row.end .tp-body { padding-top: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.tp-row.end .tp-mark { justify-self: center; position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink-3); }
.tp-row.end .tp-time { padding-top: 0; }

/* Projektfarben wie auf dem Board */
.tp .c-blue { --fill: #bfe3f4; --edge: #3a9fcf; }
.tp .c-amber { --fill: #fbe2a8; --edge: #d9a21b; }
.tp .c-green { --fill: #c3ead4; --edge: #2f9e6e; }
.tp .c-grey { --fill: #dde1e7; --edge: #9aa1ad; }

/* Vorrat */
.tp-pool { padding: 16px; background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(26,26,46,0.06); }
.tp-pool h3 { margin: 0; font-family: var(--display); font-size: 1.05rem; font-weight: 700; }
.tp-hint { margin: 2px 0 10px; font-size: 0.8rem; color: var(--ink-3); line-height: 1.45; }
.tp-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tp-item { width: 100%; display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 9px 10px 9px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.tp-item:hover { border-color: rgba(14,100,112,0.45); background: #f7fbfd; }
.tp-item i { align-self: stretch; border-radius: 2px; background: var(--edge, #9aa1ad); }
.tp-item b { display: block; font-weight: 600; font-size: 0.86rem; line-height: 1.3; }
.tp-item small { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 2px; font-size: 0.74rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tp-item small .proj { color: var(--edge); font-weight: 600; filter: brightness(0.75); }
.tp-item small .stars { color: #c27803; letter-spacing: 1px; }
.tp-item small .fits { color: var(--green-ink); font-weight: 600; }
.tp-item .score { font-size: 0.78rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tp-item.pause { background: var(--paper); border-style: dashed; }
.tp-empty { font-size: 0.82rem; color: var(--ink-3); padding: 6px 2px; }
.tp-reset { margin-top: 12px; border: 0; background: none; padding: 0; font-size: 0.84rem; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Ziehen (nur Maus und Stift; auf Touch antippen und × reichen) */
@media (hover: hover) and (pointer: fine) {
  .tp [data-drag] { cursor: grab; }
}
.tp .dragging { opacity: 0.35; }
.tp.tp-float { position: fixed; z-index: 400; left: 0; top: 0; display: block; padding: 0; background: none; pointer-events: none; }
.tp-ghost { margin: 0; box-shadow: 0 14px 34px rgba(26,26,46,0.2); border-radius: 12px; background: #fff; opacity: 0.95; }
.tp-drop { position: absolute; z-index: 2; left: 60px; right: 0; height: 3px; margin-top: -1px; border-radius: 2px; background: var(--blue); pointer-events: none; }
.tp-drop::before { content: ''; position: absolute; left: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.tp-drop[hidden] { display: none; }
.tp-pool.drop-out { outline: 2px dashed rgba(26,26,46,0.25); outline-offset: 2px; }

@media (max-width: 640px) {
  .tp { grid-template-columns: 1fr; padding: 16px; }
  .tp-row { grid-template-columns: 42px 34px minmax(0, 1fr) 28px; column-gap: 10px; }
  .tp-list::before { left: 58px; }
  .tp-drop { left: 52px; }
}

/* 2026-11-11: .tp-row heißt auch die Zeile im Plan (margin-bottom 6px); die Feature-Zeile braucht den Abschnittsabstand */
.feature-row.tp-row { margin-bottom: var(--section-gap); }
