/* ========================================
   LubaNote – DESKTOP
   ======================================== */

@media (hover: hover) and (pointer: fine) {

  /* ========================================
     CELÁ APLIKACE
     ======================================== */

  .app {
    width: 94vw;
    max-width: 1400px;
    margin: 0 auto;
  }

  .appTabs,
  .appMain,
  .moduleBar {
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }
  

  .moduleTabs {
    flex: 1;
    justify-content: center;
  }


  /* ========================================
     HORNÍ NAVIGACE
     ======================================== */

  .moduleTab {
    font-size: clamp(
      1rem,
      0.7rem + 0.35vw,
      1.25rem
    );
  }

  .moduleTabIcon {
    font-size: clamp(
      1.1rem,
      0.8rem + 0.4vw,
      1.4rem
    );
  }


  /* ========================================
     POZNÁMKY – GRID 4 SLOUPCE
     ======================================== */

  .pinnedCards {
    display: block;
    width: 100%;
    padding: 0 0 32px;
  }

  #pinnedRight {
    display: none;
  }

  #pinnedLeft {
    width: 100%;
  }

  .pinnedCards:not(.listView) #pinnedLeft {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 18px;
  align-items: start;
}

.desktopMasonryColumn {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

  .pinnedCards:not(.listView) .taskCard {
  width: 100%;
  margin: 0;
}


  /* ========================================
     POZNÁMKY – LIST 2 SLOUPCE
     ======================================== */

  .pinnedCards.listView {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .pinnedCards.listView #pinnedLeft {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 18px;
    align-items: start;
  }

  .pinnedCards.listView .taskCard {
    width: 100%;
    margin: 0;
    padding: 18px 20px;
  }


  /* ========================================
     PLÁN – DESKTOP
     ======================================== */

  #calendarScreen:not([hidden]) {
    display: grid;

    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 0.75fr);

    grid-template-rows:
      auto auto auto;

    column-gap: 24px;
    align-items: start;

    width: min(1100px, calc(100% - 40px));
    max-width: none;

    margin: 0 auto;
    padding: 14px 0 32px;

    box-sizing: border-box;
  }

  .calendarHeader {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 8px;
  }

  .calendarHeader h2 {
    font-size: clamp(1.2rem, 0.9rem + 0.5vw, 1.6rem);
  }

  .calendarHeader button {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    cursor: pointer;
  }

  .calendarWeekdays {
    grid-column: 1;
    grid-row: 2;
    width: 560px;
    max-width: 100%;
    margin: 0 auto 5px;
    font-size: clamp(0.85rem, 0.7rem + 0.25vw, 1rem);
  }

  .calendarGrid {
    grid-column: 1;
    grid-row: 3;
    width: 560px;
    max-width: 100%;
    margin: 0 auto;
    gap: 6px;
  }

  .calendarDay {
    aspect-ratio: auto;
    min-height: 70px;
    border-radius: 11px;
    font-size: clamp(0.95rem, 0.75rem + 0.3vw, 1.15rem);
    cursor: pointer;
  }

  .calendarDay.hasItems::after {
    bottom: 4px;
  }

  .calendarAgenda {
    grid-column: 2;
    grid-row: 1 / span 3;
    position: sticky;
    top: 14px;
    margin: 0;
    padding: 14px 16px;
    box-sizing: border-box;
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .calendarAgenda::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  #calendarDayItems {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #calendarDayItems::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .calendarAgenda h3 {
    margin-bottom: 10px;
    font-size: 0.98rem;
  }

  .calendarAgendaItem {
    grid-template-columns: 56px minmax(0, 1fr) 40px;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.9rem;
    cursor: pointer;
  }

  .plannedTextLink {
    cursor: pointer;
  }




@media (hover: hover) and (pointer: fine) {
/* ========================================
   EDITOR – DESKTOP
   ======================================== */



.modalContent {
  width: min(90vw, 1500px);
  height: min(95dvh, 1100px);
}





  /* ========================================
     PŘIPOMÍNKY – DESKTOP
     ======================================== */

  .remindersToolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    margin: 0 0 16px;
  }

  .remindersToolbar .remindersFilters,
  .remindersToolbar .remindersStatusTabs {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
  }

  .remindersGroups {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }
}


/* ========================================
   ŠIROKÝ DESKTOP
   – agenda ve 2 sloupcích
   ======================================== */

@media (min-width: 1200px) {
  #calendarDayItems {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    align-content: start;
  }
}

/* ========================================
   EDITOR – SPODNÍ LIŠTA NA PC
   ======================================== */

.editorBottomBar {
  gap: 12px;
}

.editorBottomBar {
  gap: 18px;
}

.editorBottomBar > button {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;

  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 2.125rem;
  line-height: 1;

  border-radius: 14px;
  cursor: pointer;
}
}


@media (min-width: 900px) {
.cardMenu {
  grid-template-columns: repeat(6, auto);
  width: max-content;
  max-width: calc(100vw - 40px);

  padding: 8px;
  gap: 4px;

  border: 2px solid var(--color-accent);
  border-radius: 16px;

  background: var(--color-surface);

  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.3);
}

.cardMenu.selectionMode {
  grid-template-columns: repeat(4, auto);
}

.cardMenu button {
  white-space: nowrap;

  min-height: 46px;
  padding: 0 18px;

  border: 0;
  border-radius: 10px;

  background: transparent;
  color: var(--color-text);

  font-size: 0.9375rem;
  font-weight: 700;
}

.cardMenu button:hover {
  background: var(--color-background);
}

#editorQuickToolbar,
#editorToolsToolbar {
  flex: 0 0 auto;
}

#editorToolsToolbar {
  padding-left: 0;
}

.dateTimeInputs {
  margin-left: auto;
}



}

/* ==================================================
   LUBANOTE – NOVÉ DESKTOP ROZLOŽENÍ
   --------------------------------------------------
   Tato část je záměrně oddělená od mobilního UI.
   Sidebar je na touch/mobilních zařízeních skrytý.
================================================== */

.desktopSidebar {
  display: none;
}

@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body {
    padding-left: 236px;
    box-sizing: border-box;
  }

  /* ---------- LEVÝ SIDEBAR ---------- */

  .desktopSidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1800;

    display: flex;
    flex-direction: column;

    width: 236px;
    box-sizing: border-box;
    padding: 26px 16px 18px;

    border-right: 1px solid color-mix(
      in srgb,
      var(--color-border) 78%,
      transparent
    );

    background:
      linear-gradient(
        180deg,
        color-mix(in srgb, var(--color-surface) 96%, transparent),
        color-mix(in srgb, var(--color-background) 98%, transparent)
      );

    color: var(--color-text);
    text-align: left;
  }

  .desktopSidebarBrand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    margin: 0 8px 24px;
  }

  .desktopSidebarLogo {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    object-fit: cover;
    border-radius: 13px;

    box-shadow:
      0 8px 24px color-mix(
        in srgb,
        var(--color-accent) 28%,
        transparent
      );
  }

  .desktopSidebarBrandText {
    min-width: 0;
    color: var(--color-text);
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  .desktopSidebarBrandText span {
    color: var(--color-accent);
  }

  .desktopSidebarNav {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .desktopSidebarButton {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 9px;

    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 0 13px;

    border: 1px solid transparent;
    border-radius: 11px;

    background: transparent;
    color: var(--color-text-secondary);

    font: inherit;
    font-size: 0.95rem;
    font-weight: 620;
    text-align: left;

    cursor: pointer;
    transition:
      background 0.16s ease,
      border-color 0.16s ease,
      color 0.16s ease,
      transform 0.12s ease;
  }

  .desktopSidebarButton > span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 1.25rem;
  }

  .desktopSidebarButton:hover {
    background: color-mix(
      in srgb,
      var(--color-accent) 8%,
      var(--color-surface)
    );
    color: var(--color-text);
  }

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

  .desktopSidebarButton.active {
    border-color: color-mix(
      in srgb,
      var(--color-accent) 24%,
      transparent
    );
    background: color-mix(
      in srgb,
      var(--color-accent) 14%,
      var(--color-surface)
    );
    color: var(--color-accent);
  }

  .desktopSidebarDivider {
    height: 1px;
    margin: 18px 6px;
    background: color-mix(
      in srgb,
      var(--color-border) 76%,
      transparent
    );
  }

  .desktopSidebarNavSecondary {
    margin-top: 0;
  }

  .desktopSidebarFooter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 13px 12px 2px;
    color: var(--color-text-secondary);
    font-size: 0.78rem;
  }

  .desktopSidebarFooterDot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 12px color-mix(
      in srgb,
      var(--color-accent) 60%,
      transparent
    );
  }

  /* ---------- HLAVNÍ DESKTOP OBSAH ---------- */

  .homeHeader,
  .app {
    width: min(calc(100% - 48px), 1320px);
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
  }

  .homeHeader {
    padding: 20px 0 10px;
  }

  /* Logo už je vlevo v sidebaru. */
  .homeHeader .moduleLogo {
    display: none;
  }

  .moduleBar {
    justify-content: center;
    overflow: visible;
  }

  .moduleTabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;

    flex: 0 1 850px;
    width: min(100%, 850px);
  }

  .moduleTabs .moduleTab:nth-child(1),
  .moduleTabs .moduleTab:nth-child(2),
  .moduleTabs .moduleTab:nth-child(3) {
    flex: none;
  }

  .moduleTab {
    width: 100%;
    height: 54px;
    padding: 0 18px;

    border-radius: 13px;

    font-size: 1rem;
    font-weight: 720;
  }

  .moduleTabIcon {
    font-size: 1.2rem;
  }

  .moduleTab:hover:not(.active) {
    border-color: color-mix(
      in srgb,
      var(--color-accent) 24%,
      var(--color-border)
    );

    background: color-mix(
      in srgb,
      var(--color-accent) 5%,
      var(--color-surface)
    );
  }

  .moduleTab.active {
    border-color: color-mix(
      in srgb,
      var(--color-accent) 72%,
      transparent
    );

    background: linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-accent) 30%, var(--color-surface)),
      color-mix(in srgb, var(--color-accent) 12%, var(--color-surface))
    );

    color: var(--color-text);

    box-shadow:
      inset 0 -2px 0 var(--color-accent),
      0 8px 22px color-mix(
        in srgb,
        var(--color-accent) 12%,
        transparent
      );
  }

  /* ---------- HLEDÁNÍ ---------- */

  .searchRow {
    gap: 10px;
    margin-top: 14px;
  }

  .searchBox {
    height: 50px;
    padding: 0 15px;
    border-radius: 13px;
    box-shadow: none;
  }

  #searchNotes {
    height: 48px;
    padding: 12px 0;
    font-size: 1rem;
  }

  .searchActions {
    width: auto;
    gap: 8px;
  }

  .searchActions > button {
    width: 50px;
    height: 50px;
    border-radius: 13px;
  }

  /* ---------- FILTRY ---------- */

  .categoryTabs {
    gap: 8px;
    margin-top: 11px;
    padding-bottom: 4px;
  }

  .categoryTabs .categoryTab,
  #tagFilterButtons .categoryTab {
    min-height: 38px;
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 11px;
  }

  /* ---------- KARTY ---------- */

  .pinnedCards:not(.listView) #pinnedLeft {
    gap: 14px;
  }

  .desktopMasonryColumn {
    gap: 14px;
  }

  .taskCard {
    border-radius: 17px;
    padding: 16px 17px;

    box-shadow:
      inset 0 0 0 1px color-mix(
        in srgb,
        var(--color-border) 38%,
        transparent
      ),
      0 10px 24px rgba(0, 0, 0, 0.06);
  }

  .taskCard:hover {
    transform: translateY(-2px);
    box-shadow:
      inset 0 0 0 1px color-mix(
        in srgb,
        var(--color-accent) 22%,
        var(--color-border)
      ),
      0 14px 28px rgba(0, 0, 0, 0.1);
  }

  /* Floating + zůstává funkčně stejný, jen desktopově uhlazený. */
  .addTaskButton {
    right: 28px;
    bottom: 24px;
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    box-shadow:
      0 12px 30px color-mix(
        in srgb,
        var(--color-accent) 28%,
        transparent
      );
  }
}

/* ==================================================
   LUBANOTE – PROFESIONALNI SVG IKONY / DESKTOP
   --------------------------------------------------
   Vsechny ikony pouzivaji currentColor, proto se
   automaticky prizpusobi aktivnimu motivu.
================================================== */

@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .lubaSvgIcon {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    color: inherit;
    pointer-events: none;
  }

  .lubaSvgIcon * {
    vector-effect: non-scaling-stroke;
  }

  /* ---------- SIDEBAR ---------- */

  .desktopSidebarButton {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .desktopSidebarButton > .desktopSidebarIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;
    box-sizing: border-box;

    border: 1px solid transparent;
    border-radius: 9px;

    color: color-mix(
      in srgb,
      var(--color-text-secondary) 86%,
      var(--color-accent) 14%
    );

    background: transparent;

    transition:
      color 0.16s ease,
      background 0.16s ease,
      border-color 0.16s ease,
      box-shadow 0.16s ease,
      transform 0.16s ease;
  }

  .desktopSidebarIcon .lubaSvgIcon {
    width: 20px;
    height: 20px;
  }

  .desktopSidebarButton:hover > .desktopSidebarIcon {
    color: var(--color-text);
    background: color-mix(
      in srgb,
      var(--color-accent) 8%,
      transparent
    );
  }

  .desktopSidebarButton.active > .desktopSidebarIcon {
    color: var(--color-accent);

    border-color: color-mix(
      in srgb,
      var(--color-accent) 24%,
      transparent
    );

    background: color-mix(
      in srgb,
      var(--color-accent) 12%,
      var(--color-surface)
    );

    box-shadow:
      inset 0 0 0 1px color-mix(
        in srgb,
        var(--color-accent) 8%,
        transparent
      ),
      0 5px 14px color-mix(
        in srgb,
        var(--color-accent) 9%,
        transparent
      );
  }

  /* ---------- HORNI 3 MODULY ---------- */

  .moduleTab .moduleTabIcon.desktopModuleIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    box-sizing: border-box;

    margin-right: 2px;

    border: 1px solid color-mix(
      in srgb,
      var(--color-border) 72%,
      transparent
    );

    border-radius: 9px;

    color: color-mix(
      in srgb,
      var(--color-text-secondary) 88%,
      var(--color-accent) 12%
    );

    background: color-mix(
      in srgb,
      var(--color-surface) 90%,
      var(--color-accent) 10%
    );

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.035);

    transition:
      color 0.16s ease,
      border-color 0.16s ease,
      background 0.16s ease,
      box-shadow 0.16s ease,
      transform 0.16s ease;
  }

  .desktopModuleIcon .lubaSvgIcon {
    width: 19px;
    height: 19px;
  }

  .moduleTab:hover:not(.active) .desktopModuleIcon {
    color: var(--color-text);

    border-color: color-mix(
      in srgb,
      var(--color-accent) 22%,
      var(--color-border)
    );

    background: color-mix(
      in srgb,
      var(--color-accent) 8%,
      var(--color-surface)
    );
  }

  .moduleTab.active .desktopModuleIcon {
    color: var(--color-accent);

    border-color: color-mix(
      in srgb,
      var(--color-accent) 42%,
      transparent
    );

    background: color-mix(
      in srgb,
      var(--color-accent) 15%,
      var(--color-surface)
    );

    box-shadow:
      inset 0 0 0 1px color-mix(
        in srgb,
        var(--color-accent) 10%,
        transparent
      ),
      0 5px 14px color-mix(
        in srgb,
        var(--color-accent) 12%,
        transparent
      );
  }

  /* ---------- HLEDANI ---------- */

  .searchIcon.desktopSearchIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;
    flex: 0 0 22px;

    margin-right: 10px;

    color: color-mix(
      in srgb,
      var(--color-text-secondary) 88%,
      var(--color-accent) 12%
    );
  }

  .desktopSearchIcon .lubaSvgIcon {
    width: 20px;
    height: 20px;
  }

  @media (prefers-reduced-motion: no-preference) {
    .desktopSidebarButton:hover > .desktopSidebarIcon,
    .moduleTab:hover .desktopModuleIcon {
      transform: translateY(-1px);
    }
  }
}
/* =========================================
   DESKTOP – SKRYTI PANELU PRI EDITACI
   ========================================= */

@media (min-width: 900px) {

  body:has(#taskModal:not([hidden])) .desktopSidebar {
    display: none !important;
  }
}

/* ========================================
   VÝBĚR ČASU – DESKTOP DVA SLOUPCE

   Vlevo zůstává velký ciferník.
   Vpravo je celé Opakování + potvrzovací
   tlačítka. Mobilní rozložení se nemění.
   ======================================== */

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .timePickerModal {
    padding: 16px;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) {
    width: min(94vw, 780px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;

    padding: 18px 22px 20px;

    display: grid;
    grid-template-columns: minmax(360px, 1fr) 250px;
    grid-template-rows: auto auto 1fr auto;
    column-gap: 28px;
    row-gap: 8px;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerHeader {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerHeader h2 {
    font-size: 1.12rem;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) #closeTimePickerButton {
    width: 42px;
    height: 42px;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerSelected {
    grid-column: 1;
    grid-row: 2;

    gap: 9px;
    margin: 2px 0 4px;

    font-size: 2rem;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerSelectedPart {
    min-width: 68px;
    padding: 7px 10px;

    border-radius: 12px;
    font-size: 1.7rem;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerClock {
    grid-column: 1;
    grid-row: 3 / 5;

    width: min(42vh, 350px);
    max-width: 100%;

    align-self: center;
    justify-self: center;

    margin: 2px auto 0;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerClockNumber {
    width: 40px;
    height: 40px;
    font-size: 0.94rem;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatSection {
    grid-column: 2;
    grid-row: 2 / 4;

    align-self: center;

    margin: 0;
    padding: 0;
    border-top: 0;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatHeading {
    margin: 0 0 8px;
    font-size: 1rem;
    text-align: center;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatPresets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatPresets button,
  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatWeekdays button {
    min-height: 34px;
    padding: 5px 9px;

    border-radius: 10px;
    font-size: 0.9rem;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatWeekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    margin-top: 7px;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatWeekdays button {
    min-height: 30px;
    padding-inline: 1px;
    font-size: 0.78rem;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatSummary {
    margin-top: 7px;
    font-size: 0.84rem;
    text-align: center;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerActions {
    grid-column: 2;
    grid-row: 4;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;

    margin: 10px 0 0;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerActions button {
    min-height: 36px;
    padding: 5px 7px;

    border-radius: 10px;
    font-size: 0.86rem;
  }
}

/* Nižší notebook: ciferník zůstane dobře čitelný,
   ale nepřeroste dostupnou výšku. */
@media (min-width: 900px) and (max-height: 700px) and (hover: hover) and (pointer: fine) {
  .timePickerContent:has(.timeRepeatSection:not([hidden])) {
    grid-template-columns: minmax(330px, 1fr) 235px;
    column-gap: 22px;
    padding-block: 14px 16px;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timePickerClock {
    width: min(45vh, 315px);
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatPresets {
    gap: 4px;
  }

  .timePickerContent:has(.timeRepeatSection:not([hidden])) .timeRepeatPresets button {
    min-height: 31px;
    padding-block: 3px;
  }
}

/* =========================================
   EDITOR – PALETA BARVY TEXTU, PC
   Bílá/černá musí zůstat čitelné bez ohledu na motiv.
   ========================================= */
@media (min-width: 900px) {
  .editorTopBar .editorToolbarPanel.textColorPanel button.textColorWhite {
    color: #ffffff !important;
    background: #27313a !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
  }

  .editorTopBar .editorToolbarPanel.textColorPanel button.textColorBlack {
    color: #000000 !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.28) !important;
  }
}

/* ==========================================================
   PATCH 658Z – DESKTOP POZNÁMKY / VARIANTA A + PC VISUAL LAB
   Pouze desktop. Mobilní layout není dotčen.
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  :root {
    --ln-dnv-toolbar-height: 50px;
    --ln-dnv-toolbar-radius: 13px;
    --ln-dnv-toolbar-gap: 8px;
    --ln-dnv-search-width: 420px;
    --ln-dnv-search-radius: 13px;
    --ln-dnv-search-pad-x: 15px;
    --ln-dnv-filter-width: 50px;
    --ln-dnv-filter-radius: 13px;
    --ln-dnv-filter-gap: 7px;
    --ln-dnv-tag-height: 38px;
    --ln-dnv-tag-radius: 11px;
    --ln-dnv-tag-gap: 8px;
    --ln-dnv-card-padding: 16px;
    --ln-dnv-card-radius: 17px;
    --ln-dnv-card-gap: 14px;
  }

  body.desktopNotesToolbarA .searchRow {
    display: flex;
    align-items: center;
    width: 100%;
    gap: var(--ln-dnv-toolbar-gap);
  }

  body.desktopNotesToolbarA .searchRow .searchBox {
    flex: 0 1 var(--ln-dnv-search-width);
    width: var(--ln-dnv-search-width);
    min-width: 190px;
    max-width: var(--ln-dnv-search-width);
    height: var(--ln-dnv-toolbar-height) !important;
    padding-left: var(--ln-dnv-search-pad-x);
    padding-right: var(--ln-dnv-search-pad-x);
    border-radius: var(--ln-dnv-search-radius) !important;
  }

  body.desktopNotesToolbarA #searchNotes {
    height: calc(var(--ln-dnv-toolbar-height) - 2px) !important;
  }

  body.desktopNotesToolbarA .desktopCategoryActions {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    height: var(--ln-dnv-toolbar-height);
    gap: var(--ln-dnv-filter-gap);
    min-width: 0;
  }

  body.desktopNotesToolbarA .desktopCategoryActions .categoryTab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--ln-dnv-filter-width);
    width: var(--ln-dnv-filter-width);
    min-width: var(--ln-dnv-filter-width);
    height: var(--ln-dnv-toolbar-height) !important;
    min-height: var(--ln-dnv-toolbar-height) !important;
    padding: 0 8px;
    border-radius: var(--ln-dnv-filter-radius) !important;
  }

  body.desktopNotesToolbarA .desktopCategoryActions .categoryTabIconOnly {
    padding: 0;
  }

  body.desktopNotesToolbarA .searchActions {
    display: flex;
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
    gap: var(--ln-dnv-toolbar-gap);
  }

  body.desktopNotesToolbarA .searchActions > button {
    width: var(--ln-dnv-toolbar-height) !important;
    height: var(--ln-dnv-toolbar-height) !important;
    border-radius: var(--ln-dnv-toolbar-radius) !important;
  }

  body.desktopNotesToolbarA .categoryTabs {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    margin-top: var(--ln-dnv-toolbar-gap);
    padding-bottom: 4px;
    overflow: visible;
  }

  body.desktopNotesToolbarA .categoryTabs #tagFilterButtons {
    display: flex;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    gap: var(--ln-dnv-tag-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  body.desktopNotesToolbarA .categoryTabs #tagFilterButtons::-webkit-scrollbar {
    display: none;
  }

  body.desktopNotesToolbarA #tagFilterButtons .categoryTab {
    height: var(--ln-dnv-tag-height) !important;
    min-height: var(--ln-dnv-tag-height) !important;
    border-radius: var(--ln-dnv-tag-radius) !important;
  }

  body.desktopNotesToolbarA .pinnedCards:not(.listView) #pinnedLeft,
  body.desktopNotesToolbarA .pinnedCards.listView #pinnedLeft,
  body.desktopNotesToolbarA .desktopMasonryColumn {
    gap: var(--ln-dnv-card-gap) !important;
  }

  body.desktopNotesToolbarA .taskCard {
    border-radius: var(--ln-dnv-card-radius) !important;
    padding: var(--ln-dnv-card-padding) !important;
  }

  @media (max-width: 1399px) {
    body.desktopNotesToolbarA .searchRow .searchBox {
      min-width: 180px;
      width: min(var(--ln-dnv-search-width), 300px);
      max-width: min(var(--ln-dnv-search-width), 300px);
      flex-basis: min(var(--ln-dnv-search-width), 300px);
    }
  }
}

/* Samostatný plovoucí PC Visual Lab používá stejné vnitřní třídy jako ostatní Lab panely. */
#ln-dnvt-panel,
#ln-dnvt-panel * {
  box-sizing: border-box;
}

#ln-dnvt-panel {
  position: fixed !important;
  top: 96px;
  right: 18px;
  z-index: 2147483500 !important;
  width: min(360px, calc(100vw - 30px));
  max-height: min(72vh, 690px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--color-accent) 76%, #fff 24%);
  border-radius: 17px;
  background: color-mix(in srgb, var(--color-background) 95%, transparent);
  color: var(--color-text);
  box-shadow: 0 16px 56px rgba(0,0,0,.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#ln-dnvt-panel[hidden] { display: none !important; }
#ln-dnvt-panel.ln-nvt-minimized { max-height: 49px; }
#ln-dnvt-panel.ln-nvt-minimized .ln-nvt-body { display: none; }
#ln-dnvt-panel.ln-nvt-dragging .ln-nvt-head { cursor: grabbing; }

/* ==========================================================
   PATCH 658AA – DESKTOP NOTES TOOLBAR / MODULE ISOLATION
   ----------------------------------------------------------
   Navigation uses the native [hidden] attribute to hide the
   Notes search/filter rows outside the Notes module. Desktop
   Visual Lab rules set display:flex, so explicitly preserve
   [hidden] with higher priority. This keeps variant A strictly
   on the Notes screen and leaves Planner/Documents untouched.
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.desktopNotesToolbarA .searchRow[hidden],
  body.desktopNotesToolbarA .categoryTabs[hidden] {
    display: none !important;
  }
}


/* ==========================================================
   PATCH 658AE – DESKTOP SIDEBAR / MAIN MENU MERGE
   ----------------------------------------------------------
   PC: první duplicitní blok vlevo je skrytý, funkce z tlačítka
   ⋮ jsou přesunuty do levého panelu a samotné ⋮ je skryté.
   Mobil / APK beze změny.
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .desktopSidebarNav:not(.desktopSidebarNavSecondary) {
    display: none !important;
  }

  .desktopSidebar > .desktopSidebarDivider:first-of-type {
    display: none !important;
  }

  #mainMenuButton,
  #mainMenu {
    display: none !important;
  }

  .desktopSidebarNavSecondary {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .desktopSidebarDividerCompact {
    margin: 12px 6px 4px;
  }

  .desktopSidebarButtonDanger {
    color: color-mix(in srgb, #ff6d6d 78%, var(--color-text) 22%);
  }

  .desktopSidebarButtonDanger:hover {
    color: #ff8888;
    background: color-mix(in srgb, #ff6d6d 9%, var(--color-surface));
    border-color: color-mix(in srgb, #ff6d6d 18%, transparent);
  }
}


/* ==========================================================
   PATCH 658AF – DESKTOP SIDEBAR SCROLL + PLANNER VISUAL LAB
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  /* Brand a footer zůstávají na místě, dlouhý seznam nástrojů se roluje kolečkem. */
  .desktopSidebarNavSecondary {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--color-border) 85%, transparent) transparent;
    padding-right: 3px;
  }

  .desktopSidebarNavSecondary::-webkit-scrollbar {
    width: 7px;
  }

  .desktopSidebarNavSecondary::-webkit-scrollbar-track {
    background: transparent;
  }

  .desktopSidebarNavSecondary::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-border) 82%, transparent);
  }

  /* Planner desktop – hodnoty řídí nový PC Visual Lab. */
  #calendarScreen:not([hidden]) {
    grid-template-columns:
      minmax(0, var(--ln-dpv-calendar-share, 60%))
      minmax(0, 1fr);
    column-gap: var(--ln-dpv-column-gap, 20px);
    width: min(var(--ln-dpv-screen-width, 1160px), calc(100% - 28px));
    padding-top: var(--ln-dpv-screen-top, 8px);
  }

  .calendarWeekdays,
  .calendarGrid {
    width: min(var(--ln-dpv-grid-width, 620px), 100%);
  }

  .calendarGrid {
    gap: var(--ln-dpv-day-gap, 5px);
  }

  .calendarDay {
    min-height: var(--ln-dpv-day-height, 54px);
    border-radius: var(--ln-dpv-day-radius, 10px);
    font-size: var(--ln-dpv-day-font, 1rem);
  }

  .calendarAgenda {
    padding: var(--ln-dpv-agenda-pad, 12px);
    border-radius: var(--ln-dpv-agenda-radius, 14px);
    max-height: calc(100dvh - var(--ln-dpv-agenda-vspace, 170px));
  }

  .calendarAgendaHeader {
    gap: var(--ln-dpv-agenda-head-gap, 8px);
  }

  .calendarAgendaItem {
    grid-template-columns: var(--ln-dpv-time-width, 62px) minmax(0, 1fr) 34px;
    gap: var(--ln-dpv-item-gap, 9px);
    padding: var(--ln-dpv-item-pad-y, 7px) 0;
    font-size: var(--ln-dpv-item-font, 0.9375rem);
  }

  #calendarDayItems {
    display: grid !important;
    grid-template-columns: repeat(var(--ln-dpv-agenda-columns, 1), minmax(0, 1fr)) !important;
    column-gap: var(--ln-dpv-agenda-column-gap, 16px);
    align-content: start;
  }

  .plannerSubnav {
    gap: var(--ln-dpv-subnav-gap, 10px);
  }

  .plannerSubnavButton {
    min-height: var(--ln-dpv-subnav-height, 50px);
    border-radius: var(--ln-dpv-subnav-radius, 12px);
  }
}

#ln-dpvt-panel {
  position: fixed !important;
  top: 86px;
  right: 18px;
  z-index: 2147483500 !important;
  width: min(390px, calc(100vw - 30px));
  max-height: min(80vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--color-accent) 76%, #fff 24%);
  border-radius: 17px;
  background: color-mix(in srgb, var(--color-background) 95%, transparent);
  color: var(--color-text);
  box-shadow: 0 16px 56px rgba(0,0,0,.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#ln-dpvt-panel[hidden] { display: none !important; }
#ln-dpvt-panel.ln-nvt-minimized { max-height: 49px; }
#ln-dpvt-panel.ln-nvt-minimized .ln-nvt-body { display: none; }
#ln-dpvt-panel.ln-nvt-dragging .ln-nvt-head { cursor: grabbing; }
#ln-dpvt-panel .ln-nvt-body { overflow-y: auto; min-height: 0; }


/* ==========================================================
   PATCH 658AG – PC PLANNER / ČITELNÁ AGENDA + JEDNOTNÉ LIŠTY
   ----------------------------------------------------------
   - Kalendář / Připomínky: stejná výška a typografie jako horní moduly.
   - Agenda: datum + týden + plus tvoří jednu společnou lištu jako na mobilu.
   - Seznam úkolů se už nesmršťuje; má vlastní svislý scroll.
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  /* Dvě podzáložky mají na PC rozměr jednoho horního modulu, ne půl obrazovky. */
  .plannerSubnav {
    width: min(100%, 560px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ln-dpv-subnav-gap, 12px);
    margin-bottom: 14px;
    padding-inline: 0;
  }

  .plannerSubnavButton {
    width: 100%;
    min-height: 0;
    height: var(--ln-dpv-subnav-height, 54px);
    padding: 0 18px;
    border-radius: var(--ln-dpv-subnav-radius, 13px);
    gap: 8px;
    font-size: var(--ln-dpv-subnav-font, 1rem);
    font-weight: 720;
  }

  .plannerSubnavIcon,
  .plannerSubnavIcon .lubaSvgIcon {
    width: 1.2em;
    height: 1.2em;
  }

  /* Využít na širokém PC víc plochy pro pravou agendu. */
  #calendarScreen:not([hidden]) {
    grid-template-columns:
      minmax(0, var(--ln-dpv-calendar-share, 55%))
      minmax(0, 1fr);
    width: min(var(--ln-dpv-screen-width, 1240px), calc(100% - 28px));
  }

  /* Jedna lišta jako na mobilu: datum | týden | + */
  .calendarAgenda {
    overflow: hidden;
  }

  .calendarAgendaHeader {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 46px;
    align-items: center;
    gap: var(--ln-dpv-agenda-head-gap, 10px);
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    margin: 0 0 8px;
    padding: 5px 6px 5px 12px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
  }

  .calendarSelectedDateButton {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    max-width: none;
    height: 46px;
    margin: 0;
    padding: 0 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text);
    font-size: 0.9375rem;
    font-weight: 720;
    text-align: left;
    overflow: hidden;
  }

  .calendarSelectedDateButton::after,
  .calendarSelectedDateIcon {
    display: none !important;
  }

  .calendarSelectedDateText {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendarWeekNumber {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    margin: 0;
    padding: 0 4px;
    color: var(--color-text);
    font-size: 0.9375rem;
    font-weight: 720;
    line-height: 1;
    white-space: nowrap;
    transform: none;
  }

  .calendarAgendaHeader .plannerAddTaskButton {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: transparent;
    color: var(--color-accent);
  }

  /* Kritická oprava: úkoly se nesmí smrštit, ale rolovat. */
  #calendarDayItems {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color:
      color-mix(in srgb, var(--color-border) 88%, transparent)
      transparent;
    -webkit-mask-image: none;
    mask-image: none;
  }

  #calendarDayItems::-webkit-scrollbar {
    display: block;
    width: 7px;
    height: 7px;
  }

  #calendarDayItems::-webkit-scrollbar-track {
    background: transparent;
  }

  #calendarDayItems::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-border) 88%, transparent);
  }

  .calendarAgendaItem {
    flex: 0 0 auto;
    min-height: var(--ln-dpv-item-min-height, 48px);
    box-sizing: border-box;
    align-items: center;
    padding: var(--ln-dpv-item-pad-y, 7px) 0;
    line-height: 1.25;
  }

  .calendarAgendaText,
  .calendarAgendaTitle {
    min-width: 0;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.25;
  }
}

/* ==========================================================
   PATCH 658AH – PC PŘIPOMÍNKY / ČASOVÁ OSA – NÁVRH 3
   ----------------------------------------------------------
   Samostatný desktop layout. Mobilní Připomínky zůstávají
   beze změny. Původní toolbar + Dnes/Zítra/Později zůstávají
   v DOM jako funkční fallback, na PC je nahrazuje časová osa.
   ========================================================== */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body.desktopRemindersTimelineReady #remindersScreen:not([hidden]) {
    display: block;
    width: min(100%, 1180px);
    height: calc(100dvh - 242px);
    min-height: 430px;
    margin: 0 auto;
    padding: 0 14px 12px;
    overflow: hidden;
    background: transparent;
  }

  body.desktopRemindersTimelineReady #remindersScreen > .remindersToolbar,
  body.desktopRemindersTimelineReady #remindersScreen > .remindersGroups {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
  }

  .desktopRemindersLayout {
    display: grid;
    grid-template-columns: var(--ln-dpr-filter-width, 232px) minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .desktopRemindersFilterPanel,
  .desktopRemindersTimelinePanel {
    min-width: 0;
    min-height: 0;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--color-surface) 96%, var(--color-background));
  }

  .desktopRemindersFilterPanel {
    display: flex;
    flex-direction: column;
    padding: 14px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .desktopRemindersFilterPanel h2,
  .desktopRemindersTimelineHeader h2 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 780;
  }

  .desktopReminderSearch {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    min-height: 42px;
    margin: 12px 0 10px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-background);
    color: var(--color-text-secondary);
  }

  .desktopReminderSearch > span,
  .desktopReminderSearch .lubaSvgIcon {
    width: 18px;
    height: 18px;
  }

  .desktopReminderSearch input {
    min-width: 0;
    width: 100%;
    height: 40px;
    padding: 0 4px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 0.875rem;
  }

  .desktopReminderFilterList {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .desktopReminderFilterButton {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
  }

  .desktopReminderFilterButton:hover {
    background: color-mix(in srgb, var(--color-accent) 7%, var(--color-surface));
  }

  .desktopReminderFilterButton.active {
    border-color: color-mix(in srgb, var(--color-accent) 70%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 18%, var(--color-surface));
    color: var(--color-accent-text);
    box-shadow: inset 3px 0 0 var(--color-accent);
  }

  .desktopReminderFilterIcon,
  .desktopReminderFilterIcon .lubaSvgIcon {
    width: 18px;
    height: 18px;
  }

  .desktopReminderFilterCount {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 650;
  }

  .desktopReminderFilterSecondary {
    margin-top: 7px;
  }

  .desktopRemindersTimelinePanel {
    display: flex;
    flex-direction: column;
    padding: 12px 14px 14px;
    overflow: hidden;
  }

  .desktopRemindersTimelineHeader {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    margin: 0 0 10px;
  }

  .desktopReminderTimelineActions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .desktopReminderTimelineActions > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
  }

  .desktopReminderTimelineActions > button:hover {
    border-color: color-mix(in srgb, var(--color-accent) 54%, var(--color-border));
  }

  .desktopReminderTimelineActions .desktopReminderAdd {
    min-width: 104px;
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-accent-contrast, #fff);
  }

  .desktopReminderTimelineActions .lubaSvgIcon {
    width: 18px;
    height: 18px;
  }

  .desktopReminderCalendarButton {
    order: 4;
  }

  .desktopReminderTimelineActions .desktopReminderAdd {
    order: 5;
  }

  .desktopReminderCalendarPopover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 2147483400;
    width: 286px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: color-mix(in srgb, var(--color-surface) 98%, var(--color-background));
    color: var(--color-text);
    box-shadow: 0 16px 42px rgba(0,0,0,.22);
  }

  .desktopReminderCalendarPopover[hidden] {
    display: none !important;
  }

  .desktopReminderCalendarHead {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
  }

  .desktopReminderCalendarHead strong {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 780;
    text-transform: capitalize;
  }

  .desktopReminderCalendarHead button,
  .desktopReminderCalendarFoot button {
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  .desktopReminderCalendarWeekdays,
  .desktopReminderCalendarGrid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }

  .desktopReminderCalendarWeekdays {
    margin-bottom: 4px;
    color: var(--color-text-secondary);
    font-size: 0.6875rem;
    font-weight: 700;
    text-align: center;
  }

  .desktopReminderCalendarDay {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
  }

  .desktopReminderCalendarDay:hover {
    background: color-mix(in srgb, var(--color-accent) 9%, var(--color-surface));
  }

  .desktopReminderCalendarDay.is-outside {
    color: var(--color-text-secondary);
    opacity: .52;
  }

  .desktopReminderCalendarDay.is-today {
    border-color: color-mix(in srgb, var(--color-accent) 58%, var(--color-border));
    font-weight: 800;
  }

  .desktopReminderCalendarDay.is-selected {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-accent-contrast, #fff);
    font-weight: 850;
  }

  .desktopReminderCalendarFoot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
  }

  .desktopReminderCalendarFoot button {
    flex: 1;
    padding: 0 10px;
  }

  .desktopReminderTimelineScroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 4px 12px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--color-border) 88%, transparent) transparent;
  }

  .desktopReminderTimelineScroll::-webkit-scrollbar {
    display: block;
    width: 7px;
  }

  .desktopReminderTimelineScroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-border) 88%, transparent);
  }

  .desktopReminderDayGroup {
    margin: 0 0 var(--ln-dpr-group-gap, 17px);
    scroll-margin-top: 4px;
  }

  .desktopReminderDayTitle {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 0 8px 7px;
    color: var(--color-text);
    font-size: var(--ln-dpr-group-font, 1.0625rem);
    font-weight: 780;
    letter-spacing: 0;
    text-transform: none;
  }

  .desktopReminderDayTitle small {
    color: var(--color-text-secondary);
    font-size: .82em;
    font-weight: 600;
  }

  .desktopReminderDayRows {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--ln-dpr-row-radius, 11px);
    background: color-mix(in srgb, var(--color-surface) 92%, var(--color-background));
  }

  .desktopReminderTimelineRow.reminderItem {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) minmax(170px, auto) 30px;
    gap: 10px;
    align-items: center;
    min-height: var(--ln-dpr-row-min-height, 54px);
    margin: 0;
    padding: 7px 9px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: var(--ln-dpr-row-font, 1rem);
  }

  .desktopReminderTimelineRow.reminderItem:last-child {
    border-bottom: 0;
  }

  .desktopReminderTimelineRow.reminderItem:hover {
    background: color-mix(in srgb, var(--color-accent) 5%, var(--color-surface));
  }

  .desktopReminderTimelineRow .reminderItemTime {
    display: block;
    padding: 0;
    color: var(--color-accent-text);
    font-size: var(--ln-dpr-time-font, 1rem);
    font-weight: 780;
    line-height: 1.2;
  }

  .desktopReminderTimelineRow .reminderItemDateLine,
  .desktopReminderTimelineRow .reminderItemMeta {
    display: none !important;
  }

  .desktopReminderTimelineRow .reminderItemContent {
    min-width: 0;
  }

  .desktopReminderTimelineRow .reminderItemTitle {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--color-text);
    font-size: var(--ln-dpr-row-font, 1rem);
    font-weight: 620;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktopReminderTimelineRow .reminderItemPreview {
    max-width: 100%;
    margin-top: 3px;
    overflow: hidden;
    color: var(--color-text-secondary);
    font-size: calc(var(--ln-dpr-row-font, 1rem) - 0.125rem);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-line-clamp: unset;
  }

  .desktopReminderBadges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
  }

  .desktopReminderAreaBadge,
  .desktopReminderRepeatBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 720;
  }

  .desktopReminderAreaBadge.is-work {
    background: color-mix(in srgb, #4f7cff 13%, var(--color-surface));
    color: color-mix(in srgb, #4f7cff 82%, var(--color-text));
  }

  .desktopReminderAreaBadge.is-private {
    background: color-mix(in srgb, #ff8b5f 13%, var(--color-surface));
    color: color-mix(in srgb, #e56d42 86%, var(--color-text));
  }

  .desktopReminderRepeatBadge {
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
    color: var(--color-accent-text);
  }

  .desktopReminderTimelineRow .reminderItemMenu {
    display: grid;
    place-items: center;
    width: 30px;
    height: 34px;
    margin: 0;
    padding: 0;
  }

  .desktopReminderTimelineRow .reminderMenuSvgIcon,
  .desktopReminderTimelineRow .reminderItemMenu .lubaSvgIcon {
    width: 18px;
    height: 18px;
  }

  .desktopRemindersEmpty {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 220px;
    gap: 6px;
    color: var(--color-text-secondary);
    text-align: center;
  }

  .desktopRemindersEmpty strong {
    color: var(--color-text);
    font-size: 1.125rem;
  }
}


/* ==========================================================
   PATCH 658AJ – PC PŘIPOMÍNKY / NAV + SAFE AREA + BADGE GRID
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .desktopRemindersFilterPanel {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
  }

  .desktopReminderFilterList {
    flex: 0 0 auto;
    padding-bottom: 8px;
  }

  .desktopReminderTimelineRow.reminderItem {
    grid-template-columns: 76px minmax(0, 1fr) 214px 30px;
  }

  .desktopReminderBadges {
    display: grid;
    grid-template-columns: 118px 82px;
    align-items: center;
    justify-content: end;
    gap: 8px;
    width: 208px;
    min-width: 208px;
  }

  .desktopReminderBadgeSlot {
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .desktopReminderBadgeRepeatSlot {
    justify-content: flex-end;
  }

  .desktopReminderBadgeAreaSlot {
    justify-content: center;
  }

  .desktopReminderBadgeSlot.is-empty {
    visibility: hidden;
  }

  .desktopReminderRepeatBadge {
    width: 112px;
    box-sizing: border-box;
  }

  .desktopReminderAreaBadge {
    width: 78px;
    box-sizing: border-box;
  }
}

/* ==========================================================
   PATCH 658AS – PC VISUAL LAB AUDIT / AUTHORITATIVE LAYER
   ----------------------------------------------------------
   Opravuje napojení PC Notes Visual Labu na dnešní desktop UI.
   Tato vrstva je záměrně až na konci souboru, aby nebyla
   přepsána historickými desktop styly.
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  /* ---------- Layout Poznámek ---------- */
  body.desktopNotesToolbarA:has(#notesModuleButton.active) .homeHeader {
    padding-top: calc(20px + var(--ln-dnv-layout-offsetY, 0px)) !important;
  }

  body.desktopNotesToolbarA .searchRow {
    gap: var(--ln-dnv-layout-toolbarMezera, 8px) !important;
  }

  body.desktopNotesToolbarA .searchRow .searchBox {
    width: var(--ln-dnv-search-size, 420px) !important;
    max-width: var(--ln-dnv-search-size, 420px) !important;
    flex-basis: var(--ln-dnv-search-size, 420px) !important;
    height: var(--ln-dnv-layout-toolbarVyska, 50px) !important;
    border-radius: var(--ln-dnv-search-radius, 13px) !important;
  }

  body.desktopNotesToolbarA #searchNotes {
    height: calc(var(--ln-dnv-layout-toolbarVyska, 50px) - 2px) !important;
  }

  body.desktopNotesToolbarA .desktopCategoryActions {
    height: var(--ln-dnv-layout-toolbarVyska, 50px) !important;
    gap: var(--ln-dnv-layout-filtryMezera, 7px) !important;
  }

  body.desktopNotesToolbarA .desktopCategoryActions .categoryTab {
    width: var(--ln-dnv-primary-size, 50px) !important;
    min-width: var(--ln-dnv-primary-size, 50px) !important;
    flex-basis: var(--ln-dnv-primary-size, 50px) !important;
    height: var(--ln-dnv-layout-toolbarVyska, 50px) !important;
    min-height: var(--ln-dnv-layout-toolbarVyska, 50px) !important;
    border-radius: var(--ln-dnv-primary-radius, 13px) !important;
  }

  body.desktopNotesToolbarA .searchActions {
    gap: var(--ln-dnv-layout-toolbarMezera, 8px) !important;
  }

  body.desktopNotesToolbarA .searchActions > button {
    width: var(--ln-dnv-actions-size, 50px) !important;
    min-width: var(--ln-dnv-actions-size, 50px) !important;
    height: var(--ln-dnv-layout-toolbarVyska, 50px) !important;
    border-radius: var(--ln-dnv-actions-radius, 13px) !important;
  }

  body.desktopNotesToolbarA .categoryTabs {
    margin-top: var(--ln-dnv-layout-toolbarStitkyMezera, 8px) !important;
  }

  body.desktopNotesToolbarA .categoryTabs #tagFilterButtons {
    gap: var(--ln-dnv-layout-stitkyMezera, 8px) !important;
  }

  body.desktopNotesToolbarA #tagFilterButtons .categoryTab {
    height: var(--ln-dnv-tags-size, 38px) !important;
    min-height: var(--ln-dnv-tags-size, 38px) !important;
    border-radius: var(--ln-dnv-tags-radius, 11px) !important;
  }

  body.desktopNotesToolbarA .desktopCategoryActions .categoryTab.active,
  body.desktopNotesToolbarA #tagFilterButtons .categoryTab.active {
    border-color: color-mix(in srgb, var(--color-accent) 84%, var(--color-border)) !important;
    background: color-mix(in srgb, var(--color-accent) 18%, var(--color-surface)) !important;
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--color-accent) 26%, transparent),
      inset 0 -2px 0 color-mix(in srgb, var(--color-accent) 84%, transparent) !important;
  }

  body.desktopNotesToolbarA #pinnedCards {
    margin-top: var(--ln-dnv-layout-stitkyKartyMezera, 10px) !important;
  }

  body.desktopNotesToolbarA .pinnedCards:not(.listView) #pinnedLeft,
  body.desktopNotesToolbarA .pinnedCards.listView #pinnedLeft {
    column-gap: var(--ln-dnv-layout-kartySloupceMezera, 14px) !important;
    row-gap: var(--ln-dnv-layout-kartyRadkyMezera, 14px) !important;
  }

  body.desktopNotesToolbarA .desktopMasonryColumn {
    gap: var(--ln-dnv-layout-kartyRadkyMezera, 14px) !important;
  }

  body.desktopNotesToolbarA .taskCard {
    padding: var(--ln-dnv-cards-size, 16px) !important;
    border-radius: var(--ln-dnv-cards-radius, 17px) !important;
  }

  body:has(#notesModuleButton.active) .moduleTab {
    height: var(--ln-dnv-modules-size, 54px) !important;
    border-radius: var(--ln-dnv-modules-radius, 13px) !important;
  }

  body:has(#notesModuleButton.active) .syncTrafficBar {
    min-height: var(--ln-dnv-traffic-size, 22px) !important;
    border-radius: var(--ln-dnv-traffic-radius, 12px) !important;
  }

  body:has(#notesModuleButton.active) .addTaskButton {
    width: max(var(--ln-dnv-fab-size, 60px), 70px) !important;
    height: max(var(--ln-dnv-fab-size, 60px), 70px) !important;
    min-width: 70px !important;
    min-height: 70px !important;
    border-radius: max(var(--ln-dnv-fab-radius, 30px), 35px) !important;
    font-size: 2rem !important;
    line-height: 1 !important;
  }

  /* ---------- Ikony: běžné/emoji i SVG ---------- */
  body:has(#notesModuleButton.active) .moduleTabIcon {
    font-size: var(--ln-dnv-modules-classic-icon-size, 1.5rem) !important;
  }
  body:has(#notesModuleButton.active) .moduleTabIcon .lubaSvgIcon {
    width: var(--ln-dnv-modules-icon-size, 24px) !important;
    height: var(--ln-dnv-modules-icon-size, 24px) !important;
    stroke-width: var(--ln-dnv-modules-icon-stroke, 1.5) !important;
  }

  body.desktopNotesToolbarA .searchIcon {
    font-size: var(--ln-dnv-search-classic-icon-size, 1.375rem) !important;
  }
  body.desktopNotesToolbarA .searchIcon .lubaSvgIcon {
    width: var(--ln-dnv-search-icon-size, 22px) !important;
    height: var(--ln-dnv-search-icon-size, 22px) !important;
    stroke-width: var(--ln-dnv-search-icon-stroke, 1.5) !important;
  }

  body.desktopNotesToolbarA .desktopCategoryActions .categoryTabIcon {
    font-size: var(--ln-dnv-primary-classic-icon-size, 1.375rem) !important;
  }
  body.desktopNotesToolbarA .desktopCategoryActions .categoryTabIcon .lubaSvgIcon {
    width: var(--ln-dnv-primary-icon-size, 22px) !important;
    height: var(--ln-dnv-primary-icon-size, 22px) !important;
    stroke-width: var(--ln-dnv-primary-icon-stroke, 1.5) !important;
  }

  body.desktopNotesToolbarA .searchActions .searchActionIcon,
  body.desktopNotesToolbarA .searchActions .lubaActionIcon {
    font-size: var(--ln-dnv-actions-classic-icon-size, 1.375rem) !important;
  }
  body.desktopNotesToolbarA .searchActions .searchActionIcon .lubaSvgIcon,
  body.desktopNotesToolbarA .searchActions .lubaActionIcon .lubaSvgIcon,
  body.desktopNotesToolbarA .searchActions .sharingInvitationsIcon,
  body.desktopNotesToolbarA .searchActions .chatHeaderIcon {
    width: var(--ln-dnv-actions-icon-size, 22px) !important;
    height: var(--ln-dnv-actions-icon-size, 22px) !important;
    stroke-width: var(--ln-dnv-actions-icon-stroke, 1.5) !important;
  }

  /* ---------- Border Visual Lab ---------- */
  body[data-ln-dnv-modules-border="off"]:has(#notesModuleButton.active) .moduleTab,
  body[data-ln-dnv-traffic-border="off"]:has(#notesModuleButton.active) .syncTrafficBar,
  body[data-ln-dnv-search-border="off"].desktopNotesToolbarA .searchBox,
  body[data-ln-dnv-primary-border="off"].desktopNotesToolbarA .desktopCategoryActions .categoryTab,
  body[data-ln-dnv-actions-border="off"].desktopNotesToolbarA .searchActions > button,
  body[data-ln-dnv-tags-border="off"].desktopNotesToolbarA #tagFilterButtons .categoryTab,
  body[data-ln-dnv-cards-border="off"].desktopNotesToolbarA .taskCard,
  body[data-ln-dnv-fab-border="off"]:has(#notesModuleButton.active) .addTaskButton {
    border-width: 0 !important;
  }

  body[data-ln-dnv-modules-border="on"]:has(#notesModuleButton.active) .moduleTab { border-width: var(--ln-dnv-modules-border-width, 1px) !important; }
  body[data-ln-dnv-traffic-border="on"]:has(#notesModuleButton.active) .syncTrafficBar { border-width: var(--ln-dnv-traffic-border-width, 1px) !important; }
  body[data-ln-dnv-search-border="on"].desktopNotesToolbarA .searchBox { border-width: var(--ln-dnv-search-border-width, 1px) !important; }
  body[data-ln-dnv-primary-border="on"].desktopNotesToolbarA .desktopCategoryActions .categoryTab { border-width: var(--ln-dnv-primary-border-width, 1px) !important; }
  body[data-ln-dnv-actions-border="on"].desktopNotesToolbarA .searchActions > button { border-width: var(--ln-dnv-actions-border-width, 1px) !important; }
  body[data-ln-dnv-tags-border="on"].desktopNotesToolbarA #tagFilterButtons .categoryTab { border-width: var(--ln-dnv-tags-border-width, 1px) !important; }
  body[data-ln-dnv-cards-border="on"].desktopNotesToolbarA .taskCard { border-width: var(--ln-dnv-cards-border-width, 1px) !important; }
  body[data-ln-dnv-fab-border="on"]:has(#notesModuleButton.active) .addTaskButton { border-width: var(--ln-dnv-fab-border-width, 1px) !important; }

  /* tmavý / světlý odstín; legacy nechává původní theme border */
  body[data-ln-dnv-modules-mode="dark"]:has(#notesModuleButton.active) .moduleTab,
  body[data-ln-dnv-traffic-mode="dark"]:has(#notesModuleButton.active) .syncTrafficBar,
  body[data-ln-dnv-search-mode="dark"].desktopNotesToolbarA .searchBox,
  body[data-ln-dnv-primary-mode="dark"].desktopNotesToolbarA .desktopCategoryActions .categoryTab,
  body[data-ln-dnv-actions-mode="dark"].desktopNotesToolbarA .searchActions > button,
  body[data-ln-dnv-tags-mode="dark"].desktopNotesToolbarA #tagFilterButtons .categoryTab,
  body[data-ln-dnv-cards-mode="dark"].desktopNotesToolbarA .taskCard,
  body[data-ln-dnv-fab-mode="dark"]:has(#notesModuleButton.active) .addTaskButton {
    border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-primary-border-base, 82%), #000 var(--ln-dnv-primary-border-strength, 18%)) !important;
  }

  body[data-ln-dnv-modules-mode="light"]:has(#notesModuleButton.active) .moduleTab,
  body[data-ln-dnv-traffic-mode="light"]:has(#notesModuleButton.active) .syncTrafficBar,
  body[data-ln-dnv-search-mode="light"].desktopNotesToolbarA .searchBox,
  body[data-ln-dnv-primary-mode="light"].desktopNotesToolbarA .desktopCategoryActions .categoryTab,
  body[data-ln-dnv-actions-mode="light"].desktopNotesToolbarA .searchActions > button,
  body[data-ln-dnv-tags-mode="light"].desktopNotesToolbarA #tagFilterButtons .categoryTab,
  body[data-ln-dnv-cards-mode="light"].desktopNotesToolbarA .taskCard,
  body[data-ln-dnv-fab-mode="light"]:has(#notesModuleButton.active) .addTaskButton {
    border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-primary-border-base, 82%), #fff var(--ln-dnv-primary-border-strength, 18%)) !important;
  }

  /* ---------- Levý panel ---------- */
  body {
    padding-left: var(--ln-dnv-sidebar-width, 236px) !important;
  }

  .desktopSidebar {
    width: var(--ln-dnv-sidebar-width, 236px) !important;
    padding-left: var(--ln-dnv-sidebar-pad-x, 16px) !important;
    padding-right: var(--ln-dnv-sidebar-pad-x, 16px) !important;
  }

  .desktopSidebarNavSecondary {
    gap: var(--ln-dnv-sidebar-gap, 7px) !important;
  }

  .desktopSidebarButton {
    min-height: var(--ln-dnv-sidebar-item-height, 46px) !important;
    border-radius: var(--ln-dnv-sidebar-radius, 11px) !important;
    font-size: var(--ln-dnv-sidebar-text-size, 0.9375rem) !important;
    grid-template-columns: calc(var(--ln-dnv-sidebar-icon-size, 20px) + 14px) minmax(0, 1fr) !important;
  }

  .desktopSidebarButton > .desktopSidebarIcon {
    font-size: var(--ln-dnv-sidebar-classic-icon-size, 1.25rem) !important;
  }

  .desktopSidebarIcon .lubaSvgIcon {
    width: var(--ln-dnv-sidebar-icon-size, 20px) !important;
    height: var(--ln-dnv-sidebar-icon-size, 20px) !important;
  }

  .desktopSidebarLogo {
    width: var(--ln-dnv-sidebar-logo-size, 50px) !important;
    height: var(--ln-dnv-sidebar-logo-size, 50px) !important;
    flex-basis: var(--ln-dnv-sidebar-logo-size, 50px) !important;
  }
}

/* 658AS – každý prvek používá vlastní sílu odstínu borderu. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body[data-ln-dnv-modules-mode="dark"]:has(#notesModuleButton.active) .moduleTab { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-modules-border-base,82%), #000 var(--ln-dnv-modules-border-strength,18%)) !important; }
  body[data-ln-dnv-traffic-mode="dark"]:has(#notesModuleButton.active) .syncTrafficBar { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-traffic-border-base,82%), #000 var(--ln-dnv-traffic-border-strength,18%)) !important; }
  body[data-ln-dnv-search-mode="dark"].desktopNotesToolbarA .searchBox { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-search-border-base,82%), #000 var(--ln-dnv-search-border-strength,18%)) !important; }
  body[data-ln-dnv-primary-mode="dark"].desktopNotesToolbarA .desktopCategoryActions .categoryTab { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-primary-border-base,82%), #000 var(--ln-dnv-primary-border-strength,18%)) !important; }
  body[data-ln-dnv-actions-mode="dark"].desktopNotesToolbarA .searchActions > button { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-actions-border-base,82%), #000 var(--ln-dnv-actions-border-strength,18%)) !important; }
  body[data-ln-dnv-tags-mode="dark"].desktopNotesToolbarA #tagFilterButtons .categoryTab { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-tags-border-base,82%), #000 var(--ln-dnv-tags-border-strength,18%)) !important; }
  body[data-ln-dnv-cards-mode="dark"].desktopNotesToolbarA .taskCard { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-cards-border-base,82%), #000 var(--ln-dnv-cards-border-strength,18%)) !important; }
  body[data-ln-dnv-fab-mode="dark"]:has(#notesModuleButton.active) .addTaskButton { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-fab-border-base,82%), #000 var(--ln-dnv-fab-border-strength,18%)) !important; }

  body[data-ln-dnv-modules-mode="light"]:has(#notesModuleButton.active) .moduleTab { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-modules-border-base,82%), #fff var(--ln-dnv-modules-border-strength,18%)) !important; }
  body[data-ln-dnv-traffic-mode="light"]:has(#notesModuleButton.active) .syncTrafficBar { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-traffic-border-base,82%), #fff var(--ln-dnv-traffic-border-strength,18%)) !important; }
  body[data-ln-dnv-search-mode="light"].desktopNotesToolbarA .searchBox { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-search-border-base,82%), #fff var(--ln-dnv-search-border-strength,18%)) !important; }
  body[data-ln-dnv-primary-mode="light"].desktopNotesToolbarA .desktopCategoryActions .categoryTab { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-primary-border-base,82%), #fff var(--ln-dnv-primary-border-strength,18%)) !important; }
  body[data-ln-dnv-actions-mode="light"].desktopNotesToolbarA .searchActions > button { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-actions-border-base,82%), #fff var(--ln-dnv-actions-border-strength,18%)) !important; }
  body[data-ln-dnv-tags-mode="light"].desktopNotesToolbarA #tagFilterButtons .categoryTab { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-tags-border-base,82%), #fff var(--ln-dnv-tags-border-strength,18%)) !important; }
  body[data-ln-dnv-cards-mode="light"].desktopNotesToolbarA .taskCard { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-cards-border-base,82%), #fff var(--ln-dnv-cards-border-strength,18%)) !important; }
  body[data-ln-dnv-fab-mode="light"]:has(#notesModuleButton.active) .addTaskButton { border-color: color-mix(in srgb, var(--color-border) var(--ln-dnv-fab-border-base,82%), #fff var(--ln-dnv-fab-border-strength,18%)) !important; }
}

/* ==========================================================
   PATCH 658BF – DESKTOP TAG VERTICAL ALIGNMENT
   ----------------------------------------------------------
   Vlastní štítky mají pevnou výšku z PC Visual Labu. Při změně
   globálního rem musí text zůstat skutečně uprostřed a případně
   může tlačítko nepatrně vyrůst místo oříznutí.
   ========================================================== */
@media (min-width: 900px) {
  body.desktopNotesToolbarA #tagFilterButtons .categoryTab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
    line-height: 1.1 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: max(var(--ln-dnv-tag-height, 43px), calc(1.1em + 12px)) !important;
    min-height: max(var(--ln-dnv-tag-height, 43px), calc(1.1em + 12px)) !important;
  }
}

/* ==========================================================
   PATCH 658BN – PC PŘIPOMÍNKY / PLNÁ ŠÍŘKA + BEZ SCROLLU FILTRŮ
   ----------------------------------------------------------
   - využije celou dostupnou šířku desktopového obsahu
   - odstraní starou 76px safe-area rezervu z levého filtru
   - levý filtr už nemá vlastní scrollbar
   - pravá časová osa si ponechává vlastní scroll
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.desktopRemindersTimelineReady #remindersScreen:not([hidden]) {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .desktopRemindersFilterPanel {
    overflow-y: hidden;
    padding-bottom: 14px;
    scroll-padding-bottom: 0;
    overscroll-behavior: auto;
    scrollbar-width: none;
  }

  .desktopRemindersFilterPanel::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .desktopReminderFilterList {
    padding-bottom: 0;
  }
}

/* ==========================================================
   PATCH 661L – PC PLANNER / FINAL VISUAL LAB EXPORT + FULL MONTH
   ----------------------------------------------------------
   Finální hodnoty podle exportu 29. 9. 2026.
   Kalendář má pevnou kompaktní výšku dne 51 px a 5px mezery,
   aby se na PC zobrazil celý měsíc i na nižším viewportu.
   Visual Lab zůstává živý: CSS proměnné nastavené JS mají nad
   těmito fallback hodnotami přednost.
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  #calendarScreen:not([hidden]) {
    grid-template-columns:
      minmax(0, var(--ln-dpv-calendar-share, 49%))
      minmax(0, 1fr) !important;
    width: min(var(--ln-dpv-screen-width, 1248px), calc(100% - 28px)) !important;
    align-content: start !important;
    overflow: visible !important;
  }

  .calendarWeekdays,
  .calendarGrid {
    width: min(var(--ln-dpv-grid-width, 570px), 100%) !important;
  }

  .calendarGrid {
    gap: var(--ln-dpv-day-gap, 5px) !important;
    grid-auto-rows: var(--ln-dpv-day-height, 51px);
    align-content: start;
  }

  .calendarDay {
    height: var(--ln-dpv-day-height, 51px) !important;
    min-height: var(--ln-dpv-day-height, 51px) !important;
    border-radius: var(--ln-dpv-day-radius, 10px) !important;
    font-size: var(--ln-dpv-day-font, 17px) !important;
  }

  .calendarAgenda {
    padding: var(--ln-dpv-agenda-pad, 12px) !important;
    border-radius: var(--ln-dpv-agenda-radius, 14px) !important;
  }

  .calendarAgendaItem {
    grid-template-columns:
      var(--ln-dpv-time-width, 62px)
      minmax(0, 1fr)
      34px !important;
    gap: var(--ln-dpv-item-gap, 9px) !important;
    min-height: var(--ln-dpv-item-min-height, 48px) !important;
    padding-top: var(--ln-dpv-item-pad-y, 7px) !important;
    padding-bottom: var(--ln-dpv-item-pad-y, 7px) !important;
    font-size: var(--ln-dpv-item-font, 15px) !important;
  }

  .plannerSubnav {
    gap: var(--ln-dpv-subnav-gap, 12px) !important;
  }

  .plannerSubnavButton {
    height: var(--ln-dpv-subnav-height, 54px) !important;
    border-radius: var(--ln-dpv-subnav-radius, 13px) !important;
    font-size: var(--ln-dpv-subnav-font, 16px) !important;
  }

  .desktopRemindersLayout {
    grid-template-columns:
      var(--ln-dpr-filter-width, 310px)
      minmax(0, 1fr) !important;
  }

  .desktopReminderTimelineRow.reminderItem {
    min-height: var(--ln-dpr-row-min-height, 44px) !important;
    border-radius: var(--ln-dpr-row-radius, 10px) !important;
    font-size: var(--ln-dpr-row-font, 16px) !important;
  }

  .desktopReminderTimelineRow .reminderTime,
  .desktopReminderTimelineRow .reminderDateTime,
  .desktopReminderTimelineRow .desktopReminderTime {
    font-size: var(--ln-dpr-time-font, 16px) !important;
  }

  .desktopReminderGroupTitle,
  .desktopReminderTimelineGroupTitle {
    font-size: var(--ln-dpr-group-font, 17px) !important;
  }

  .desktopReminderTimelineGroup {
    margin-bottom: var(--ln-dpr-group-gap, 17px) !important;
  }
}

/* ==========================================================
   PATCH 661M – PC PŘIPOMÍNKY / SCROLL POUZE SEZNAMU FILTRŮ
   ----------------------------------------------------------
   Na nižším notebookovém viewportu se všechny filtry nevejdou.
   Nadpis a hledání zůstávají stále viditelné; scrolluje pouze
   seznam filtrů. Pravá timeline Připomínek se nemění.
   ========================================================== */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .desktopRemindersFilterPanel {
    overflow: hidden !important;
    min-height: 0 !important;
    padding-bottom: 14px !important;
  }

  .desktopReminderFilterList {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px !important;
    padding-bottom: 4px !important;
    overscroll-behavior: contain;
    scrollbar-width: thin !important;
    scrollbar-gutter: stable;
  }

  .desktopReminderFilterList::-webkit-scrollbar {
    width: 7px;
  }

  .desktopReminderFilterList::-webkit-scrollbar-track {
    background: transparent;
  }

  .desktopReminderFilterList::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-border) 82%, transparent);
  }
}


/* 683T / UX-05, UX-06 – jen PC s myší, mobilní editor beze změny. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  #taskModal .editorFindBar {
    width: min(520px, calc(100% - 24px));
    margin-left: auto;
    margin-right: auto;
  }
  #taskModal .editorTopBar .dateTimeInputs {
    margin-left: auto;
    margin-right: 0;
    gap: 5px;
  }
  #taskModal .editorTopBar .editorTopActions {
    flex: 0 0 auto;
    margin-left: 0;
    gap: 4px;
  }
}


/* PATCH 693A – PC: počet hned vedle názvu a přepínání 4 / 3 sloupců. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .moduleTabs .moduleTab .lnDesktopModuleCount693A {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 27px;
    min-height: 25px;
    padding: 2px 8px;
    margin-left: 7px;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, currentColor 9%, transparent);
    color: inherit;
    font-size: 0.85em;
    font-weight: 750;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    box-sizing: border-box;
  }
  .moduleTabs .moduleTab .lnDesktopModuleCount693A[hidden] {
    display: none !important;
  }

  /* Původní přepínač 4/2: zachovat 4-sloupcové masonry.
     Změnit POUZE druhý režim ze 2 na 3 sloupce. */
  .pinnedCards.listView #pinnedLeft {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* PATCH 693B – pouze PC; mobilní layout a jeho ovládání beze změny. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  /* Zachovat původní velikost všech tří modulů. */
  .moduleTabs .moduleTab .notesStorageScopeIcon { display: none !important; }
  .moduleTabs .moduleTab .notesModuleIconRow { gap: 0 !important; }
  .moduleTabs .moduleTab { column-gap: 14px !important; }
  .moduleTabs .moduleTab .moduleTabText { margin-left: 4px !important; }
  .moduleTabs .moduleTab .lnDesktopModuleCount693A { margin-left: 12px !important; }

  /* Měsíček se přesouvá přímo před zvoneček. */
  #lnDesktopStatus692A #quickThemeButton {
    display: inline-flex !important;
    position: static !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 12px;
  }
  .lnDesktopLocal693B #lnDesktopStatus692A .lnDesktopStatus692A-quota {
    display: none !important;
  }

  /* Pořadí: hledat, vše, pracovní, soukromé, oblíbené, oko,
     koš, nový štítek, slovník, sdílené, chat, sloupce. */
  body.desktopNotesToolbarA .searchRow { gap: 7px !important; }
  body.desktopNotesToolbarA .searchRow .searchBox {
    flex: 1 1 230px !important;
    width: auto !important;
    min-width: 150px !important;
    max-width: 420px !important;
  }
  body.desktopNotesToolbarA .desktopCategoryActions {
    gap: 6px !important;
    flex: 0 0 auto;
  }
  body.desktopNotesToolbarA .searchActions {
    gap: 7px !important;
    margin-left: auto;
  }
  body.desktopNotesToolbarA .desktopCategoryActions #lnDesktopNewTag693B {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 106px !important;
    height: var(--ln-dnv-layout-toolbarVyska, 50px) !important;
    padding: 0 12px !important;
    border: 1px solid var(--color-border);
    border-radius: var(--ln-dnv-primary-radius, 13px);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
  }
  body.desktopNotesToolbarA #tagFilterButtons > .newTagFilterButton {
    display: none !important;
  }
  body.desktopNotesToolbarA .searchActions #changeViewButton {
    width: auto !important;
    min-width: 86px !important;
    padding: 0 9px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }
  .lnDesktopColumnsLabel693B { font-size: 12px; font-weight: 700; white-space: nowrap; }
  /* Volné místo zůstává volné, žádné nové duplicitní funkce. */
}

/* 693C – PC responsive modules and true 6/8-square view button. */
@media (min-width:1100px) and (hover:hover) and (pointer:fine) {
  .moduleBar { width:100% !important; }
  nav.moduleTabs {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    width:100% !important;
    max-width:none !important;
    flex:1 1 100% !important;
    gap:14px !important;
    transform:none !important;
    translate:none !important;
  }
  nav.moduleTabs > .moduleTab {
    box-sizing:border-box !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    flex:1 1 auto !important;
    transform:none !important;
    translate:none !important;
    left:auto !important;
    right:auto !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:28px !important;
    padding-inline:12px !important;
    white-space:nowrap;
  }
  nav.moduleTabs > .moduleTab .notesModuleIconRow {
    display:inline-flex !important;
    align-items:center !important;
    flex:0 0 auto !important;
  }
  nav.moduleTabs > .moduleTab .moduleTabIcon { flex:0 0 auto !important; margin:0 !important; }
  nav.moduleTabs > .moduleTab .moduleTabText { margin:0 !important; flex:0 0 auto !important; }
  nav.moduleTabs > .moduleTab .lnDesktopModuleCount693A {
    margin:0 !important;
    flex:0 0 auto !important;
  }
  body.desktopNotesToolbarA .searchActions #changeViewButton {
    width:50px !important;
    min-width:50px !important;
    padding:0 !important;
  }
  body.desktopNotesToolbarA .searchActions #changeViewButton .lnColumnsIcon693C {
    display:block !important;
    flex:none;
  }
  body.desktopNotesToolbarA .searchActions #changeViewButton .lnDesktopColumnsLabel693B {
    display:none !important;
  }
}


/* 693D – stejná výška i šířka čtverečků v obou režimech. */
@media (min-width:1100px) and (hover:hover) and (pointer:fine) {
  body.desktopNotesToolbarA .searchActions #changeViewButton {
    width:66px !important;
    min-width:66px !important;
  }
  body.desktopNotesToolbarA .searchActions #changeViewButton .lnColumnsIcon693C {
    width:42px !important;
    height:24px !important;
    overflow:visible;
  }
  #lnDesktopThemeCycle693D {
    display:inline-flex;
    width:38px;
    height:38px;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    border:1px solid var(--color-border, #bbb);
    background:transparent;
    color:inherit;
    cursor:pointer;
    flex:none;
  }
}

/* 693E – PC: o 3 px větší mezery mezi ovládacími tlačítky. */
@media (min-width:1100px) and (hover:hover) and (pointer:fine) {
  body.desktopNotesToolbarA .desktopCategoryActions { gap:9px !important; }
  body.desktopNotesToolbarA .searchActions { gap:10px !important; }
}

/* 699AN – desktop: rozšířit aktivní hledání nad toolbar, bez posouvání
 * ostatních filtrů. V klidu platí všechna původní PC nastavení/Visual Lab.
 * Mobilní kompaktní vyhledávání se nemění. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.desktopNotesToolbarA .searchRow {
    position: relative;
  }
  body.desktopNotesToolbarA .searchRow.searchExpanded .searchBox {
    position: absolute !important;
    z-index: 60;
    inset: 0 auto auto 0;
    box-sizing: border-box;
    width: min(calc(var(--ln-dnv-search-size, 420px) * 2), 100%) !important;
    max-width: min(calc(var(--ln-dnv-search-size, 420px) * 2), 100%) !important;
    min-width: 0 !important;
    flex: none !important;
    box-shadow: 0 8px 22px rgba(23, 19, 47, 0.16);
  }
  body.desktopNotesToolbarA .searchRow.searchExpanded .desktopCategoryActions,
  body.desktopNotesToolbarA .searchRow.searchExpanded .searchActions {
    visibility: hidden;
    pointer-events: none;
  }
}

/* 699AO – PC aktivni hledani: konec na prave hrane druheho modulu Plan.
 * 693C: moduly tvori 3 stejne sloupce v 100% sirce s gap=14px.
 * Pravy okraj druheho = (2/3 * sirka) - (14px/3).
 * Nemenime velikost neaktivniho hledani ani layout mobilu.
 * Po dobu hledani vedle pole zustanou 4 uzitecne filtry.
 */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.desktopNotesToolbarA .searchRow.searchExpanded {
    --ln-699ao-plan-right: calc(66.666667% - 4.666667px);
  }
  body.desktopNotesToolbarA .searchRow.searchExpanded .searchBox {
    width: var(--ln-699ao-plan-right) !important;
    max-width: var(--ln-699ao-plan-right) !important;
  }
  body.desktopNotesToolbarA .searchRow.searchExpanded .desktopCategoryActions {
    position: absolute !important;
    z-index: 61;
    top: 0;
    left: calc(66.666667% + 3.333333px);
    right: 0;
    height: var(--ln-dnv-layout-toolbarVyska, 50px) !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  body.desktopNotesToolbarA .searchRow.searchExpanded .desktopCategoryActions > * {
    display: none !important;
  }
  body.desktopNotesToolbarA .searchRow.searchExpanded .desktopCategoryActions > :is(
    [data-area-filter="all"],
    [data-area-filter="work"],
    [data-area-filter="private"],
    #favoriteFilterButton
  ) {
    display: inline-flex !important;
    flex: 1 1 50px !important;
    width: auto !important;
    min-width: 36px !important;
    max-width: 65px !important;
    height: var(--ln-dnv-layout-toolbarVyska, 50px) !important;
  }
  body.desktopNotesToolbarA .searchRow.searchExpanded .desktopCategoryActions > [data-area-filter="all"] { order: 1; }
  body.desktopNotesToolbarA .searchRow.searchExpanded .desktopCategoryActions > [data-area-filter="work"] { order: 2; }
  body.desktopNotesToolbarA .searchRow.searchExpanded .desktopCategoryActions > [data-area-filter="private"] { order: 3; }
  body.desktopNotesToolbarA .searchRow.searchExpanded .desktopCategoryActions > #favoriteFilterButton { order: 4; }
}

/* 699AP – PC editor: hledání vlevo, kompaktní datum + den v jednom
 * tlačítku, čas s rezervou od pravého okraje, plocha +10 px na straně. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  #taskModal > .modalContent {
    width: min(calc(90vw + 40px), calc(100vw - 16px), 1540px);
    height: min(calc(95dvh + 20px), calc(100dvh - 16px), 1120px);
  }

  #taskModal .editorFindBar {
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  #taskModal .editorTopBar .dateTimeInputs {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0;
    margin-left: auto;
    margin-right: 0;
    gap: 9px;
  }

  #taskModal .editorTopBar #modalDateButton {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 12px;
    gap: 8px;
    white-space: nowrap;
  }

  #taskModal .editorTopBar #modalDateButton #modalWeekday {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0 !important;
    font-size: 0.85rem;
    opacity: 0.8;
  }

  #taskModal .editorTopBar #modalDateButton #modalDateLabel {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0;
  }

  #taskModal .editorTopBar #modalTimeButton {
    flex: 0 0 88px !important;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
  }
}


/* 699AQ – trisloupcove karty stejne svisle skladani jako ctyrsloupcove.
   Jednotlive karty jsou uvnitr stabilnich flex sloupcu, ne v radcich. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .pinnedCards.listView #pinnedLeft {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .pinnedCards.listView .desktopMasonryColumn {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: var(--ln-dnv-layout-kartyRadkyMezera, 14px);
  }
  /* 699AR: pevna pozice nad PC oznamovacim toastem, zadne poskakovani.
     Mobilni pozice tlacitka + zustava beze zmeny. */
  body:has(#notesModuleButton.active) #addTaskButton {
    bottom: 250px !important;
  }
}


/* 699BG-C – kompaktni PC toolbar 900–1099 CSS px.
 * Bez zmeny mobilu a sirokeho PC >=1100 px. */
@media (min-width: 900px) and (max-width: 1099px) and (hover: hover) and (pointer: fine) {
  body.desktopNotesToolbarA .searchRow {
    display: flex !important;
    position: relative !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  body.desktopNotesToolbarA .searchRow .searchBox {
    box-sizing: border-box !important;
    /* 699BG-D: hledani vyplni zbyvajici misto v jedinem radku. */
    flex: 1 1 52px !important;
    width: auto !important;
    min-width: 52px !important;
    max-width: none !important;
    overflow: hidden !important;
  }
  body.desktopNotesToolbarA .searchRow.searchExpanded .searchBox,
  body.desktopNotesToolbarA .searchRow .searchBox:focus-within {
    position: absolute !important;
    z-index: 65 !important;
    left: 0 !important;
    top: 0 !important;
    box-sizing: border-box !important;
    width: min(420px, 100%) !important;
    min-width: 0 !important;
    max-width: min(420px, 100%) !important;
    overflow: visible !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.2) !important;
  }
  body.desktopNotesToolbarA .desktopCategoryActions {
    display: flex !important;
    position: static !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    overflow: visible !important;
  }
  body.desktopNotesToolbarA .desktopCategoryActions > .categoryTab {
    box-sizing: border-box !important;
    flex: 0 0 55px !important;
    width: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding-inline: 3px !important;
  }
  body.desktopNotesToolbarA .desktopCategoryActions > #lnDesktopNewTag693B {
    box-sizing: border-box !important;
    display: inline-flex !important;
    position: static !important;
    transform: none !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 113px !important;
    width: 113px !important;
    min-width: 113px !important;
    max-width: 113px !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    white-space: nowrap !important;
    background: var(--color-surface) !important;
    color: var(--color-text) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 12px !important;
    font: inherit !important;
    font-weight: 600 !important;
  }
  body.desktopNotesToolbarA .searchActions {
    display: flex !important;
    position: static !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    margin-left: 0 !important;
  }
  body.desktopNotesToolbarA .searchActions > button:not([hidden]) {
    box-sizing: border-box !important;
    position: static !important;
    transform: none !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 46px !important;
    padding: 0 !important;
  }
  body.desktopNotesToolbarA .searchActions > button[hidden] {
    display: none !important;
  }
  body.desktopNotesToolbarA .searchActions > #changeViewButton:not([hidden]) {
    flex-basis: 58px !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
  }
  body.desktopNotesToolbarA #changeViewButton .lnColumnsIcon693C {
    display: block !important;
    width: 42px !important;
    height: 24px !important;
    flex: none !important;
  }
  body.desktopNotesToolbarA .categoryTabs {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  body.desktopNotesToolbarA #tagFilterButtons {
    display: flex !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  body.desktopNotesToolbarA #tagFilterButtons > * { flex-shrink: 0 !important; }
  #lnDesktopThemeCycle693D {
    background: var(--color-surface) !important;
    color: var(--color-text) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 12px !important;
  }
}


/* 699BG-I – PC editor: pouze pokud se skupiny nevejdou vedle sebe.
 * Rezim aktivuje Editor Core V2 Bridge podle skutecnych sirok prvku.
 * Na beznem PC bez tridy zustava puvodni rozlozeni 1:1.
 */
@media (min-width: 900px) {
  #taskModal.lnEditorTwoGroups699BI .editorTopBar {
    min-width: 0;
    max-width: 100%;
    gap: 6px;
  }

  #taskModal.lnEditorTwoGroups699BI .editorTopBar #editorToolbarToggle {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  #taskModal.lnEditorTwoGroups699BI .editorTopBar #editorQuickToolbar,
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #editorToolsToolbar {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100%;
    padding: 0 2px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #editorQuickToolbar::-webkit-scrollbar,
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #editorToolsToolbar::-webkit-scrollbar {
    display: block;
    height: 4px;
  }

  #taskModal.lnEditorTwoGroups699BI .editorTopBar .dateTimeInputs {
    flex: 0 0 auto !important;
    min-width: 0;
    margin-left: auto;
    gap: 4px;
  }

  /* 699BG-K: PC - den v tydnu i CELE datum v jednom tlacitku.
   * Puvodni pravidlo z desktop.css obsahuje !important, proto je
   * nutne jej prebit stejnou prioritou, ale JEN v rezimu dvou skupin.
   * Bez teto tridy (napr. siroke PC, 125 % kdyz se vse vejde)
   * zachovavame puvodni rozmery. */
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #modalDateButton {
    box-sizing: border-box;
    flex: 0 0 220px !important;
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    padding: 0 10px;
    overflow: hidden;
  }

  #taskModal.lnEditorTwoGroups699BI .editorTopBar #modalTimeButton {
    flex: 0 0 82px;
    box-sizing: border-box;
    min-width: 0;
    padding: 0 5px;
    overflow: hidden;
  }

  #taskModal.lnEditorTwoGroups699BI .editorTopBar .editorTopActions {
    flex: 0 0 auto;
    margin-left: 0;
  }
}

/* 699BG-J: datum v kompaktnim PC editoru nesmi mit oriznuty rok.
   Siroka PC lista i Android zustavaji beze zmeny. */
@media (min-width: 900px) {
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #modalDateButton #modalDateLabel {
    width: max-content;
    min-width: max-content;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }
}

/* 699BG-L – den v tydnu nesmi roztahnout obsah datumoveho tlacitka.
   Plati pouze pri aktivnim rozdeleni PC nastroju do dvou skupin. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #modalDateButton {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #modalDateButton #modalWeekday {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: max-content !important;
    white-space: nowrap !important;
  }
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #modalDateButton #modalDateLabel {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    white-space: nowrap !important;
  }
}

/* 699BG-M: sirka data podle obsahu pouze ve dvouskupinovem PC editoru.
   !important prebiji starsi pevnou sirku 220 px z 699BG-K. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  #taskModal.lnEditorTwoGroups699BI .editorTopBar #modalDateButton {
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    padding-inline: 12px !important;
    overflow: visible !important;
  }
}

/* 699BG-N – respektovat navigaci mezi moduly.
   Desktopove display:flex !important nesmi prebit atribut hidden. */
body.desktopNotesToolbarA .searchRow[hidden],
body.desktopNotesToolbarA .categoryTabs[hidden] {
  display: none !important;
}

/* 699BG-O – kompaktní PC Plán (900–1099 CSS px, myš).
   Opravuje 699BG-N: měsíc zůstává vlevo, agenda vpravo.
   Zmenší pouze hlavičku aktivního Plánu a zachová všechny důležité akce.
   Vypnuté pro Android/touch a pro široké PC >=1100 CSS px.
*/
@media (min-width: 900px) and (max-width: 1099px) and (hover: hover) and (pointer: fine) {
  /* V Plánu není třeba opakovat logo a den v horním stavovém řádku.
     Synchronizace, cloudová spotřeba, čas a navigace zůstávají. */
  body:has(#plannerModuleButton.active) .homeHeader {
    padding: 4px 8px 2px !important;
  }
  body:has(#plannerModuleButton.active) .homeHeader .moduleLogo,
  body:has(#plannerModuleButton.active) .homeHeader #lnHomeDate683BC {
    display: none !important;
  }
  body:has(#plannerModuleButton.active) .homeHeader #lnHomeDateTime683BC {
    min-height: 32px !important;
    margin: 0 0 4px !important;
    padding: 4px 9px !important;
    gap: 6px;
  }
  body:has(#plannerModuleButton.active) .homeHeader .moduleBar {
    gap: 0;
    overflow: visible;
    min-height: 0;
    margin: 0;
  }
  body:has(#plannerModuleButton.active) .homeHeader nav.moduleTabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    gap: 6px;
  }
  body:has(#plannerModuleButton.active) .homeHeader nav.moduleTabs > .moduleTab {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    flex: none;
    height: 40px !important;
    min-height: 40px;
    padding: 3px 7px;
    gap: 5px;
    font-size: 0.875rem;
    border-radius: 10px;
  }
  body:has(#plannerModuleButton.active) #plannerSubnav:not([hidden]) {
    width: min(100%, 940px);
    margin: 2px auto 4px;
    padding: 0 8px;
    gap: 6px;
  }
  body:has(#plannerModuleButton.active) #plannerSubnav .plannerSubnavButton {
    min-height: 38px;
    height: 38px;
    box-sizing: border-box;
    padding: 4px 8px;
    gap: 5px;
    border-radius: 10px;
    font-size: 0.875rem;
  }

  /* Kalendář + agenda musí být současně na obrazovce. */
  #calendarScreen:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
    width: min(1050px, calc(100% - 20px));
    max-width: none;
    margin: 0 auto;
    padding: 5px 0 14px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto; /* Na nižší obrazovce musí být dosažitelný i poslední týden. */
  }
  #calendarScreen .calendarHeader {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 3px;
  }
  #calendarScreen .calendarHeader button {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
  #calendarScreen .calendarHeader h2 {
    font-size: 1.06rem;
  }
  #calendarScreen .calendarWeekdays {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 100%;
    margin: 0 0 4px;
  }
  #calendarScreen .calendarGrid {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 3px;
    align-content: start;
  }
  #calendarScreen .calendarDay {
    box-sizing: border-box;
    height: 37px;
    min-height: 37px;
    aspect-ratio: auto;
    padding: 2px;
    border-radius: 9px;
  }
  #calendarScreen .calendarDay.hasItems::after {
    bottom: 2px;
  }

  /* Pravý panel: zvolený den nahoře, scrollují jen úkoly pod ním. */
  #calendarScreen .calendarAgenda {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: clamp(205px, calc(100dvh - 176px), 540px);
    min-height: 0;
    max-height: none;
    position: static;
    margin: 0;
    padding: 8px;
    overflow: hidden;
    border-radius: 13px;
  }
  #calendarScreen .calendarAgendaHeader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 36px;
    align-items: center;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin: 0 0 6px;
    gap: 5px;
  }
  #calendarScreen .calendarSelectedDateButton {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.84rem;
  }
  #calendarScreen .calendarSelectedDateText {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #calendarScreen .calendarWeekNumber {
    font-size: 0.82rem;
    transform: none;
  }
  #calendarScreen #plannerAddTaskButton {
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
  }
  #calendarScreen #calendarDayItems {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    overscroll-behavior: contain;
  }
  #calendarScreen .calendarAgendaItem {
    grid-template-columns: 47px minmax(0, 1fr) 30px;
    gap: 6px;
    padding: 7px 0;
    font-size: 0.88rem;
  }
}


/* 699BG-P – Připomínky na kompaktním PC (např. 150 % zoom).
 * Stejná dvousloupcová PC časová osa jako na 100/125 %, jen kompaktnější.
 * Bez zásahu do Androidu, dotykových zařízení a širokého PC. */
@media (min-width: 900px) and (max-width: 1099px) and (hover: hover) and (pointer: fine) {
  body.desktopRemindersTimelineReady #remindersScreen:not([hidden]) {
    display: block;
    box-sizing: border-box;
    width: min(100%, 100vw);
    max-width: none;
    height: calc(100dvh - 172px);
    min-height: 0;
    margin: 0 auto;
    padding: 0 12px 8px;
    overflow: hidden;
    background: transparent;
  }
  #remindersScreen .desktopRemindersLayout {
    display: grid;
    grid-template-columns: minmax(188px, 26%) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  #remindersScreen .desktopRemindersFilterPanel,
  #remindersScreen .desktopRemindersTimelinePanel {
    min-width: 0;
    min-height: 0;
  }
  #remindersScreen .desktopRemindersFilterPanel {
    padding: 9px;
    overflow: hidden;
  }
  #remindersScreen .desktopRemindersFilterPanel h2 {
    font-size: 1rem;
    margin: 0;
  }
  #remindersScreen .desktopReminderSearch {
    flex: 0 0 auto;
    min-height: 36px;
    margin: 7px 0;
    grid-template-columns: 22px minmax(0, 1fr);
  }
  #remindersScreen .desktopReminderSearch input {
    height: 34px;
    font-size: 0.8rem;
  }
  #remindersScreen .desktopReminderFilterList {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 3px 5px 0;
    gap: 4px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  #remindersScreen .desktopReminderFilterButton {
    min-height: 35px;
    gap: 5px;
    grid-template-columns: 19px minmax(0, 1fr) auto;
    padding: 3px 7px;
    font-size: 0.78rem;
  }
  #remindersScreen .desktopRemindersTimelinePanel {
    padding: 9px;
  }
  #remindersScreen .desktopRemindersTimelineHeader {
    min-height: 39px;
    gap: 5px;
    margin-bottom: 7px;
  }
  #remindersScreen .desktopRemindersTimelineHeader h2 {
    font-size: 1rem;
  }
  #remindersScreen .desktopReminderTimelineActions {
    gap: 3px;
  }
  #remindersScreen .desktopReminderTimelineActions > button {
    min-width: 30px;
    height: 34px;
    padding: 0 6px;
    font-size: 0.8rem;
  }
  #remindersScreen .desktopReminderTimelineActions .desktopReminderAdd {
    min-width: 76px;
    padding-inline: 6px;
  }
  #remindersScreen .desktopReminderCalendarPopover {
    width: min(286px, 72vw);
    box-sizing: border-box;
  }
  #remindersScreen .desktopReminderTimelineScroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
  }
  #remindersScreen .desktopReminderTimelineRow.reminderItem {
    grid-template-columns: 56px minmax(0, 1fr) minmax(70px, auto) 28px;
    column-gap: 5px;
    min-height: 42px;
    padding: 6px;
    font-size: 0.81rem;
  }
  #remindersScreen .desktopReminderBadges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 3px;
    width: auto;
    min-width: 0;
  }
  #remindersScreen .desktopReminderBadgeSlot {
    width: auto;
    min-width: 0;
  }
  #remindersScreen .desktopReminderRepeatBadge,
  #remindersScreen .desktopReminderAreaBadge {
    width: auto;
    min-width: 0;
    padding-inline: 4px;
    font-size: 0.68rem;
  }
  #remindersScreen .desktopReminderDayTitle {
    font-size: 0.85rem;
  }
}

/* Pokud se PC okno zmenší pod hranici desktopového rozložení, znovu
 * zobrazit původní responzivní Připomínky a PC časovou osu skrýt. */
@media (max-width: 899px), (hover: none), (pointer: coarse) {
  #desktopRemindersTimeline {
    display: none !important;
  }
}


/* 699BG-S – PC (900–1099 CSS px): obsah připomínky je při zoomu
   zabalen do .reminderItemSwipeContent (vytváří reminders.js pod 1100 px).
   Sloupce musí být na tomto vnitřním obalu, nikoliv pouze na řádku.
   Nedotýká se APK, dotykového UI ani desktopu nad 1099 px. */
@media (min-width: 900px) and (max-width: 1099px) and (hover: hover) and (pointer: fine) {
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow.reminderItem:has(> .reminderItemSwipeContent) {
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }

  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow > .reminderItemSwipeContent {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) 138px 30px !important;
    align-items: center;
    column-gap: 5px;
    row-gap: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow > .reminderItemSwipeContent > .reminderItemTime {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow > .reminderItemSwipeContent > .reminderItemContent {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  /* Společné pro případ, že řádek vznikl ještě při širším zoomu.
     Štítky se nikdy nezalamují; volný prostor jde textu (ellipsis). */
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow .desktopReminderBadges {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
  }
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow .desktopReminderBadgeSlot.is-empty {
    display: none !important;
  }
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow .desktopReminderBadgeSlot {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow > .reminderItemSwipeContent > .desktopReminderBadges {
    grid-column: 3;
    grid-row: 1;
  }
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow > .reminderItemSwipeContent > .reminderItemMenu {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    min-width: 30px;
    width: 30px;
  }
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow .reminderItemTitle,
  body:not(.nativeApp) #remindersScreen #desktopRemindersTimeline
  .desktopReminderTimelineRow .reminderItemPreview {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
