
/* =========================================================
   TIMELINE – TERMINE, AUFGABEN, KALENDER
   Aufgeräumte Gesamtdatei
   ========================================================= */

/* ---------------------------------------------------------
   1. GRUNDLAGEN UND FARBEN
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}

:root {
    --bg: #061326;
    --panel: #071a30;
    --panel2: #0a203b;
    --line: #1d3858;
    --text: #e5efff;
    --muted: #91a9c9;
    --blue: #167cf5;
    --green: #10b981;
    --purple: #9b4dff;
    --amber: #e6a536;
    --slate: #86a4d5;
}

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(
        ellipse at 45% 0%,
        #0b2340 0%,
        #061326 52%,
        #04101f 100%
    );
    color: var(--text);
    font: 14px/1.4 Inter, ui-sans-serif, system-ui, -apple-system,
        "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
    color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #50a5ff;
    outline-offset: 2px;
}

.app-shell {
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ---------------------------------------------------------
   2. KOPFZEILE
   --------------------------------------------------------- */

.topbar {
    height: 71px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    background: rgba(5, 19, 38, .9);
    border-bottom: 1px solid #1a3555;

    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 270px;
}

.brand-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: none;

    border-radius: 10px;
    background: linear-gradient(135deg, #347eff, #1538d8);
    font-size: 27px;
    box-shadow: 0 6px 18px #1155e655;
}

.brand h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: .1px;
}

.brand p {
    margin: 3px 0 0;
    color: #adc3e2;
    font-size: 13px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---------------------------------------------------------
   3. BUTTONS UND ANSICHTSWECHSEL
   --------------------------------------------------------- */

.btn,
.icon-btn,
.view-switch button {
    min-height: 41px;
    padding: 10px 17px;

    border: 1px solid #25476e;
    border-radius: 11px;
    background: #0b1e37;

    transition:
        background .18s,
        border-color .18s,
        transform .18s;
}

.btn:hover,
.icon-btn:hover,
.view-switch button:hover {
    border-color: #3987e9;
    background: #102b4d;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(115deg, #2787ff, #155ce7);
    border-color: #227bff;
    box-shadow: 0 5px 16px #0755db25;
}

.btn-primary:hover {
    background: linear-gradient(115deg, #4598ff, #286cf0);
}

.btn-outline {
    background: #091a30;
}

.icon-btn {
    width: 43px;
    padding: 0;
    font-size: 20px;
    background: transparent;
    border-color: transparent;
}

.view-switch {
    display: flex;
    overflow: hidden;

    border: 1px solid #203f64;
    border-radius: 12px;
    background: #08182c;
}

.view-switch button {
    min-width: 66px;
    padding: 9px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.view-switch button.active {
    background: linear-gradient(120deg, #147ff5, #3924df);
    box-shadow: inset 0 0 0 1px #367eff;
}

/* ---------------------------------------------------------
   4. HAUPTLAYOUT
   --------------------------------------------------------- */

.layout {
    display: grid;
    grid-template-columns: 256px minmax(390px, 1fr) 350px;
    min-height: calc(100vh - 71px);
}

/* ---------------------------------------------------------
   5. LINKE SEITENLEISTE
   --------------------------------------------------------- */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;

    padding: 25px 17px;
    background: rgba(4, 16, 31, .45);
    border-right: 1px solid #1b3554;
}

.new-entry {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;

    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
}

.new-entry span {
    font-size: 23px;
    line-height: 1;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 12px;
    text-align: left;

    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;

    color: #b9cce8;
    font-size: 14px;
}

.nav-item.active,
.nav-item:hover {
    background: #112a49;
    border-color: #142e4d;
    color: #f3f7ff;
}

.nav-item b {
    margin-left: auto;
    padding: 2px 8px;

    border-radius: 8px;
    background: #203a5d;

    color: #d8e6ff;
    font-size: 12px;
    font-weight: 500;
}

.nav-symbol {
    width: 19px;
    flex: none;
    text-align: center;
    color: #a9c3e9;
    font-size: 20px;
}

.side-section {
    padding-top: 20px;
    border-top: 1px solid #1d3858;
}

.side-heading {
    margin: 0 0 14px 8px;
    color: #b9cce8;
    font-size: 14px;
}

.category-filters {
    display: grid;
    gap: 7px;
}

.category-filters button {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 5px 9px;
    text-align: left;

    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;

    color: #b9cce8;
}

.category-filters button:hover,
.category-filters button.selected {
    background: #112947;
    border-color: #1a385a;
}

.dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    flex: none;
    border-radius: 50%;
}

.dot.blue {
    background: #1599ff;
}

.dot.green {
    background: #18b783;
}

.dot.amber {
    background: #e9ad3e;
}

.dot.purple {
    background: #a044f4;
}

.dot.slate {
    background: #86a5d7;
}

.side-view-info p,
.tip-box p {
    margin: 0 4px;
    color: #afc4e1;
    font-size: 13px;
    line-height: 1.55;
}

.tip-box {
    margin-top: auto;
    padding: 16px;

    border: 1px solid #234568;
    border-radius: 13px;
    background: linear-gradient(135deg, #0d2340, #091a30);
}

.tip-title {
    margin-bottom: 10px;
    color: #e3edff;
    font-weight: 650;
}

/* ---------------------------------------------------------
   6. MITTLERE SPALTE – TIMELINE
   --------------------------------------------------------- */

.timeline-column {
    width: 100%;
    max-width: 1000px;
    min-width: 0;
    margin: 0 auto;
    padding: 20px 26px 36px;
}

.timeline-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 17px;
}

.timeline-heading h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
}

.timeline-heading span {
    color: #8fa9cc;
    font-size: 12px;
}

.day-group {
    margin-bottom: 18px;
}

.day-title {
    margin: 0 0 12px;
    color: #dce9ff;
    font-size: 16px;
    font-weight: 650;
}

.day-items {
    position: relative;
}

.day-items::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 4px;
    left: 95px;

    width: 3px;
    border-radius: 4px;
    background: linear-gradient(#478eea, #b5c9ec 50%, #4778b8);
    opacity: .85;
}

.event-row {
    display: grid;
    grid-template-columns: 82px 26px minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;

    position: relative;
    min-height: 76px;
    margin-bottom: 11px;
}

.event-time {
    padding-top: 5px;
    text-align: right;
    color: #e3edff;
    font-size: 13px;
    font-weight: 600;
}

.event-time small {
    display: block;
    margin-top: 2px;
    color: #9bb3d4;
    font-size: 12px;
    font-weight: 400;
}

.event-node {
    width: 20px;
    height: 20px;
    margin: 5px auto 0;

    z-index: 1;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #0a1c33;
}

.event-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    position: relative;
    min-width: 0;
    padding: 11px 14px;

    border: 1px solid var(--accent);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: inset 0 0 0 1px
        color-mix(in srgb, var(--accent) 22%, transparent);

    cursor: pointer;
    transition:
        transform .17s,
        border-color .17s,
        filter .17s;
}

.event-card:hover {
    transform: translateY(-1px);
    filter: brightness(1.12);
}

.event-card.done {
    opacity: .56;
}

.event-card.done .event-title {
    text-decoration: line-through;
}

/* Überschneidungen: kräftiger roter Rahmen */
.event-card.has-conflict {
    border: 4px solid #ff2020 !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .08),
        0 0 0 2px rgba(255, 32, 32, .35),
        0 0 12px rgba(255, 32, 32, .3) !important;
    border-radius: 12px;
}

/* Auf dem Smartphone bleibt der rote Rahmen gut sichtbar */
@media (max-width: 760px) {
    .event-card.has-conflict {
        border: 3px solid #ff2020 !important;
        box-shadow:
            0 0 0 1px rgba(255, 32, 32, .45),
            0 0 7px rgba(255, 32, 32, .3) !important;
    }
}

.event-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: none;

    border-radius: 11px;
    background: color-mix(in srgb, var(--accent) 22%, #10233e);
    font-size: 17px;
}

.event-copy {
    min-width: 0;
    flex: 1;
}

.event-kind {
    margin-bottom: 2px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.event-title {
    color: #e2ecfc;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.event-description {
    margin-top: 4px;
    color: #9fb5d5;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.event-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.pill {
    padding: 3px 9px;
    border-radius: 20px;
    background: #213a5b;
    color: #d7e7ff;
    font-size: 11px;
}

.pill.category {
    margin-left: auto;
    white-space: nowrap;
}

.repeat-pill {
    background: #243954;
    color: #cfdef4;
}

.conflict-pill {
    border: 1px solid rgba(255, 90, 100, .35);
    background: rgba(220, 55, 65, .16);
    color: #ffb4b4;
}

.event-tools {
    display: flex;
    flex: none;
    gap: 5px;
    margin-left: auto;
}

.mini-action {
    padding: 4px 7px;
    border: 1px solid #47617f66;
    border-radius: 7px;
    background: #081b31aa;
    font-size: 11px;
}

.mini-action:hover {
    background: #173858;
}

.end-marker {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 0 0 150px;
    color: #8fa9ca;
    font-size: 12px;
}

.end-marker span {
    font-size: 20px;
}

/* ---------------------------------------------------------
   7. RECHTE SPALTE UND ALLGEMEINE PANELS
   --------------------------------------------------------- */

.rightbar {
    display: flex;
    flex-direction: column;
    gap: 13px;

    min-width: 0;
    padding: 17px 17px 28px 0;
}

.panel {
    padding: 16px;

    border: 1px solid #244568;
    border-radius: 15px;
    background: linear-gradient(
        145deg,
        rgba(8, 28, 51, .97),
        rgba(5, 20, 38, .97)
    );
    box-shadow: 0 9px 25px #00000010;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 14px;
}

.panel-title h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
}

.panel-title.simple {
    margin-bottom: 9px;
}

.plus-round {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    flex: none;

    border-radius: 50%;
    background: #d9e8ff;
    color: #15355b;
    font-size: 17px;
    font-weight: 700;
}

/* ---------------------------------------------------------
   8. EINGABEFORMULAR
   --------------------------------------------------------- */

.type-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;

    margin-bottom: 14px;
    padding: 3px;

    border-radius: 10px;
    background: #08172c;
}

.type-switch button {
    padding: 10px 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #b8cbe5;
}

.type-switch button.active {
    background: linear-gradient(120deg, #2189ff, #1766eb);
    color: #fff;
}

.field {
    display: block;
    position: relative;
    min-width: 0;
    margin-bottom: 10px;

    border: 1px solid #254567;
    border-radius: 10px;
    background: #07182c;
}

.field:focus-within {
    border-color: #348bfa;
    box-shadow: 0 0 0 2px #1a78f222;
}

.with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
}

.with-icon > span {
    flex: none;
    color: #a7c0e4;
    font-size: 17px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #e4efff;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #829ab9;
}

.field textarea {
    min-height: 48px;
    resize: vertical;
}

.textarea-field {
    display: flex;
    gap: 10px;
    padding: 11px;
}

.textarea-field > span {
    color: #a7c0e4;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.field-row .field {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 10px;
}

.field-row .field > span {
    padding-top: 3px;
}

.field small {
    display: block;
    margin-bottom: 3px;
    color: #8fa9ca;
    font-size: 11px;
}

.field input[type="date"],
.field input[type="time"] {
    color-scheme: dark;
    font-size: 12px;
}

.select-field {
    padding: 8px 11px;
}

.select-field select {
    padding: 3px 0;
    color: #e1edff;
}

.select-field option {
    background: #0b1e36;
}

.custom-repeat {
    padding: 8px 11px;
}

.inline-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-control input {
    width: 80px;
    padding: 7px;

    border: 1px solid #2a4c70;
    border-radius: 7px;
    background: #091b30;
    color: #fff;
}

.inline-control span {
    color: #b6c9e4;
}

.note-repeat-option {
    padding: 10px 12px;
}

.note-repeat-check {
    display: flex;
    align-items: center;
    gap: 10px;

    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.note-repeat-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: #1599ff;
}

.form-buttons {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 9px;
    margin-top: 14px;
}

.form-buttons .btn {
    padding: 10px 8px;
}

.form-status {
    min-height: 0;
    color: #f3c56b;
    font-size: 12px;
}

.form-status:not(:empty) {
    margin: 6px 0;
}

.delete-entry {
    margin-top: 12px;
    padding: 5px;
    border: 0;
    background: transparent;
    color: #f59b9b;
    font-size: 12px;
}

/* ---------------------------------------------------------
   9. KALENDER
   --------------------------------------------------------- */

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 12px;
}

.calendar-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
}

.calendar-header button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #d8e8ff;
    font-size: 27px;
}

.calendar-header button:hover {
    background: #183657;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    text-align: center;
}

.calendar-weekdays {
    margin-bottom: 6px;
    color: #9db3d2;
    font-size: 11px;
}

.calendar-day {
    height: 31px;
    position: relative;
    padding: 0;

    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #c5d6ee;
    font-size: 12px;
}

.calendar-day:hover {
    background: #163657;
}

.calendar-day.muted {
    color: #607997;
}

.calendar-day.selected {
    background: #1679f4;
    color: #fff;
    box-shadow: 0 3px 12px #1679f455;
}

.calendar-day.today:not(.selected) {
    border-color: #3c8ef0;
}

.calendar-day.has-events::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: calc(50% - 2px);

    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #43a0ff;
}

.calendar-day.selected.has-events::after {
    background: #fff;
}

/* ---------------------------------------------------------
   10. NÄCHSTE TERMINE, AUFGABEN UND NOTIZEN
   --------------------------------------------------------- */

.upcoming-panel {
    padding: 17px;
    padding-bottom: 12px;
    overflow: hidden;
}

.upcoming-panel .panel-title.simple {
    margin-bottom: 7px;
}

.upcoming-panel .panel-title h2 {
    font-size: 15px;
    letter-spacing: .1px;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.upcoming-item {
    display: grid;
    grid-template-columns: 53px minmax(0, 1fr) 12px;
    align-items: start;
    gap: 11px;

    min-width: 0;
    padding: 11px 9px;

    border: 1px solid #233e5d;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        rgba(17, 43, 71, .82),
        rgba(8, 27, 49, .96)
    );

    cursor: pointer;
    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.upcoming-item:hover {
    background: linear-gradient(
        135deg,
        rgba(24, 56, 91, .95),
        rgba(11, 35, 61, .98)
    );
    border-color: #3974ad;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .15);
}

.upcoming-item:focus-visible {
    outline: 2px solid #50a5ff;
    outline-offset: 2px;
}

/* Datum */

.upcoming-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;

    min-height: 68px;
    padding: 6px 2px;

    border: 1px solid #294b70;
    border-radius: 9px;
    background: #102b49;
    text-align: center;
}

.upcoming-date.is-today {
    border-color: #398fe7;
    background: linear-gradient(145deg, #174d82, #102e51);
}

.upcoming-date.is-tomorrow {
    border-color: #2d7285;
    background: linear-gradient(145deg, #173c52, #102b40);
}

.upcoming-month {
    color: #9fc7f5;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .8px;
}

.upcoming-day {
    color: #f2f7ff;
    font-size: 23px;
    line-height: 1.15;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.upcoming-weekday {
    color: #a8c0df;
    font-size: 10px;
    line-height: 1.3;
}

/* Eintragsinhalt */

.upcoming-content {
    min-width: 0;
    padding-top: 1px;
}

.upcoming-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 7px;
    margin-bottom: 5px;
}

.upcoming-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: .55px;
}

.upcoming-type-icon {
    font-size: 13px;
    line-height: 1;
}

.upcoming-type.type-termin {
    color: #66b4ff;
}

.upcoming-type.type-aufgabe {
    color: #48d6a1;
}

.upcoming-type.type-notiz {
    color: #c49aff;
}

/* Uhrzeit und Dauer */

.upcoming-clock {
    color: #b4c8e2;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
}

/* Titel */

.upcoming-name {
    color: #edf5ff;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;

    white-space: normal;
    overflow-wrap: anywhere;
}

/* Beschreibung */

.upcoming-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;

    margin-top: 4px;
    color: #a5bad5;
    font-size: 11px;
    line-height: 1.45;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Kategorie und Wiederholung */

.upcoming-bottomline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-top: 8px;
}

.upcoming-category {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    min-width: 0;
    color: #93accb;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.upcoming-category .dot {
    width: 7px;
    height: 7px;
}

.upcoming-repeat {
    color: #b4c8e2;
    font-size: 10px;
}

/* Pfeil */

.upcoming-chevron {
    align-self: center;
    color: #6f91b8;
    font-size: 23px;
    line-height: 1;
    transition: color .18s, transform .18s;
}

.upcoming-item:hover .upcoming-chevron {
    color: #80bcff;
    transform: translateX(2px);
}

/* Keine offenen Einträge */

.upcoming-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    padding: 22px 12px;
    border: 1px dashed #294766;
    border-radius: 11px;
    background: rgba(10, 30, 52, .5);
    text-align: center;
}

.upcoming-empty-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;

    margin-bottom: 3px;
    border-radius: 50%;
    background: rgba(16, 185, 129, .13);
    color: #48d6a1;
    font-size: 17px;
}

.upcoming-empty strong {
    color: #dceaff;
    font-size: 12px;
    font-weight: 600;
}

.upcoming-empty > span:last-child {
    color: #8fa9ca;
    font-size: 11px;
    line-height: 1.5;
}

/* ---------------------------------------------------------
   11. ALLGEMEINE STATUSANZEIGEN
   --------------------------------------------------------- */

.empty-state {
    padding: 35px 16px;
    border: 1px dashed #28486b;
    border-radius: 13px;
    color: #9db4d3;
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 7px;
    color: #e0ecff;
    font-size: 15px;
}

.empty-state button {
    margin-top: 13px;
}

.loading {
    padding: 35px;
    color: #93adcf;
    text-align: center;
}

.text-link {
    padding: 13px 0 0;
    border: 0;
    background: transparent;
    color: #3f9aff;
    font-size: 12px;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    z-index: 50;

    max-width: 90vw;
    padding: 11px 17px;

    border: 1px solid #3a6795;
    border-radius: 11px;
    background: #143456;
    color: #f0f6ff;
    box-shadow: 0 8px 30px #0008;

    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px);

    transition: opacity .2s, transform .2s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.mobile-tools {
    display: none;
}

/* ---------------------------------------------------------
   12. POPUP FÜR NEUE EINTRÄGE
   --------------------------------------------------------- */

.entry-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;

    background: rgba(3, 8, 18, .76);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .24s ease,
        visibility 0s linear .24s;
}

.entry-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transition:
        opacity .24s ease,
        visibility 0s;
}

.entry-modal .entry-panel {
    display: block;
    position: relative;

    width: min(540px, 100%);
    max-width: 540px;
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);

    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;

    opacity: 0;
    transform: translateY(24px) scale(.97);

    transition:
        opacity .28s ease,
        transform .32s cubic-bezier(.2, .8, .2, 1);
}

.entry-modal.is-open .entry-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

body.entry-modal-open {
    overflow: hidden;
}

/* ---------------------------------------------------------
   13. GROSSE BILDSCHIRME
   --------------------------------------------------------- */

@media (min-width: 1500px) {
    .layout {
        grid-template-columns: 270px minmax(480px, 1fr) 370px;
    }

    .timeline-column {
        padding-left: 34px;
        padding-right: 34px;
    }

    .rightbar {
        padding-right: 22px;
    }
}

/* ---------------------------------------------------------
   14. DESKTOP UND TABLET – GETRENNTE SCROLLBEREICHE
   --------------------------------------------------------- */

@media (min-width: 761px) {
    html,
    body {
        height: 100%;
        min-height: 0;
    }

    body {
        overflow: hidden;
    }

    .app-shell {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .topbar {
        position: relative;
        top: auto;
        flex: none;
    }

    .layout {
        height: calc(100vh - 71px);
        height: calc(100dvh - 71px);
        min-height: 0;
        overflow: hidden;
        align-items: stretch;
    }

    .sidebar,
    .timeline-column,
    .rightbar {
        min-height: 0;
        min-width: 0;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .sidebar {
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .timeline-column {
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .rightbar {
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .sidebar::-webkit-scrollbar,
    .timeline-column::-webkit-scrollbar,
    .rightbar::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}

/* ---------------------------------------------------------
   15. TABLET – RECHTE SPALTE UNTER DER TIMELINE
   --------------------------------------------------------- */

@media (max-width: 1150px) and (min-width: 761px) {
    .layout {
        grid-template-columns: 220px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .sidebar {
        grid-column: 1;
        grid-row: 1 / 3;
        height: 100%;
        padding: 20px 13px;
    }

    .timeline-column {
        grid-column: 2;
        grid-row: 1;
        height: 100%;
        padding: 20px;
    }

    .rightbar {
        grid-column: 2;
        grid-row: 2;

        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;

        height: auto;
        max-height: 45vh;
        overflow-y: auto;
        padding: 0 20px 20px;
    }

    .rightbar::-webkit-scrollbar {
        display: none;
    }

    .entry-panel {
        grid-column: 1 / -1;
    }

    .side-view-info {
        display: none;
    }

    .tip-box {
        margin-top: 0;
    }

    .brand {
        min-width: 210px;
    }

    .topbar {
        padding: 0 18px;
    }
}

/* ---------------------------------------------------------
   16. HANDY – NORMALES SEITENSCROLLEN
   --------------------------------------------------------- */




/* ---------------------------------------------------------
   16. RESPONSIVES LAYOUT – ALLE DREI SPALTEN BLEIBEN NEBENEINANDER
   --------------------------------------------------------- */

@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        min-height: 100%;
        overflow-x: auto;
    }

    body {
        overflow-y: auto;
        font-size: 11px;
    }

    .app-shell {
        width: 100%;
        min-width: 0;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }

    /* Kopfzeile kompakter */
    .topbar {
        position: sticky;
        top: 0;
        z-index: 1000;

        height: auto;
        min-height: 48px;
        padding: 5px 7px;
        gap: 5px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .brand {
        min-width: 0;
        flex: 1 1 auto;
        gap: 5px;
    }

    .brand-icon {
        width: 27px;
        height: 27px;
        border-radius: 7px;
        font-size: 16px;
    }

    .brand h1 {
        font-size: clamp(11px, 2.8vw, 17px);
    }

    .brand p {
        margin-top: 1px;
        font-size: 8px;
    }

    .top-actions {
        width: auto;
        min-width: 0;
        flex: 0 1 auto;
        gap: 3px;
    }

    .top-actions .btn {
        min-height: 29px;
        padding: 4px 6px;
        font-size: 9px;
        white-space: nowrap;
    }

    .view-switch {
        min-width: 0;
        flex: 0 1 auto;
        border-radius: 7px;
    }

    .view-switch button {
        min-width: 0;
        padding: 5px 4px;
        font-size: 9px;
    }

    .icon-btn {
        width: 28px;
        min-height: 29px;
        font-size: 15px;
    }

    /* WICHTIG: drei Spalten bleiben nebeneinander */
    .layout {
        display: grid !important;
        grid-template-columns:
            minmax(105px, 0.72fr)
            minmax(0, 2fr)
            minmax(115px, 0.85fr);
        grid-template-rows: minmax(0, 1fr);

        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        overflow: visible;
        align-items: start;
        gap: 0;
    }

    /* Linke Spalte: Filter und Kategorien */
    .sidebar {
        display: flex !important;
        flex-direction: column;
        grid-column: 1;
        grid-row: 1;

        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 7px 4px;
        gap: 9px;

        overflow-wrap: anywhere;
        border-right: 1px solid var(--line);
    }

    .new-entry {
        justify-content: center;
        gap: 3px;
        padding: 7px 3px;
        font-size: 10px;
        text-align: center;
    }

    .new-entry span {
        font-size: 16px;
    }

    .main-nav {
        gap: 3px;
        min-width: 0;
    }

    .nav-item {
        gap: 4px;
        min-width: 0;
        padding: 6px 3px;
        font-size: 9px;
        overflow-wrap: anywhere;
    }

    .nav-symbol {
        width: 13px;
        font-size: 13px;
    }

    .nav-item b {
        padding: 1px 3px;
        font-size: 8px;
    }

    .side-section {
        padding-top: 8px;
    }

    .side-heading {
        margin: 0 0 6px 2px;
        font-size: 10px;
        overflow-wrap: anywhere;
    }

    .category-filters {
        gap: 3px;
        min-width: 0;
    }

    .category-filters button {
        gap: 4px;
        min-width: 0;
        padding: 5px 3px;
        font-size: 9px;
        overflow-wrap: anywhere;
    }

    .dot {
        width: 7px;
        height: 7px;
    }

    .side-view-info p,
    .tip-box p {
        font-size: 9px;
    }

    .tip-box {
        padding: 7px;
        margin-top: 0;
    }

    .tip-title {
        margin-bottom: 4px;
        font-size: 10px;
    }

    /* Mittlere Spalte: Timeline */
    .timeline-column {
        display: block;
        grid-column: 2;
        grid-row: 1;
        order: initial;

        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 8px 4px 15px;

        overflow-x: hidden;
        overflow-y: visible;
    }

    .timeline-heading {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 3px;
        margin-bottom: 8px;
    }

    .timeline-heading h2 {
        font-size: 11px;
    }

    .timeline-heading span {
        font-size: 8px;
    }

    .day-group {
        margin-bottom: 10px;
    }

    .day-title {
        margin-bottom: 6px;
        font-size: 11px;
        overflow-wrap: anywhere;
    }

    .day-items::before {
        left: 36px;
        width: 2px;
    }

    .event-row {
        grid-template-columns: 28px 12px minmax(0, 1fr);
        gap: 2px;

        min-width: 0;
        min-height: 0;
        margin-bottom: 6px;
    }

    .event-time {
        padding-top: 3px;
        font-size: 8px;
        overflow-wrap: anywhere;
    }

    .event-time small {
        font-size: 7px;
    }

    .event-node {
        width: 10px;
        height: 10px;
        margin-top: 4px;
        box-shadow: 0 0 0 2px #0a1c33;
    }

    .event-card {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;

        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding: 5px;
        border-radius: 7px;
    }

    .event-card:hover {
        transform: none;
    }

    .event-icon {
        width: 19px;
        height: 19px;
        border-radius: 5px;
        font-size: 10px;
    }

    .event-copy {
        flex: 1 1 60%;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .event-kind {
        font-size: 8px;
    }

    .event-title {
        font-size: 9px;
        overflow-wrap: anywhere;
    }

    .event-description {
        margin-top: 2px;
        font-size: 8px;
        overflow-wrap: anywhere;
    }

    .event-meta {
        gap: 3px;
        margin-top: 4px;
    }

    .pill {
        padding: 2px 4px;
        font-size: 7px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .pill.category {
        margin-left: 0;
    }

    .event-tools {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        min-width: 0;
        gap: 3px;
        margin: 2px 0 0;
    }

    .mini-action {
        padding: 3px 4px;
        font-size: 8px;
        overflow-wrap: anywhere;
    }

    .end-marker {
        gap: 4px;
        padding: 7px 0 0 42px;
        font-size: 8px;
    }

    .end-marker span {
        font-size: 12px;
    }

    /* Rechte Spalte: Formular, Kalender und nächste Einträge */
    .rightbar {
        display: flex;
        flex-direction: column;
        grid-column: 3;
        grid-row: 1;
        order: initial;

        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 0;
        max-height: none;
        gap: 6px;
        padding: 7px 4px 15px;

        overflow-x: hidden;
        overflow-y: visible;
        border-left: 1px solid var(--line);
    }

    .rightbar .panel,
    .panel,
    .entry-panel,
    .calendar-panel,
    .upcoming-panel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding: 7px;
        border-radius: 8px;
    }

    .panel-title {
        gap: 4px;
        margin-bottom: 7px;
    }

    .panel-title h2 {
        min-width: 0;
        font-size: 10px;
        overflow-wrap: anywhere;
    }

    .plus-round {
        width: 16px;
        height: 16px;
        font-size: 12px;
    }

    /* Formular */
    .type-switch {
        gap: 2px;
        margin-bottom: 7px;
        padding: 2px;
    }

    .type-switch button {
        min-width: 0;
        padding: 6px 2px;
        font-size: 8px;
        overflow-wrap: anywhere;
    }

    .field {
        margin-bottom: 5px;
        border-radius: 6px;
    }

    .with-icon {
        gap: 4px;
        padding: 6px 4px;
    }

    .with-icon > span {
        font-size: 11px;
    }

    .field input,
    .field textarea,
    .field select {
        min-width: 0;
        max-width: 100%;
        font-size: 9px;
    }

    .field input::placeholder,
    .field textarea::placeholder {
        font-size: 8px;
    }

    .field textarea {
        min-height: 35px;
    }

    .textarea-field {
        gap: 4px;
        padding: 6px 4px;
    }

    .field-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .field-row .field {
        gap: 4px;
        padding: 5px 4px;
    }

    .field-row .field > span {
        font-size: 10px;
    }

    .field small {
        margin-bottom: 2px;
        font-size: 8px;
    }

    .select-field,
    .custom-repeat {
        padding: 5px 4px;
    }

    .inline-control {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 9px;
    }

    .inline-control input {
        width: 40px;
        min-width: 0;
        padding: 4px;
        font-size: 9px;
    }

    .inline-control span {
        font-size: 8px;
        overflow-wrap: anywhere;
    }

    .note-repeat-option {
        padding: 6px 4px;
    }

    .note-repeat-check {
        align-items: flex-start;
        gap: 4px;
        font-size: 9px;
    }

    .note-repeat-check input[type="checkbox"] {
        width: 13px;
        height: 13px;
    }

    .form-buttons {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        margin-top: 7px;
    }

    .form-buttons .btn,
    .rightbar .btn {
        min-width: 0;
        min-height: 28px;
        padding: 5px 4px;
        font-size: 9px;
        overflow-wrap: anywhere;
    }

    .form-status {
        font-size: 9px;
        overflow-wrap: anywhere;
    }

    /* Kalender */
    .calendar-header {
        gap: 2px;
        margin-bottom: 5px;
    }

    .calendar-header h3 {
        font-size: 9px;
    }

    .calendar-header button {
        width: 19px;
        height: 22px;
        font-size: 17px;
    }

    .calendar-grid {
        gap: 1px;
    }

    .calendar-weekdays {
        margin-bottom: 3px;
        font-size: 8px;
    }

    .calendar-day {
        height: 21px;
        font-size: 8px;
    }

    /* Nächste Termine */
    .upcoming-panel {
        overflow: hidden;
    }

    .upcoming-panel .panel-title h2 {
        font-size: 10px;
        line-height: 1.3;
    }

    .upcoming-list {
        gap: 4px;
    }

    .upcoming-item {
        grid-template-columns: 27px minmax(0, 1fr) 5px;
        gap: 4px;
        padding: 5px 3px;
        border-radius: 6px;
    }

    .upcoming-date {
        min-height: 43px;
        padding: 3px 1px;
        border-radius: 5px;
    }

    .upcoming-month {
        font-size: 6px;
        letter-spacing: 0;
    }

    .upcoming-day {
        font-size: 14px;
    }

    .upcoming-weekday {
        font-size: 6px;
    }

    .upcoming-topline {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        margin-bottom: 3px;
    }

    .upcoming-type {
        gap: 2px;
        font-size: 7px;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .upcoming-type-icon {
        font-size: 9px;
    }

    .upcoming-clock {
        font-size: 7px;
        overflow-wrap: anywhere;
    }

    .upcoming-name {
        font-size: 9px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .upcoming-description {
        margin-top: 3px;
        font-size: 8px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .upcoming-bottomline {
        gap: 3px;
        margin-top: 4px;
    }

    .upcoming-category,
    .upcoming-repeat {
        gap: 3px;
        font-size: 7px;
        overflow-wrap: anywhere;
    }

    .upcoming-category .dot {
        width: 5px;
        height: 5px;
    }

    .upcoming-chevron {
        font-size: 12px;
    }

    .upcoming-empty {
        gap: 4px;
        padding: 10px 4px;
    }

    .upcoming-empty strong,
    .upcoming-empty > span:last-child {
        font-size: 8px;
    }

    /* Mobile-Tools bleiben Teil der mittleren Spalte */
    .mobile-tools {
        display: flex;
        position: static;
        flex-wrap: wrap;
        gap: 3px;
        width: 100%;
        min-width: 0;
        margin: 0 0 7px;
        padding: 4px 0;
        background: transparent;
    }

    .mobile-tools .btn {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 27px;
        padding: 4px;
        font-size: 8px;
        white-space: normal;
    }

    .side-view-info,
    .tip-box {
        max-width: 100%;
    }

    /* Popup */
    .entry-modal {
        padding: 7px;
    }

    .entry-modal .entry-panel {
        width: 100%;
        max-width: 540px;
        max-height: calc(100vh - 14px);
        max-height: calc(100dvh - 14px);
    }
}

/* ---------------------------------------------------------
   17. SEHR SCHMALE HANDYS
   Drei Spalten bleiben nebeneinander, Inhalt wird kompakter
   --------------------------------------------------------- */

@media (max-width: 390px) {
    .layout {
        grid-template-columns:
            minmax(82px, 0.72fr)
            minmax(0, 2fr)
            minmax(92px, 0.85fr);
    }

    .topbar {
        padding-left: 4px;
        padding-right: 4px;
        gap: 3px;
    }

    .brand {
        gap: 3px;
    }

    .brand-icon {
        width: 23px;
        height: 23px;
        font-size: 13px;
    }

    .brand h1 {
        font-size: 10px;
    }

    .brand p {
        font-size: 7px;
    }

    .top-actions {
        gap: 2px;
    }

    .top-actions .btn {
        padding: 4px 3px;
        font-size: 8px;
    }

    .view-switch button {
        padding: 4px 2px;
        font-size: 8px;
    }

    .sidebar,
    .rightbar {
        padding-left: 3px;
        padding-right: 3px;
    }

    .timeline-column {
        padding-left: 3px;
        padding-right: 3px;
    }

    .nav-item {
        gap: 2px;
        padding: 5px 2px;
        font-size: 8px;
    }

    .nav-symbol {
        width: 10px;
        font-size: 11px;
    }

    .category-filters button {
        gap: 3px;
        padding: 4px 2px;
        font-size: 8px;
    }

    .event-row {
        grid-template-columns: 24px 10px minmax(0, 1fr);
        gap: 2px;
    }

    .day-items::before {
        left: 31px;
    }

    .event-time {
        font-size: 7px;
    }

    .event-time small {
        font-size: 6px;
    }

    .event-card {
        padding: 4px;
    }

    .event-icon {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }

    .event-title {
        font-size: 8px;
    }

    .event-description {
        font-size: 7px;
    }

    .upcoming-item {
        grid-template-columns: 23px minmax(0, 1fr) 4px;
        gap: 3px;
        padding: 4px 2px;
    }

    .upcoming-day {
        font-size: 12px;
    }

    .upcoming-name {
        font-size: 8px;
    }

    .upcoming-description {
        font-size: 7px;
    }
}

/* ---------------------------------------------------------
   18. POPUP AUCH AUF KLEINEN DISPLAYS
   --------------------------------------------------------- */

@media (max-width: 600px) {
    .entry-modal {
        align-items: center;
        padding: 8px;
    }

    .entry-modal .entry-panel {
        width: 100%;
        max-width: 540px;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 12px;
    }
}

















/* ---------------------------------------------------------
   19. REDUZIERTE ANIMATIONEN
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .entry-modal,
    .entry-modal .entry-panel {
        transition: none;
    }
}











/* ---------------------------------------------------------
   TIMELINE: EIGENER SCROLLBEREICH AUCH AUF DEM HANDY
   --------------------------------------------------------- */

@media (max-width: 760px) {

    /* Drei Spalten nebeneinander beibehalten */
    .layout {
        display: grid !important;
        grid-template-columns:
            minmax(82px, 0.72fr)
            minmax(0, 2fr)
            minmax(92px, 0.85fr);
        align-items: start;
        overflow: visible;
    }

    /* Nur die mittlere Timeline-Spalte scrollt eigenständig */
    .timeline-column {
        grid-column: 2;
        grid-row: 1;

        height: 600px;
        max-height: 600px;
        min-height: 0;

        overflow-x: hidden;
        overflow-y: auto;

        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #31577f #091a30;
    }

    /* Scrollbalken auf WebKit-Browsern sichtbar machen */
    .timeline-column::-webkit-scrollbar {
        width: 5px;
    }

    .timeline-column::-webkit-scrollbar-track {
        background: #091a30;
    }

    .timeline-column::-webkit-scrollbar-thumb {
        background: #31577f;
        border-radius: 5px;
    }

    /* Die anderen Spalten bleiben außerhalb dieses Scrollbereichs */
    .sidebar {
        grid-column: 1;
        grid-row: 1;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .rightbar {
        grid-column: 3;
        grid-row: 1;
        height: auto;
        max-height: none;
        overflow: visible;
    }
}






/* MOBILE: NUR DIE TERMINE SCROLLEN – KALENDER BLEIBT FEST */
@media (max-width: 760px) {

    /* Mittlere Spalte als feste Anordnung */
    .timeline-column {
        height: 600px !important;
        max-height: 600px !important;
        min-height: 0 !important;
        overflow: hidden !important;

        display: flex !important;
        flex-direction: column !important;
    }

    /* Der eigentliche Termin-/Timeline-Bereich scrollt */
    .timeline-column .timeline,
    .timeline-column .timeline-list,
    .timeline-column .timeline-content {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    /* Kalender und übrige Elemente nicht mitscrollen */
    .timeline-column .calendar,
    .timeline-column .calendar-panel,
    .timeline-column .calendar-container {
        flex-shrink: 0 !important;
        position: static !important;
    }
}






/* MOBILE: Linken Button "Neuer Eintrag" ausblenden */
@media (max-width: 1024px) {
    .layout > .sidebar > button.new-entry#newEntryBtn {
        display: none !important;
    }
}









/* MOBILE: Terminliste direkt über dem Kalender */
@media (max-width: 760px) {
    .layout {
        grid-template-rows: auto auto auto !important;
        align-items: start !important;
    }

    .rightbar {
        display: contents !important;
    }

    .rightbar > .entry-panel {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }

    .rightbar > .upcoming-panel {
        grid-column: 2 / 4 !important;
        grid-row: 2 !important;
        align-self: start !important;
        margin-top: 0 !important;
    }

    .rightbar > .calendar-panel {
        grid-column: 2 / 4 !important;
        grid-row: 3 !important;
        align-self: start !important;
        margin-top: 0 !important;
    }
}





/* MOBILE: Terminliste vollständig anzeigen, Kalender darunter */
@media (max-width: 760px) {
    .rightbar > .upcoming-panel,
    .rightbar > .calendar-panel {
        position: relative !important;
        inset: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        z-index: auto !important;
        box-sizing: border-box;
        margin-bottom: 12px !important;
    }

    .rightbar > .upcoming-panel {
        display: block !important;
        min-height: max-content !important;
    }

    .rightbar > .calendar-panel {
        display: block !important;
        clear: both;
    }
}














/* =========================================================
   MOBILE KORREKTUR
   Timeline: 600 px eigener Scrollbereich
   Darunter: Terminliste und Kalender untereinander
   Desktop bleibt unverändert
   ========================================================= */

.mobile-bottom-panels {
    display: none;
}

@media (max-width: 760px) {
    /* Drei Spalten in der ersten Zeile, Zusatzbereich darunter */
    .layout {
        grid-template-columns:
            minmax(82px, 0.72fr)
            minmax(0, 2fr)
            minmax(0, 0fr) !important;
        grid-template-rows: 600px auto !important;
        align-items: start !important;
        overflow: visible !important;
    }

    /* Linke Filterspalte */
    .sidebar {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    /* Timeline mit eigenem 600-px-Scrollbereich */
    .timeline-column {
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: 100% !important;
        height: 600px !important;
        min-height: 0 !important;
        max-height: 600px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        display: block !important;
    }

    /* Rechte Spalte auf dem Handy ausblenden */
    .rightbar {
        display: none !important;
    }

    /* Terminliste und Kalender unter der Timeline */
    .mobile-bottom-panels {
        display: flex !important;
        flex-direction: column !important;
        grid-column: 2 / -1 !important;
        grid-row: 2 !important;
        align-self: start !important;
        width: 100% !important;
        min-width: 0 !important;
        gap: 10px !important;
        padding: 8px 4px 20px !important;
        overflow: visible !important;
    }

    .mobile-bottom-panels > .upcoming-panel,
    .mobile-bottom-panels > .calendar-panel {
        display: block !important;
        position: static !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        flex: 0 0 auto !important;
        z-index: auto !important;
    }
}






/* =========================================================
   MOBILE: Timeline innen scrollen, Panels darunter
   ========================================================= */

.mobile-bottom-panels {
    display: none;
}

@media (max-width: 760px) {
    html,
    body {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .layout {
        display: grid !important;
        grid-template-columns:
            minmax(82px, 0.72fr)
            minmax(0, 2fr) !important;
        grid-template-rows: 600px auto !important;
        align-items: start !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .sidebar {
        grid-column: 1 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
    }

    .timeline-column {
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: 600px !important;
        min-height: 0 !important;
        max-height: 600px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* Die Überschrift und Bedienelemente bleiben stehen.
       Nur die eigentliche Terminliste scrollt. */
    .timeline-column #timeline,
    .timeline-column .timeline-list {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    /* Die rechte Spalte auf dem Handy ausblenden. */
    .rightbar {
        display: none !important;
    }

    /* Terminliste und Kalender folgen unterhalb der Timeline. */
    .mobile-bottom-panels {
        display: flex !important;
        flex-direction: column !important;
        grid-column: 2 !important;
        grid-row: 2 !important;
        align-self: start !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        max-height: none !important;
        gap: 12px !important;
        padding: 10px 4px 24px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .mobile-bottom-panels > .upcoming-panel,
    .mobile-bottom-panels > #calendarPanel {
        display: block !important;
        position: static !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        overflow: visible !important;
        flex: 0 0 auto !important;
        box-sizing: border-box !important;
        transform: none !important;
    }
}




/* =========================================================
   INFO-BUTTON UND AUSKLAPPBARE TIMELINE-BESCHREIBUNG
   ========================================================= */

.calendar-info[hidden] {
    display: none !important;
}

.calendar-info {
    position: relative;
    z-index: 19;
    padding: 17px 24px;
    border-bottom: 1px solid #294d73;
    background: linear-gradient(135deg, #0d2948, #081a30);
    color: #dceaff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
    animation: calendarInfoOpen .22s ease-out;
}

.calendar-info-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.calendar-info-icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    flex: 0 0 auto;
    border: 1px solid #3989db;
    border-radius: 50%;
    color: #7dc0ff;
    font-size: 17px;
}

.calendar-info h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.calendar-info p {
    margin: 7px 0;
    color: #b7cce7;
    font-size: 13px;
    line-height: 1.6;
}

.calendar-info ul {
    margin: 8px 0;
    padding-left: 22px;
    color: #b7cce7;
    font-size: 13px;
    line-height: 1.7;
}

.calendar-info li {
    padding-left: 3px;
    margin: 2px 0;
}

.calendar-info strong {
    color: #e5f0ff;
    font-weight: 600;
}

.calendar-info .calendar-info-footer {
    margin-top: 10px;
    color: #83baff;
}

@keyframes calendarInfoOpen {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .top-actions #calendarInfoBtn {
        min-height: 29px;
        padding: 4px 5px;
        font-size: 9px;
        white-space: nowrap;
    }

    .calendar-info {
        padding: 12px;
    }

    .calendar-info h2 {
        font-size: 13px;
    }

    .calendar-info p,
    .calendar-info ul {
        font-size: 11px;
        line-height: 1.55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .calendar-info {
        animation: none;
    }
}


/* Schließen-Button im Infofeld */
.calendar-info-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-info-heading h2 {
    flex: 1;
}

.calendar-info-close {
    margin-left: auto;
    padding: 7px 11px;
    border: 1px solid #385a7d;
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    color: #dceaff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, border-color .2s;
}

.calendar-info-close:hover {
    background: rgba(70,145,220,.2);
    border-color: #65aef5;
}

@media (max-width: 760px) {
    .calendar-info-close {
        padding: 6px 8px;
        font-size: 11px;
    }
}










/* =====================================================
   EINSTELLUNGSMENÜ
   ===================================================== */

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(3, 7, 15, .72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.settings-overlay[hidden] {
  display: none !important;
}

.settings-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.settings-dialog {
  width: min(100%, 600px);
  max-height: min(85vh, 760px);
  overflow-y: auto;
  color: var(--text, #edf2fa);
  background: var(--panel, #151c29);
  border: 1px solid rgba(145, 165, 195, .22);
  border-radius: 20px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48);
  transform: translateY(16px) scale(.985);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}

.settings-overlay.is-open .settings-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 25px;
  border-bottom: 1px solid rgba(145, 165, 195, .16);
}

.settings-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.settings-heading-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  color: #91c5ff;
  background: rgba(69, 139, 220, .15);
  border: 1px solid rgba(110, 175, 255, .22);
  border-radius: 14px;
  font-size: 25px;
}

.settings-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
}

.settings-heading p {
  margin: 5px 0 0;
  color: #99a9bf;
  font-size: 13px;
}

.settings-close {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #b8c4d5;
  background: rgba(130, 150, 180, .09);
  border: 1px solid rgba(145, 165, 195, .18);
  border-radius: 11px;
  font-size: 18px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.settings-close:hover {
  color: #fff;
  background: rgba(130, 150, 180, .2);
}

.settings-content {
  padding: 24px 25px 20px;
}

.settings-section-label {
  margin-bottom: 14px;
  color: #8497b1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 19px 0;
  border-bottom: 1px solid rgba(145, 165, 195, .14);
}

.settings-option:last-of-type {
  border-bottom: 0;
}

.settings-option-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 23px;
}

.past-icon {
  color: #83c7ff;
  background: rgba(48, 131, 210, .16);
}

.delete-icon {
  color: #ff9a9f;
  background: rgba(220, 70, 80, .14);
}

.settings-option-text {
  flex: 1;
  min-width: 0;
}

.settings-option-text h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.settings-option-text p {
  margin: 0;
  color: #9baac0;
  font-size: 12.5px;
  line-height: 1.6;
}

.settings-action {
  flex-shrink: 0;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease,
              border-color .16s ease, opacity .16s ease;
}

.settings-action:hover {
  transform: translateY(-1px);
}

.settings-action:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
}

.settings-action-neutral {
  color: #a8d5ff;
  background: rgba(52, 125, 200, .13);
  border-color: rgba(95, 160, 230, .25);
}

.settings-action-neutral:hover {
  background: rgba(52, 125, 200, .24);
}

.settings-action-danger {
  color: #ffafb3;
  background: rgba(205, 60, 70, .12);
  border-color: rgba(230, 90, 100, .28);
}

.settings-action-danger:hover {
  background: rgba(205, 60, 70, .24);
}

.settings-note {
  display: flex;
  gap: 9px;
  margin-top: 22px;
  padding: 13px 14px;
  color: #a4b4ca;
  background: rgba(110, 140, 180, .07);
  border: 1px solid rgba(145, 165, 195, .13);
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.6;
}

.settings-note span {
  flex-shrink: 0;
  color: #86bfff;
}

.settings-footer {
  display: flex;
  justify-content: flex-end;
  padding: 15px 25px 22px;
}

@media (max-width: 520px) {
  .settings-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .settings-dialog {
    width: 100%;
    max-height: 88vh;
    border-radius: 19px;
  }

  .settings-header {
    padding: 19px 18px;
  }

  .settings-content {
    padding: 19px 18px 15px;
  }

  .settings-option {
    flex-wrap: wrap;
    gap: 12px;
  }

  .settings-option-text {
    flex-basis: calc(100% - 60px);
  }

  .settings-action {
    margin-left: 56px;
  }

  .settings-footer {
    padding: 12px 18px 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-overlay,
  .settings-dialog,
  .settings-action,
  .settings-close {
    transition: none !important;
  }
}









/* Kategorien mit eigenem Farbwähler */

.category-filter-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.category-filter-button {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
    text-align: left;
}

.category-filter-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-color-picker {
    position: relative;
    display: inline-flex;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(160, 190, 225, .35);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.category-color-picker:hover {
    background: rgba(255, 255, 255, .13);
    border-color: rgba(160, 190, 225, .7);
}

.category-color-picker input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.category-color-swatch {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--category-color);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .15);
    pointer-events: none;
}

@media (max-width: 760px) {
    .category-filter-row {
        gap: 4px;
    }

    .category-color-picker {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }
}










/* Mobile: Farbpunkte und Farbauswahl kleiner darstellen */
@media (max-width: 760px) {
    .category-color-swatch {
        width: 5px !important;
        height: 5px !important;
        box-shadow: none !important;
    }

    .category-color-picker {
        flex-basis: 12px !important;
        width: 12px !important;
        height: 12px !important;
    }

    /* Auch die Punkte im Kategorienfilter verkleinern */
    .category-filters .dot {
        width: 5px !important;
        height: 5px !important;
    }
}










/* Heutigen Tag in der Timeline dezent einrahmen */
.day-group:has(.day-title.today-highlight) {
    border: 1.5px solid rgba(112, 199, 244, 0.7);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: rgba(112, 199, 244, 0.04);
}

/* Überschrift des heutigen Tages */
.day-title.today-highlight {
    color: #70C7F4 !important;
    font-weight: 600;
    border-bottom: 1px solid rgba(112, 199, 244, 0.3);
    padding-bottom: 8px;
    margin-top: 0;
}






/* =========================================================
   MOBILE AUFKLAPP-PANELS: Kalender und nächste Termine
   Beide Bereiche lassen sich unabhängig öffnen/schließen.
   Desktop-Layout bleibt unverändert.
   ========================================================= */
@media (max-width: 760px) {
    .mobile-tools {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
    }

    .mobile-tools #mobileNewBtn {
        flex: 1 0 100% !important;
    }

    .mobile-tools #mobileCalendarBtn,
    .mobile-tools #mobileUpcomingBtn {
        flex: 1 1 calc(50% - 5px) !important;
    }

    .mobile-bottom-panels > .upcoming-panel.is-mobile-collapsed,
    .mobile-bottom-panels > #calendarPanel.is-mobile-collapsed {
        display: none !important;
    }

    .mobile-bottom-panels > .upcoming-panel:not(.is-mobile-collapsed),
    .mobile-bottom-panels > #calendarPanel:not(.is-mobile-collapsed) {
        display: block !important;
    }
}







/* =========================================================
   MOBILE: Gemeinsamer Button und animierte Panels
   Muss am Ende der style.css stehen.
   ========================================================= */

@media (max-width: 760px) {
    .mobile-tools {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .mobile-tools #mobileNewBtn {
        flex: 1 0 100% !important;
        width: 100% !important;
    }

    .mobile-tools #mobilePanelsBtn {
        flex: 1 0 100% !important;
        width: 100% !important;
        min-height: 38px !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    .mobile-bottom-panels {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 8px 4px 20px !important;
        overflow: visible !important;
    }

    .mobile-bottom-panels > .upcoming-panel,
    .mobile-bottom-panels > #calendarPanel {
        display: block !important;
        position: static !important;
        inset: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        max-height: 1800px !important;
        margin: 0 !important;
        overflow: hidden !important;
        opacity: 1;
        transform: translateY(0);
        transition:
            max-height .32s ease,
            opacity .24s ease,
            transform .32s ease,
            padding .32s ease,
            margin .32s ease;
    }

    .mobile-bottom-panels > .upcoming-panel.is-mobile-collapsed,
    .mobile-bottom-panels > #calendarPanel.is-mobile-collapsed {
        display: block !important;
        max-height: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        border-top-width: 0 !important;
        border-bottom-width: 0 !important;
        opacity: 0 !important;
        transform: translateY(-8px);
        overflow: hidden !important;
        pointer-events: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-panels > .upcoming-panel,
    .mobile-bottom-panels > #calendarPanel {
        transition: none !important;
    }
}










/* =========================================================
   NÄCHSTE TERMINE & AUFGABEN – EIGENER SCROLLBEREICH
   Gilt für Desktop, Tablet und Handy
   ========================================================= */

/* Das Panel selbst bleibt sichtbar */
.upcoming-panel {
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Nur die Liste scrollt, nicht die Überschrift */
.upcoming-panel .upcoming-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;

    width: 100% !important;
    min-width: 0 !important;

    max-height: 380px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;

    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;

    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #42658e #091a30;
}

/* Dezente Scrollleiste für Desktop-Browser */
.upcoming-panel .upcoming-list::-webkit-scrollbar {
    width: 7px;
}

.upcoming-panel .upcoming-list::-webkit-scrollbar-track {
    background: #091a30;
    border-radius: 8px;
}

.upcoming-panel .upcoming-list::-webkit-scrollbar-thumb {
    background: #42658e;
    border-radius: 8px;
}

.upcoming-panel .upcoming-list::-webkit-scrollbar-thumb:hover {
    background: #6095d0;
}

/* Auch im mobilen Aufklappbereich begrenzt scrollen */
@media (max-width: 760px) {
    .mobile-bottom-panels .upcoming-panel .upcoming-list {
        max-height: 220px !important;
        overflow-y: auto !important;
    }
}





/* =========================================
   AUSGEWÄHLTER KALENDERTAG
   Timeline und Nächste Termine & Aufgaben
   ========================================= */

/* Markierter Tag in der Timeline */
.day-group.selected-date {
    position: relative;
    border-radius: 14px;
    background: rgba(35, 133, 255, 0.09);
    outline: 2px solid rgba(65, 155, 255, 0.8);
    outline-offset: 3px;
    transition:
        background 0.25s ease,
        outline-color 0.25s ease;
}

/* Überschrift des markierten Timeline-Tages */
.day-group.selected-date > .day-title {
    color: #75b8ff;
}

/* Markierte Einträge unter "Nächste Termine & Aufgaben" */
.upcoming-item.selected-date {
    background: linear-gradient(
        120deg,
        rgba(35, 133, 255, 0.25),
        rgba(35, 133, 255, 0.09)
    ) !important;
    border-color: #4298ff !important;
    box-shadow:
        0 0 0 2px rgba(66, 152, 255, 0.45),
        0 5px 18px rgba(25, 105, 220, 0.18);
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

/* Datum und Titel der markierten Karte */
.upcoming-item.selected-date .upcoming-day,
.upcoming-item.selected-date .upcoming-name {
    color: #8bc5ff;
}

/* Tastaturfokus weiterhin sichtbar halten */
.upcoming-item.selected-date:focus-visible {
    outline: 2px solid #8bc5ff;
    outline-offset: 3px;
}





/* =========================================
   KURZE SMARTPHONE-DISPLAYS
   Terminliste um 50 px verkürzen
   ========================================= */

@media screen and (max-width: 600px) and (max-height: 750px) {
    #upcomingList {
        max-height: 170px !important;
    }
}














/* =========================================
   MOBILE: TIMELINE BEI GEÖFFNETEN
   KALENDER- UND TERMINPANELS AUSBLENDEN
   ========================================= */

@media screen and (max-width: 760px) {
    body.mobile-panels-expanded .timeline-heading,
    body.mobile-panels-expanded #timeline,
    body.mobile-panels-expanded .timeline-column > .timeline-content {
        display: none !important;
    }
}





/* =========================================================
   MOBILE-FIX: EINDEUTIGER SCROLLBEREICH DER TIMELINE
   Muss ganz am Ende der style.css stehen
   ========================================================= */

@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .app-shell {
        height: auto !important;
        min-height: 100dvh !important;
        overflow: visible !important;
    }

    .layout {
        grid-template-rows: 600px auto !important;
        overflow: visible !important;
    }

    .timeline-column {
        grid-column: 2 !important;
        grid-row: 1 !important;

        display: flex !important;
        flex-direction: column !important;

        height: 600px !important;
        min-height: 0 !important;
        max-height: 600px !important;

        overflow: hidden !important;
    }

    /* Überschrift und mobile Bedienelemente bleiben stehen */
    .timeline-column > .timeline-heading,
    .timeline-column > .mobile-tools {
        flex: 0 0 auto !important;
    }

    /* NUR dieser Bereich erhält den Scrollbalken */
    .timeline-column #timeline {
        display: block !important;
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-height: none !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;

        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        scrollbar-width: thin;
    }

    .timeline-column #timeline::-webkit-scrollbar {
        width: 5px;
    }

    .timeline-column #timeline::-webkit-scrollbar-thumb {
        background: #31577f;
        border-radius: 5px;
    }

    .mobile-bottom-panels {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }
}

