@font-face { font-family: "Myriad Pro"; src: url("/assets/MyriadPro-Light-e3dc24ab.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Myriad Pro"; src: url("/assets/MyriadPro-Regular-f36b9a76.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Myriad Pro"; src: url("/assets/MyriadPro-Semibold-0c1e3ad4.ttf") format("truetype"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Myriad Pro"; src: url("/assets/MyriadPro-It-69f7fa1c.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
/* Old Tagebuch look: brand colour from Current.brand via --brand-color on <body>. */
body { --line-color: color-mix(in srgb, var(--brand-color) 65%, #000); --player-color: color-mix(in srgb, var(--brand-color) 16%, #fff); }

body {
  background: linear-gradient(#fff 25%, color-mix(in srgb, var(--brand-color) 22%, #fff)) fixed;
  min-height: 100vh;
  color: #333;
  font-family: "Myriad Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.page { max-width: 1500px; margin: 0 auto; padding: 0 1rem 1rem; }

.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-top: 1rem; }
.brand-account { color: var(--line-color); font-size: 1.15rem; padding-top: .5rem; }
.current-person { color: #777; font-size: .85rem; }
.brand-side { width: var(--logo-w); margin-bottom: -2.4rem; text-align: center; }
.brand-name { color: var(--brand-color); font-size: 2rem; font-weight: 300; min-height: 3rem; }
.brand-logo { width: 100%; height: auto; display: block; }

/* Old menu frame: the top line stops at the logo, the bottom line runs on under it and ends at the session button. */
/* --session-right fixes where every session button ends (under the logo dot); wider buttons grow to the left. */
/* The session button is centred on the 2px bottom line at any zoom or font size. */
.page { --logo-w: 300px; --session-right: 65px; }
.brand-nav {
  position: relative; display: flex; flex-wrap: wrap; gap: .25rem; align-items: center;
  border: 2px solid var(--line-color); border-right: 0; border-radius: 2rem 0 0 2rem;
  padding: .45rem 1rem; margin: 10px calc(var(--logo-w) - 1rem) 2.2rem 0; min-height: 2.9rem;
}
.brand-nav::after {
  content: ""; position: absolute; left: 100%; top: 100%; height: 0; border-bottom: 2px solid var(--line-color);
  width: calc(var(--logo-w) - 1rem - var(--session-right));
}
.brand-nav .nav-link { color: #555; font-weight: 600; font-size: 1.05rem; padding: .1rem .7rem; }
.brand-nav .nav-link.active, .brand-nav .nav-link:hover { color: var(--brand-color); }
.session-button { position: absolute; z-index: 1; display: flex; gap: .5rem; bottom: -1px; transform: translateY(50%); right: calc(var(--session-right) - var(--logo-w) + 1rem); }
.session-button form { margin: 0; }
.btn-session {
  display: block; min-width: 140px; padding: .35rem 1.25rem; font-weight: 700; color: #fff; border: 1px solid var(--line-color); border-radius: .4rem;
  background: linear-gradient(color-mix(in srgb, var(--brand-color) 70%, #fff), var(--brand-color) 55%, var(--line-color));
  box-shadow: 0 2px 4px #0003;
}
.btn-session:hover { color: #fff; filter: brightness(1.08); }

.page-body.with-sidebar { display: grid; grid-template-columns: 230px 1fr; gap: 1.5rem; }
.incident-column { border-right: 2px dotted #ccc; padding-right: 1rem; }
.incident-column h2 { color: var(--line-color); font-size: 1.2rem; font-weight: 700; }
.page-main { min-width: 0; }
.settings-menu { display: flex; flex-direction: column; gap: .15rem; }
.settings-menu a { color: #555; font-weight: 600; text-decoration: none; padding: .35rem .75rem; border-radius: 1rem; }
.settings-menu a:hover { color: var(--brand-color); }
.stt-engine:has(#account_stt_engine_local:checked) .stt-external-fields { display: none; }
.stt-external-warning { color: #8a5a00; }
.settings-menu a.active { color: #fff; background: var(--brand-color); }

.brand-heading, .page-main h1 { color: var(--brand-color); }
/* Old page bottom: white card with rounded corners, footer frame straddling its lower edge. */
.page-card { display: flow-root; background: #fff; border-radius: 1.25rem; box-shadow: 0 0 1rem rgb(0 0 0 / 8%); padding-bottom: 0; margin-top: 1rem; margin-bottom: 3rem; }
.brand-footer {
  position: relative; margin: 2rem 2rem -1.4rem; padding: .55rem 1rem; background: #fff;
  border: 2px solid var(--line-color); border-radius: 1rem; color: #666; text-align: center; font-size: .9rem;
}
.brand-footer a { color: #666; font-weight: 700; text-decoration: none; }
.brand-footer a:hover { color: var(--brand-color); }
.btn-brand { background: linear-gradient(var(--icon-light), var(--icon-dark)); border-color: var(--icon-dark); color: #fff; }
.btn-brand:hover { background: var(--player-color); color: var(--line-color); }

@media (max-width: 800px) {
  .page-header { flex-direction: column-reverse; align-items: stretch; }
  .page { --logo-w: 200px; }
  .brand-side { margin: 0 auto .5rem; }
  .brand-nav { margin-top: 0; margin-right: 0; margin-bottom: 1rem; border-right: 2px solid var(--line-color); border-radius: 2rem; }
  .brand-nav::after { display: none; }
  .session-button { position: static; margin-left: auto; }
  .page-body.with-sidebar { grid-template-columns: 1fr; }
  .incident-column { border-right: 0; border-bottom: 2px dotted #ccc; padding: 0 0 1rem; }
}


/* Start page (lead catcher) */
.login-box, .call-box { border: 2px solid var(--line-color); border-radius: 1rem; padding: .9rem 1rem; margin-bottom: 1.2rem; background: #fff8; }
.call-box { text-align: center; }
.call-box a { color: var(--brand-color); text-decoration: none; }
.start-pitch h1 { font-size: 2rem; }
.start-pitch .lead-in { color: #666; font-weight: 700; }
.start-steps { font-size: 1.1rem; color: #666; }
.start-steps h2 { font-size: 1.3rem; color: var(--brand-color); margin: .6rem 0 .2rem; }
.start-steps ul { font-size: 1rem; }
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1rem 0; }
.insight { border: 2px solid var(--line-color); border-radius: 1rem; padding: 1rem; }
.insight h2 { font-size: 1.25rem; color: var(--brand-color); }
.start-cta { display: block; margin-top: 1rem; padding: .8rem; border-radius: 1rem; text-align: center; font-weight: 700; font-size: 1.2rem; color: #fff; background: var(--brand-color); text-decoration: none; }
.advantages { list-style: none; padding: 0; }
.advantages li { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Flash messages as toasts bottom right, signal colour as left border (as in the Abwesenheitsmanager). */
.flash-toast { background: #fff; border-left: 4px solid #17a2b8; }
.flash-toast .toast-header { background: transparent; color: var(--brand-color); }
.flash-toast-success { border-left-color: #2e9d3a; }
.flash-toast-danger { border-left-color: #c0392b; }

/* Nachrichten */
.btn-outline-brand { border: 1px solid var(--brand-color); color: var(--brand-color); background: #fff; }
.btn-outline-brand:hover { background: var(--player-color); color: var(--line-color); }
.entries-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.entries-toolbar h1 { margin: 0 .5rem 0 0; }
.entries-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.entries-tabs a { padding: .3rem .75rem; border: 1px solid #ddd; border-radius: 1rem; background: #fff; color: #666; font-size: .9rem; text-decoration: none; }
.entries-tabs a:hover { border-color: var(--brand-color); color: var(--brand-color); }
.entries-tabs a.active { background: var(--brand-color); border-color: var(--brand-color); color: #fff; }
.entries-search { display: flex; gap: .5rem; margin-left: auto; }
.entries-bulk { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem .75rem; margin-bottom: .75rem;
  border: 1px solid color-mix(in srgb, var(--brand-color) 30%, #fff); border-radius: .5rem; background: color-mix(in srgb, var(--brand-color) 5%, #fff); }
.entries-bulk[hidden] { display: none; }
.entries-bulk-group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.entries-bulk .incident-pick { width: 18rem; max-width: 100%; }
.entry-week > h2 { color: var(--brand-color); margin: 1rem 0 .5rem; }
.entry { display: grid; grid-template-columns: auto 14rem 1fr auto; gap: .75rem 1rem; align-items: start; padding: .75rem 1rem; margin-bottom: .75rem;
  border: 1px solid #e5d5cf; border-radius: .5rem; background: #fff; }
.entry-select { margin-top: 2.2rem; }
.entry-trashed { grid-template-columns: 14rem 1fr auto; }
.entries-search input { min-width: 16rem; }
.entry-time { font-weight: 600; }
.entry-duration { font-size: .85rem; color: #666; }
.entry-caller { font-weight: 600; font-size: 1.1rem; margin: .25rem 0; overflow-wrap: anywhere; }
.audio-player { margin-top: .5rem; }
.audio-player audio { display: block; width: 100%; height: 2rem; border-radius: 1rem; background: var(--player-color); }
.audio-player audio::-webkit-media-controls-enclosure { border-radius: 1rem; background: var(--player-color); }
.audio-player audio::-webkit-media-controls-panel { background: var(--player-color); }
.audio-player audio:not([controls]) { display: none; }
.audio-player audio::-webkit-media-controls-mute-button, .audio-player audio::-webkit-media-controls-volume-slider { display: none; }
.audio-controls { display: flex; align-items: center; gap: .35rem; height: 2rem; padding: 0 .4rem 0 .2rem; border-radius: 1rem;
  background: var(--player-color); color: var(--line-color); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-color) 30%, #fff); font-size: .8rem; font-variant-numeric: tabular-nums; }
.audio-controls[hidden] { display: none; }
.audio-controls button { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; padding: 0; border: 0;
  border-radius: 50%; background: transparent; color: inherit; }
.audio-controls button:hover, .audio-controls button:focus-visible { background: color-mix(in srgb, var(--brand-color) 25%, transparent); outline: none; }
.audio-controls button::before { content: ""; width: .95rem; height: .95rem; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.audio-play { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 2.5v11l9.5-5.5z'/%3E%3C/svg%3E"); }
.audio-player.is-playing .audio-play { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 2.5h3v11h-3zM9.5 2.5h3v11h-3z'/%3E%3C/svg%3E"); }
.audio-seek { flex: 1; min-width: 2.5rem; height: 4px; margin: 0; border-radius: 2px; appearance: none; cursor: pointer;
  background: linear-gradient(to right, var(--line-color) var(--progress, 0%), color-mix(in srgb, var(--line-color) 25%, transparent) var(--progress, 0%)); }
.audio-seek::-webkit-slider-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--line-color); appearance: none; }
.audio-seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--line-color); }
.audio-seek::-moz-range-track { background: transparent; }
.audio-seek:focus-visible { outline: 2px solid var(--line-color); outline-offset: 3px; }
.entry-add-contact { display: block; font-size: .85rem; color: var(--brand-color); }
.entry-form { display: grid; grid-template-columns: 1fr 14rem; gap: .75rem; grid-column: span 1; }
.entry-side { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }
.entry-assigned { width: 100%; background: #f2f8f2; border: 1px solid #c7e0c7; border-radius: 6px; padding: .35rem .5rem; overflow-wrap: anywhere; }
.entry-assigned-actions { white-space: nowrap; }
.entry-assigned .btn-link { padding: 0; font-size: inherit; vertical-align: baseline; color: var(--brand-color); }
.entry-suggestion { width: 100%; background: #eef5fd; border: 1px solid #c9def5; border-radius: 6px; padding: .35rem .5rem; overflow-wrap: anywhere; }
.entry-suggestion-reasons { color: #666; font-size: .85em; }
.entry-suggestion-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.incident-pick { position: relative; width: 100%; }
.incident-pick-list { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 2px; max-height: 18rem; overflow-y: auto;
  background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 4px 12px rgb(0 0 0 / 15%); }
.incident-pick-list[hidden] { display: none; }
.incident-pick-option { display: block; width: 100%; padding: .4rem .6rem; border: 0; border-bottom: 1px solid #eee; background: none;
  color: inherit; font-size: .9rem; text-align: left; overflow-wrap: anywhere; }
.incident-pick-option:last-child { border-bottom: 0; }
.incident-pick-option:hover, .incident-pick-option[aria-selected=true] { background: color-mix(in srgb, var(--brand-color) 12%, #fff); }
.incident-pick-option small { color: #666; }
.incident-pick-new { color: var(--brand-color); font-weight: 600; }
.incident-pick-empty { padding: .4rem .6rem; color: #666; font-size: .9rem; }
.entry-actions { display: flex; flex-direction: column; gap: .5rem; }
.entry-actions form { margin: 0; }
/* Nachrichten: Vorgang on top of the right column, the buttons in one row under it */
.entry-week .entry { grid-template-columns: auto 14rem 1fr 16rem; }
.entry-week .entry > .entry-form { display: contents; }
.entry-week .entry-select, .entry-week .entry-meta, .entry-week .entry-text { grid-row: 1 / span 2; }
.entry-week .entry-side { grid-column: 4; grid-row: 1; align-items: stretch; }
.entry-week .entry-actions { grid-column: 4; grid-row: 2; flex-direction: row; justify-content: flex-end; }
/* …on the player's line: the player sits at the bottom of its column, the buttons centred on its 2rem */
.entry-week .entry-meta { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; }
.entry-week .entry-meta .audio-player { width: 100%; margin-top: auto; padding-top: .5rem; }
.entry-week .entry-actions { align-self: end; align-items: center; height: 2rem; }
.entry-incident { grid-column: 1 / -1; margin: 0; }
.entry-select ~ .entry-incident { grid-column: 2 / -1; }
.entry-edited { grid-column: 2 / -1; margin: 0; }
.entry-auto { display: inline-block; margin: .25rem .5rem 0 0; padding: .05rem .5rem; border-radius: 1rem; background: #fdecaa; color: #7a5c00; font-size: .8rem; }
.note-marks-wrap { position: relative; width: 100%; }
.note-marks-wrap textarea, .note-marks { scrollbar-gutter: stable; }
.note-marks-wrap textarea { position: relative; background: transparent; }
.note-marks { position: absolute; inset: 0; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; color: transparent; pointer-events: none; }
mark.stt-unsure, mark.stt-very-unsure { padding: 0; border-radius: 2px; color: inherit; }
.note-marks mark { color: transparent; }
mark.stt-unsure { background: #ffe0a8; }
mark.stt-very-unsure { background: #ffb3b3; }
.entries-pages { display: flex; justify-content: space-between; margin-top: 1rem; }
@media (max-width: 900px) {
  .entry { grid-template-columns: auto 1fr; }
  .entry-form { grid-template-columns: 1fr; grid-column: 1 / -1; }
  .entry-side { align-items: stretch; }
  .entry-actions { flex-direction: row; grid-column: 1 / -1; }
  .entry-week .entry { grid-template-columns: auto 1fr; }
  .entry-week .entry-select, .entry-week .entry-meta { grid-row: auto; }
  .entry-week .entry-text, .entry-week .entry-side, .entry-week .entry-actions { grid-column: 1 / -1; grid-row: auto; }
  .entry-week .entry-actions { align-self: auto; height: auto; }
}
/* Vorgänge */
.incident-list a { display: block; padding: .4rem .5rem; border-bottom: 1px solid #ddd; color: inherit; text-decoration: none; }
.incident-list a.active, .incident-list a:hover { background: color-mix(in srgb, var(--brand-color) 15%, #fff); border-left: 3px solid var(--brand-color); }
.incident-status { font-weight: 400; color: #555; background: #eee; }
.incident-status-open { color: #1d6b2f; background: #dff3e3; }
.incident-status-auto_closed { color: #7a5a00; background: #fff3cd; }
.incident-new { margin-top: .8rem; }
.incident-new .form-label { color: var(--brand-color); font-weight: 700; }
.incident-head { border: 1px solid #ddd; border-radius: .75rem; padding: .8rem 1rem; background: #fff; margin-bottom: 1rem; }
.incident-title { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.incident-actions { display: flex; gap: .4rem; margin-left: auto; }
.incident-body.with-panel { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 1rem; }
.incident-panel { border: 1px solid #ddd; border-radius: .75rem; padding: .8rem; background: #fff; align-self: start; }
.panel-windows { display: flex; gap: .4rem; margin-bottom: .5rem; }
.panel-windows a { padding: .1rem .5rem; border-radius: 1rem; border: 1px solid #ccc; color: inherit; text-decoration: none; }
.panel-windows a.active { background: var(--brand-color); color: #fff; border-color: var(--brand-color); }
.panel-entry { display: flex; gap: .4rem; padding: .3rem 0; border-bottom: 1px solid #eee; font-size: .85rem; }
.panel-suggestions { background: #f6f8fb; border-radius: .5rem; padding: .3rem .5rem; }
.panel-reason { display: inline-block; margin-top: .15rem; padding: 0 .4rem; border-radius: 1rem; background: #fff3cd; color: #664d03; font-size: .75rem; }
.incident-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.incident-chip { background: #fff; color: inherit; border: 1px solid var(--brand-color); font-weight: 500; text-decoration: none; }
a.incident-chip:hover { background: var(--brand-color); color: #fff; }
@media (max-width: 1100px) { .incident-body.with-panel { grid-template-columns: minmax(0, 1fr); } }
.incident-trashed { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid #ddd; }
.trash-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.trash-columns h2 { color: var(--line-color); font-size: 1.2rem; font-weight: 700; }
.trash-incidents { border-right: 2px dotted #ccc; padding-right: 1rem; }
.trash-facts { list-style: none; padding: 0; margin: .25rem 0; font-size: .85rem; color: #666; }
.trash-note { font-size: .9rem; margin: .25rem 0 0; }
.trash-entries .entry-trashed { grid-template-columns: 11rem 1fr auto; }
.trash-columns .entry-actions form { width: 11.5rem; }
.trash-columns .entry-actions .btn { width: 100%; }
@media (max-width: 1100px) {
  .trash-columns { grid-template-columns: 1fr; }
  .trash-incidents { border-right: 0; border-bottom: 2px dotted #ccc; padding: 0 0 1rem; }
}
.incident-timeline .entry { grid-template-columns: 11rem 1fr auto; }
.incident-timeline .entry-form { grid-template-columns: 1fr; }
.incident-timeline .entry-side { flex-direction: row; align-items: center; justify-content: flex-end; }
.incident-timeline .entry-edited { grid-column: 1 / -1; }

.timeline-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; }
.timeline-filter a { margin-right: .6rem; }
.timeline-filter a.active { font-weight: bold; text-decoration: none; }
.timeline-count { background: var(--brand-color); color: #fff; font-weight: normal; vertical-align: text-top; }
.image-upload { margin-left: auto; }
.image-drop-head { border: 2px dashed var(--brand-color); border-radius: .5rem; padding: .25rem .6rem; }
.image-drop-head.dragging { background: var(--player-color); }
.image-drop-head .image-upload { margin-left: 0; }
.incident-timeline.dragging { outline: 2px dashed currentColor; outline-offset: .3rem; border-radius: .75rem; }
.incident-image { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: .8rem; padding: .6rem 0; border-top: 1px solid #eee; margin: 0; }
.incident-image img { max-width: min(10rem, 100%); max-height: 12rem; border-radius: .5rem; cursor: zoom-in; }
.incident-image-actions { display: flex; gap: .3rem; align-items: start; }
.incident-image-actions .btn { white-space: nowrap; }
.incident-image-actions .btn-outline-brand:has(> .legacy-icon:only-child, > .legacy-icon:first-child + .icon-text:last-child) { border-color: transparent; background: none; }
.incident-image-note { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .incident-image { grid-template-columns: minmax(0, 1fr) auto; }
  .incident-image > .entry-time, .incident-image figcaption, .incident-image .incident-image-note-form { grid-column: 1 / -1; }
}
.incident-image figcaption { grid-column: 2; }
.incident-weather { display: grid; grid-template-columns: 11rem 1fr auto; gap: .8rem; padding: .6rem 0; border-top: 1px solid #eee; margin: 0; }
.incident-weather img { max-width: min(9rem, 100%); max-height: 12rem; border: 1px solid #cfd8e3; border-radius: .35rem; cursor: zoom-in; display: block; }
.incident-weather-hidden { display: grid; grid-template-columns: 11rem 1fr; gap: .8rem; padding: .4rem 0; border-top: 1px solid #eee; }
.weather-toggle { margin-left: auto; }
.incident-deletion { display: grid; grid-template-columns: 11rem 1fr; gap: .8rem; padding: .4rem 0; border-top: 1px solid #eee; }

/* Ablauf as a vertical timeline: time left of the line, a dot per item coloured by kind, a marker per day. */
.timeline { --time-w: 2.6rem; --gap: 1rem; position: relative; padding-left: calc(var(--time-w) + 2 * var(--gap)); margin-top: .5rem; }
.timeline::before { content: ""; position: absolute; left: calc(var(--time-w) + var(--gap) - 1px); top: .3rem; bottom: .3rem; width: 2px;
  background: color-mix(in srgb, var(--brand-color) 35%, #fff); }
.timeline-day { position: relative; width: fit-content; margin: .9rem 0 .5rem calc(-1 * var(--gap) - 2.5rem); padding: .15rem .75rem;
  border-radius: 1rem; background: var(--brand-color); color: #fff; font-size: .8rem; font-weight: 600; }
.timeline-day:first-child { margin-top: .2rem; }
.timeline > .timeline-item { position: relative; margin: 0 0 .5rem; }
.timeline-time { position: absolute; right: calc(100% + var(--gap) + .5rem); top: .65rem; width: var(--time-w); text-align: right; font-weight: 600; font-size: .9rem; }
.timeline > .timeline-item::before { content: ""; position: absolute; left: calc(-1 * var(--gap) - 6px); top: .75rem; width: 12px; height: 12px;
  border-radius: 50%; border: 2px solid var(--brand-color); background: #fff; }
.timeline > .timeline-nachricht::before { background: var(--brand-color); }
.timeline > .timeline-bild::before { border-color: #2e9d3a; background: #dff3e3; }
.timeline > .timeline-wetter::before { border-color: #5b8db8; background: #dbe9f5; }
.timeline > .timeline-vermerk::before { left: calc(-1 * var(--gap) - 4px); top: .45rem; width: 8px; height: 8px; border-color: #bbb; }
.timeline > .timeline-vermerk { display: block; padding: .15rem 0; border-top: 0; }
.timeline-vermerk .timeline-time { top: .15rem; font-weight: 400; color: #888; }
.timeline > .timeline-wetter { grid-template-columns: 9rem 1fr auto; align-items: center; padding: .1rem 0; border-top: 0; }
.timeline > .timeline-wetter .timeline-time { top: .3rem; }
.timeline > .timeline-wetter::before { top: .4rem; }
.timeline > .timeline-bild { grid-template-columns: 10rem 1fr; align-items: start; padding: .5rem .75rem; border: 1px solid #e5d5cf; border-radius: .5rem; background: #fff; }
.timeline-bild > :not(.timeline-time) { grid-column: 2; }
.timeline-bild > .timeline-thumb { grid-column: 1; grid-row: 1 / span 3; }
@media (max-width: 900px) {
  .timeline { --time-w: 2.4rem; --gap: .8rem; }
  .timeline-time { font-size: .8rem; }
  .timeline > .timeline-wetter { grid-template-columns: 7rem 1fr; }
  .timeline > .timeline-wetter .incident-image-actions { grid-column: 2; }
}
.incident-share { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.shared-entry { display: grid; grid-template-columns: 11rem 1fr; gap: .8rem; padding: .4rem 0; border-top: 1px solid #eee; }
.incident-pdf { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }

textarea.autogrow {
  overflow-y: hidden;
  resize: none;
}

.incident-image-note-form {
  grid-column: 2 / -1;
}

/* Link page: messages and photos over the whole width, each note below its photo. */
.timeline > .shared-entry { display: block; border-top: 0; }
.shared-image { margin: 0 0 .8rem; }
.timeline > .shared-image { display: block; padding: .5rem .75rem; border: 1px solid #e5d5cf; border-radius: .5rem; background: #fff; }
.shared-image img { display: block; max-width: 100%; max-height: 28rem; border-radius: .5rem; }
.shared-image .incident-image-note { margin-top: .4rem; }
.gallery-body { position: relative; display: flex; justify-content: center; align-items: center; min-height: 50vh; padding: .5rem; background: #111; }
.gallery-body img { display: block; max-width: 100%; max-height: 80vh; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%; background: #fffd; color: #333; font-size: 2rem; line-height: 1; }
.gallery-nav:hover { background: #fff; }
.gallery-prev { left: .75rem; }
.gallery-next { right: .75rem; }
.gallery-note { display: flex; flex-wrap: nowrap; gap: .5rem; align-items: center; }
.gallery-note[hidden] { display: none; }
.gallery-note textarea { flex: 1; resize: vertical; }

/* Old icons from the legacy image sets, next to the button text. */
.legacy-icon { width: 20px; height: 20px; flex: none; }
:is(.btn, a, label):has(> .legacy-icon) { display: inline-flex; align-items: center; gap: .35em; }
/* Icon buttons are as high as a field of their size and framed in the icon's own gradient (light top, dark bottom). */
body { --icon-light: #0093d8; --icon-dark: #004a9b; }
body[data-icon-set="braun"] { --icon-light: #e7bd85; --icon-dark: #795f32; }
body[data-icon-set="orange"] { --icon-light: #f05e07; --icon-dark: #9b1a15; }
.btn:has(> .legacy-icon) {
  --btn-fill: var(--bs-btn-bg);
  --btn-fill-image: linear-gradient(var(--btn-fill), var(--btn-fill));
  min-height: calc(1.5em + .75rem + 2px); padding-block: calc(.375rem - 1px); border: 2px solid transparent;
  background: var(--btn-fill-image) padding-box, linear-gradient(var(--icon-light), var(--icon-dark)) border-box;
}
.btn-sm:has(> .legacy-icon) { min-height: calc(1.5em + .5rem + 2px); padding-block: calc(.25rem - 1px); }
.btn:has(> .legacy-icon):hover { --btn-fill: var(--bs-btn-hover-bg); }
.btn-brand:has(> .legacy-icon) { --btn-fill-image: linear-gradient(var(--icon-light), var(--icon-dark)); }
.btn-brand:has(> .legacy-icon):hover { --btn-fill: var(--player-color); --btn-fill-image: linear-gradient(var(--btn-fill), var(--btn-fill)); color: var(--line-color); }
.btn-outline-brand:has(> .legacy-icon) { --btn-fill: #fff; }
.btn-outline-brand:has(> .legacy-icon):hover { --btn-fill: var(--player-color); color: var(--line-color); }
.btn:has(> .legacy-icon:only-child, > .legacy-icon:first-child + .icon-text:last-child) { padding: 1px; line-height: 1; justify-content: center; }
.btn:has(> .legacy-icon:only-child, > .legacy-icon:first-child + .icon-text:last-child) > .legacy-icon { width: 32px; height: 32px; }
.btn-sm:has(> .legacy-icon:only-child, > .legacy-icon:first-child + .icon-text:last-child) > .legacy-icon { width: 25px; height: 25px; }
.btn:disabled > .legacy-icon { opacity: .4; }
.btn > .icon-text { padding-inline: .25em .6em; }
/* Message row: the icons stand apart, so no frame and no fill */
.entry-week .entry-actions .btn:has(> .legacy-icon:only-child, > .legacy-icon:first-child + .icon-text:last-child) { border: 0; background: none; }
.entry-week .entry-actions .btn:has(> .legacy-icon:only-child, > .legacy-icon:first-child + .icon-text:last-child):hover { opacity: .8; }
.incident-sidebar-pages > div { display: flex; gap: .25rem; }
.page-arrow { display: inline-flex; }
.page-arrow .legacy-icon { width: 28px; height: 28px; }
span.page-arrow { cursor: default; }
