:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d9dde3;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --danger: #dc2626;
  --venue: #475569;
  --bubble-own: #dbeafe;
  --radius: 12px;
  --tabbar-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --surface: #1b1f25;
    --surface-2: #252a32;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #343a44;
    --accent: #3b82f6;
    --venue: #64748b;
    --bubble-own: #1e3a5f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* iOS-App vom Home-Bildschirm: Ist die Seite kürzer als der Bildschirm, rechnet iOS die Höhe ohne
   Statusleiste und die untere Leiste rutscht um genau so viel nach oben. Darum die Seite immer
   mindestens um die Statusleiste höher machen. Anderswo ist der Wert 0. */
html { min-height: calc(100% + env(safe-area-inset-top)); }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: calc(env(safe-area-inset-top) + .6rem) 1rem .6rem;
  background: #1f2937; color: #fff;
}
.topbar h1 { font-size: 1.15rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar button { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }

main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1rem calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 1rem);
}

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--border);
}
.tabbar a {
  /* Breite nach Beschriftung: lange Namen („Produktionen“) bekommen mehr Platz als „Chat“. */
  flex: 1 1 auto; min-width: 0; padding: 0 1px; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: clamp(.6rem, 2.7vw, .75rem); color: var(--muted); text-decoration: none; position: relative;
}
.tabbar a .ico { font-size: 1.35rem; line-height: 1.2; }
.tabbar a.active { color: var(--accent); font-weight: 600; }
.badge {
  position: absolute; top: 6px; left: calc(50% + 8px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: .7rem; line-height: 18px; text-align: center;
}
/* „!“ für offene Fragen sitzt links vom Symbol, die Zahl ungelesener Nachrichten rechts. */
.badge.alert { left: auto; right: calc(50% + 8px); font-weight: 700; }

button, .btn {
  font: inherit; cursor: pointer;
  padding: .5rem .9rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  text-decoration: none; display: inline-flex; align-items: center; gap: .35rem;
}
button.primary, .btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { color: var(--danger); }
button.link { border: none; background: none; padding: .2rem .3rem; color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem; width: 100%;
}
textarea { resize: vertical; }
label { display: block; margin: .6rem 0 .2rem; font-size: .9rem; color: var(--muted); }
label.check { display: flex; align-items: center; gap: .5rem; color: var(--text); font-size: 1rem; }
label.check input { width: auto; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.row > .shrink { flex: 0 0 auto; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 1rem;
}
.card h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.card h3 { font-size: .95rem; margin: 1rem 0 .4rem; }

/* Filter-Chips im Kalender */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem; border-radius: 999px; font-size: .85rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  user-select: none;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); }
.chip.off { opacity: .45; text-decoration: line-through; }
.chip.on { border-color: var(--c, var(--accent)); box-shadow: inset 0 0 0 1px var(--c, var(--accent)); }

/* FullCalendar an das Farbschema anpassen */
#calendar { background: var(--surface); border-radius: var(--radius); padding: .5rem; border: 1px solid var(--border); }
.fc { --fc-border-color: var(--border); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2);
      --fc-list-event-hover-bg-color: var(--surface-2); --fc-today-bg-color: rgba(37,99,235,.08); font-size: .9rem; }
.fc .fc-toolbar { flex-wrap: wrap; gap: .4rem; }
.fc .fc-toolbar-title { font-size: 1.05rem; }
.fc .fc-button { padding: .3rem .55rem; font-size: .85rem; }
.fc .fc-list-day-cushion { background: var(--surface-2); }
.fc-event.ev-off { opacity: .6; font-style: italic; }
.fc-list-event.ev-off .fc-list-event-title { color: var(--muted); }

/* Chat */
.channel-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .5rem; scrollbar-width: thin; }
.channel-tabs a {
  flex: 0 0 auto; padding: .4rem .9rem; border-radius: 999px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); position: relative;
}
.channel-tabs a.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.channel-tabs .unread { display: inline-block; margin-left: .3rem; background: var(--danger); color: #fff; border-radius: 9px; padding: 0 6px; font-size: .75rem; }
.subtabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin-bottom: .6rem; }
.subtabs a { padding: .4rem 0; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.subtabs a.active { color: var(--text); border-color: var(--accent); font-weight: 600; }

.chat { display: flex; flex-direction: column; height: calc(100dvh - 255px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); min-height: 300px; }
.messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .25rem; }
.msg { max-width: 85%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .45rem .7rem; align-self: flex-start; }
.msg.own { align-self: flex-end; background: var(--bubble-own); }
.msg .meta { font-size: .75rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; }
.msg .meta b { color: var(--c, var(--text)); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .pin { font-size: .75rem; }
.msg .actions { margin-left: auto; }
.msg .actions button { padding: 0 .3rem; border: none; background: none; color: var(--muted); }
.file {
  display: flex; align-items: center; gap: .5rem; margin-top: .3rem; padding: .45rem .6rem;
  border-radius: 10px; background: var(--surface-2); text-decoration: none; color: var(--text);
}
.file span:first-of-type { overflow-wrap: anywhere; min-width: 0; }
.file img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; }
.composer { display: flex; gap: .4rem; align-items: flex-end; padding-top: .5rem; }
.composer textarea { min-height: 42px; max-height: 140px; }
.composer .attach-name { font-size: .8rem; color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .5rem 0; border-bottom: 1px solid var(--border); display: flex; gap: .5rem; align-items: center; }
.list li:last-child { border-bottom: none; }
.list li .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Dienstplan-Vorschau */
.grid-wrap { overflow-x: auto; }
table.grid { border-collapse: collapse; min-width: 1050px; width: 100%; }
table.grid td { min-width: 112px; }
table.grid th, table.grid td { border: 1px solid var(--border); padding: .25rem; vertical-align: top; font-size: .85rem; }
table.grid th { background: var(--surface-2); font-weight: 600; }
table.grid td textarea, table.grid td input, table.grid td select { padding: .25rem .35rem; font-size: .85rem; }
table.grid td textarea { min-height: 2.2rem; }
table.grid .hint { font-size: .75rem; margin-top: .15rem; }
table.grid .hint.ok { color: #16a34a; }
table.grid .hint.warn { color: #d97706; }
table.grid tr.area td:first-child { border-left: 4px solid var(--venue); }
table.grid tr.person td:first-child { border-left: 4px solid var(--accent); }
.warnings { background: #fef3c7; color: #78350f; border-radius: 8px; padding: .5rem .8rem; margin-bottom: .6rem; }
.people-table input[type=color] { width: 42px; height: 34px; padding: 2px; }
.people-table td { padding: .3rem; vertical-align: middle; }
.people-table { width: 100%; border-collapse: collapse; }
.people-table tr { border-bottom: 1px solid var(--border); }

dialog {
  border: none; border-radius: var(--radius); padding: 1.2rem; width: min(520px, calc(100vw - 2rem));
  background: var(--surface); color: var(--text); box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog h2 { margin-top: 0; font-size: 1.15rem; }
dialog .buttons { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }

#toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  background: #111827; color: #fff; padding: .55rem 1rem; border-radius: 10px; z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 2rem);
}
#toast.show { opacity: 1; }
code.url { display: block; padding: .5rem; background: var(--surface-2); border-radius: 8px; font-size: .8rem; overflow-wrap: anywhere; }

@media (min-width: 800px) {
  .chat { height: calc(100dvh - 230px); }
}

/* Untere Leiste mit vielen Reitern */
.tabbar a { font-size: .66rem; min-width: 0; }
.tabbar a .ico { font-size: 1.25rem; }
@media (min-width: 700px) { .tabbar a { font-size: .78rem; } }

/* Gemeinsame Bausteine der Listen */
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .7rem; }
.toolbar input[type=search] { flex: 1 1 220px; }
.avatar {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--c, var(--muted)); color: #fff; font-size: .68rem; font-weight: 700; flex: 0 0 auto;
}
.avatars { display: inline-flex; gap: 2px; }
.tag { display: inline-block; padding: 0 .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; cursor: pointer; border: none; }
.tag:hover { color: var(--text); }
.pill { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.pill.open { background: #dbeafe; color: #1e40af; }
.pill.work { background: #fef3c7; color: #92400e; }
.pill.done { background: #dcfce7; color: #166534; }
.pill.wait { background: #fee2e2; color: #991b1b; }
.flag { color: #dc2626; }
.empty { padding: 1.2rem; text-align: center; color: var(--muted); }
section.group > h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.1rem 0 .4rem; }
details.done-section > summary { cursor: pointer; color: var(--muted); margin: 1rem 0 .4rem; }
.handle { cursor: grab; color: var(--muted); padding: .1rem .2rem; touch-action: none; user-select: none; }
.sortable-ghost { opacity: .35; }

/* To-Dos */
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.todo { display: flex; gap: .5rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .6rem; }
.todo.flagged { border-color: #fca5a5; box-shadow: inset 3px 0 0 #dc2626; }
.todo input[type=checkbox] { width: 20px; height: 20px; margin-top: .1rem; flex: 0 0 auto; accent-color: var(--accent); }
.todo .main { flex: 1; min-width: 0; cursor: pointer; }
.todo .title { overflow-wrap: anywhere; }
.todo.done .title { text-decoration: line-through; color: var(--muted); }
.todo .meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .25rem; font-size: .8rem; color: var(--muted); }
.subs { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .15rem; }
.subs li { display: flex; gap: .4rem; align-items: center; font-size: .9rem; }
.subs li input { width: 16px; height: 16px; margin: 0; }
.subs li.done span { text-decoration: line-through; color: var(--muted); }
.quick-add { display: flex; gap: .4rem; margin-bottom: .7rem; }
.pick { display: flex; flex-wrap: wrap; gap: .35rem; }
.pick .chip input { display: none; }

/* Anhänge */
.atts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; align-items: center; }
.att { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .5rem; border-radius: 8px; background: var(--surface-2); font-size: .85rem; max-width: 100%; }
.att a { display: inline-flex; align-items: center; gap: .3rem; color: var(--text); text-decoration: none; min-width: 0; }
.att a span { overflow-wrap: anywhere; }
.att img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.att-add { font-size: .85rem; padding: .3rem .6rem; }
.att-add.busy { opacity: .5; }

/* Fragen */
.q { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem; margin-bottom: .6rem; }
.q.waiting { border-color: #fca5a5; }
.q .head { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.q .text { margin: .4rem 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; }
.q .replies { border-left: 3px solid var(--border); padding-left: .6rem; margin: .4rem 0; display: grid; gap: .35rem; }
.q .reply .who { font-size: .78rem; color: var(--muted); }
.q .reply .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.q form { display: flex; gap: .4rem; margin-top: .4rem; }
.q .actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }

/* Infos */
.info { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .8rem .9rem; margin-bottom: .6rem; }
.info.ansage { border-color: #f59e0b; box-shadow: inset 4px 0 0 #f59e0b; }
.info.sicherheit { box-shadow: inset 4px 0 0 #dc2626; }
.info h3 { margin: 0; font-size: 1.05rem; display: flex; gap: .4rem; align-items: center; }
.info h3 .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.info .body { white-space: pre-wrap; overflow-wrap: anywhere; margin: .4rem 0 0; }
.info .foot { font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.info.restricted { background: color-mix(in srgb, var(--surface) 92%, #8b5cf6); border-style: dashed; }
.info .restricted-for { color: #8b5cf6; font-weight: 600; }
.info h3 .lock { flex: 0 0 auto; }
fieldset.visibility { border: 1px solid var(--border); border-radius: 10px; padding: .5rem .7rem .6rem; margin: .8rem 0 .2rem; }
fieldset.visibility legend { font-size: .85rem; font-weight: 600; padding: 0 .3rem; }
fieldset.visibility .radio { display: flex; gap: .45rem; align-items: center; margin: .2rem 0; color: var(--text); font-size: 1rem; }
fieldset.visibility .radio input { width: auto; margin: 0; }
fieldset.visibility .pick { margin-top: .4rem; }

/* Bestellwünsche */
.order { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .65rem .8rem; margin-bottom: .5rem; display: grid; gap: .35rem; }
.order .top { display: flex; gap: .5rem; align-items: baseline; cursor: pointer; }
.order .top .what { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.order .qty { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.order .who { display: flex; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.order .notes { font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.order .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.order .actions button { padding: .35rem .7rem; font-size: .9rem; }
.order.done .what { text-decoration: line-through; color: var(--muted); }
.order-add { display: grid; grid-template-columns: 1fr 7rem auto; gap: .4rem; margin-bottom: .8rem; }
@media (max-width: 480px) { .order-add { grid-template-columns: 1fr 5.5rem auto; } }
table.sp-grid { min-width: 720px; }
table.sp-grid td { min-width: 0; }
table.sp-grid td:first-child { width: 2rem; text-align: center; }
table.sp-grid input[type=time] { width: 6.5rem; }
.info h3 .link { font-size: .85rem; font-weight: 500; flex: 0 0 auto; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.chips .chip-row + .chip-row { margin-top: .45rem; }
.chip-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 4.6rem; }
#chips { display: block; }
.attach-preview { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.attach-preview:empty { display: none; }
.attach-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.attach-preview span { overflow-wrap: anywhere; min-width: 0; }

/* Rückgängig-Knopf nach dem Löschen */
.undo-btn {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); z-index: 60;
  width: 56px; height: 56px; padding: 0; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.3);
  display: grid; place-items: center; animation: undo-in .2s ease-out;
}
.undo-btn svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.undo-btn .undo-arrow { stroke-width: 2.2; transform-origin: 24px 24px; animation: undo-spin 1.2s linear infinite; }
.undo-btn .undo-ring { stroke-width: 3; stroke: rgba(255,255,255,.85); stroke-dasharray: 132; stroke-dashoffset: 0;
  transform: rotate(-90deg); transform-origin: 24px 24px; animation: undo-countdown var(--undo-ms, 5000ms) linear forwards; }
@keyframes undo-spin { to { transform: rotate(-360deg); } }
@keyframes undo-countdown { to { stroke-dashoffset: 132; } }
@keyframes undo-in { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .undo-btn .undo-arrow { animation: none; } }

.ev-notes { white-space: pre-wrap; background: var(--surface-2, rgba(127,127,127,.08)); border-radius: 8px; padding: .5rem .6rem; }
.plan-diff { color: #b45309; margin-top: -.3rem; }
@media (prefers-color-scheme: dark) { .plan-diff { color: #fbbf24; } }

/* Uhrzeit-Auswahl: Stunde : Minuten (00/15/30/45 oder individuell) */
.tp { display: inline-flex; align-items: center; gap: .25rem; flex-wrap: nowrap; }
.tp > select, .tp > input { flex: 0 0 auto; width: auto; }
.tp .tp-h { width: 4.4rem; }
.tp .tp-x { width: 4.2rem; }
.tp .tp-m { width: 5.6rem; }
.row > .time { flex: 0 0 auto; } /* Datum und Uhrzeit: lieber umbrechen als quetschen */
.row > .date { min-width: 9.5rem; }
.tp-sep { font-weight: 600; }

/* --- Produktionen --- */
.prod-card, .prod-hit { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .75rem .9rem; margin-bottom: .6rem; color: var(--text); text-decoration: none; }
.prod-card-head { display: flex; gap: .5rem; align-items: center; justify-content: space-between; font-size: 1.1rem; margin-bottom: .2rem; }
.prod-card > div + div { margin-top: .2rem; }
.prod-archive summary { cursor: pointer; color: var(--muted); margin: .6rem 0; }
.prod-status { font-size: .72rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.prod-status.st-vorbereitung { background: #fef3c7; color: #92400e; }
.prod-status.st-laeuft { background: #dcfce7; color: #166534; }
@media (prefers-color-scheme: dark) {
  .prod-status.st-vorbereitung { background: #422006; color: #fcd34d; }
  .prod-status.st-laeuft { background: #052e16; color: #86efac; }
}
.back { display: inline-block; margin-bottom: .4rem; color: var(--muted); text-decoration: none; }
.prod-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.prod-links h3, .prod-dates h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .4rem 0; }
.link-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; margin-bottom: .5rem; }
.link-tile { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.link-tile a { flex: 1; min-width: 0; display: flex; gap: .6rem; align-items: center; padding: .6rem .7rem; color: var(--text); text-decoration: none; }
.link-tile a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.link-tile b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-ico { font-size: 1.6rem; }
.small-btn { font-size: .85rem; padding: .3rem .7rem; }
.prod-dates ul { margin: 0 0 .6rem; padding-left: 1.1rem; font-size: .9rem; }
.phase-tabs { display: flex; gap: .3rem; overflow-x: auto; margin: 1rem 0 .7rem; padding-bottom: .2rem; }
.phase-tabs a { flex: 0 0 auto; padding: .45rem .75rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .9rem; background: var(--surface); }
.phase-tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.phase-tabs .cnt { font-size: .72rem; opacity: .75; }
.page { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .6rem; }
.page.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
.page header { display: flex; gap: .4rem; align-items: center; }
.page header h3 { flex: 1; margin: 0; font-size: 1.02rem; }
.date-badge { font-size: .75rem; font-weight: 600; background: var(--surface-2); padding: .1rem .4rem; border-radius: 6px; vertical-align: middle; }
.wiki { margin-top: .35rem; overflow-wrap: anywhere; }
.wiki p { margin: .25rem 0; }
.wiki h4 { margin: .6rem 0 .2rem; font-size: .9rem; }
.wiki ul { margin: .2rem 0; padding-left: 1.2rem; }
.wiki ul.wk-checks { list-style: none; padding-left: 0; }
.wiki .wk-checks label { display: flex; gap: .45rem; align-items: flex-start; color: var(--text); font-size: 1rem; margin: .15rem 0; }
.wiki .wk-checks input { width: auto; margin-top: .25rem; }
.wiki .wk-checks li.done span { text-decoration: line-through; color: var(--muted); }
.wk-link.known { display: inline-block; padding: .05rem .45rem; border-radius: 6px; background: var(--surface-2); text-decoration: none; font-weight: 600; }
.wiki .hint { color: var(--muted); font-style: italic; cursor: text; }
.wiki .hint .tap { font-style: normal; color: var(--accent); }
.page footer { display: flex; justify-content: space-between; gap: .5rem; margin-top: .3rem; }
.page.editing { border-color: var(--accent); }
.editor textarea { font-family: inherit; line-height: 1.45; }
.editor .row input[name=title] { font-weight: 600; }
.fmt-help code { font-size: .8rem; background: var(--surface-2); padding: 0 .25rem; border-radius: 4px; }
.page-add { margin-top: .4rem; }
