/* ═══════════════════════════════════════════════════════
   Kulturní kalendář ORP Ostrov — styly
═══════════════════════════════════════════════════════ */

html,
      body {
        height: 100%;
      }

      /* ── Navigační tlačítka ──────────────────────────────── */
      .today-btn {
        padding: 6px 14px;
        border-radius: var(--r-sm);
        font-size: .82rem;
        font-weight: 700;
        border: 2px solid var(--border);
        background: #fff;
        color: var(--muted);
        cursor: pointer;
        transition: all var(--tr);
        flex-shrink: 0;
        white-space: nowrap;
      }
      /* Dnes — červená */
      #btn-today {
        background: #D0021B;
        color: #fff;
        border-color: #D0021B;
      }
      #btn-today:hover { background: #A8001A; border-color: #A8001A; }

      /* Tento víkend — modrá */
      #btn-this-weekend {
        background: #1565C0;
        color: #fff;
        border-color: #1565C0;
      }
      #btn-this-weekend:hover { background: #0D47A1; border-color: #0D47A1; }

      /* Příští víkend — zelená */
      #btn-next-weekend {
        background: #2E7D32;
        color: #fff;
        border-color: #2E7D32;
      }
      #btn-next-weekend:hover { background: #1B5E20; border-color: #1B5E20; }

      /* Na mobilu skryta — přístupná přes dropdown */
      @media (max-width: 680px) {
        #btn-today, #btn-this-weekend, #btn-next-weekend { display: none; }
      }

      /* ── Šipky navigace (prev/next) ─────────────────────── */
      .arr-btn {
        width: 34px;
        height: 34px;
        border-radius: var(--r-sm);
        border: none;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        cursor: pointer;
        transition: all var(--tr);
        flex-shrink: 0;
      }
      .arr-btn:hover {
        background: var(--blue-l);
        color: var(--blue);
      }
      .arr-btn svg {
        width: 18px;
        height: 18px;
        pointer-events: none;
      }

      /* ── Navigační skupina ───────────────────────────────── */
      .nav-group {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
      }

*,
      *::before,
      *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }
      html {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
      }
      body {
        font-family: 'Inter', system-ui, sans-serif;
        background: #f0f2f5;
        color: #1c2b3a;
        min-height: 100vh;
        overflow-x: hidden;
      }
      button {
        font-family: inherit;
        cursor: pointer;
        border: none;
        background: none;
      }
      a {
        color: inherit;
        text-decoration: none;
      }
      img {
        display: block;
        max-width: 100%;
      }

      :root {
        --blue: #1565c0;
        --blue-l: #e8f0fe;
        --green: #2e7d32;
        --green-l: #e8f5e9;
        --red: #c62828;
        --red-l: #ffebee;
        --amber: #e65100;
        --amber-l: #fff3e0;
        --teal: #00695c;
        --teal-l: #e0f2f1;
        --purple: #6a1b9a;
        --purple-l: #f3e5f5;
        --brown: #4e342e;
        --brown-l: #efebe9;
        --slate: #37474f;
        --slate-l: #eceff1;

        --bg: #f0f2f5;
        --surface: #fff;
        --border: #dde1e7;
        --text: #1c2b3a;
        --muted: #6b7a8d;
        --faint: #f8f9fb;
        --r: 10px;
        --r-sm: 6px;
        --sh: 0 1px 4px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
        --sh-lg: 0 4px 8px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.1);
        --tr: 0.16s ease;
      }

      .sc-0 {
        --sc: var(--blue);
        --sc-l: var(--blue-l);
      }
      .sc-1 {
        --sc: var(--green);
        --sc-l: var(--green-l);
      }
      .sc-2 {
        --sc: var(--red);
        --sc-l: var(--red-l);
      }
      .sc-3 {
        --sc: var(--amber);
        --sc-l: var(--amber-l);
      }
      .sc-4 {
        --sc: var(--teal);
        --sc-l: var(--teal-l);
      }
      .sc-5 {
        --sc: var(--purple);
        --sc-l: var(--purple-l);
      }
      .sc-6 {
        --sc: var(--brown);
        --sc-l: var(--brown-l);
      }
      .sc-7 {
        --sc: var(--slate);
        --sc-l: var(--slate-l);
      }

      /* ── HEADER ──────────────────────────────────────── */
      .site-header {
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: 0 clamp(16px, 4vw, 40px);
      }
      .site-header__inner {
        max-width: 1200px;
        margin: 0 auto;
        height: 62px;
        display: flex;
        align-items: center;
      }
      .logo {
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .logo-mark {
        width: 42px;
        height: 42px;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f5f5;
      }
      .logo-mark img {
        width: 42px;
        height: 42px;
        object-fit: contain;
      }
      .logo-words {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
      }
      .logo-city {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text);
        letter-spacing: 0.03em;
      }
      .logo-tag {
        font-size: 0.68rem;
        color: var(--muted);
      }

      /* ── CAL BAR ──────────────────────────────────────── */
      .cal-bar {
        background: #fff;
        border-bottom: 2px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 200;
        padding: 0 clamp(16px, 4vw, 40px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      }
      .cal-bar__inner {
        max-width: 1200px; margin: 0 auto;
        min-height: 56px; padding: 6px 0;
        display: flex; align-items: center;
        gap: 8px; flex-wrap: wrap; row-gap: 8px;
      }
      /* Desktop: nav-group roste doleva, ostatní vpravo v jednom řádku */
      @media (min-width: 681px) {
        .cal-bar__inner { justify-content: center; gap: 12px; }
        .nav-group { flex: 0 0 auto; }
        .shortcuts-wrap { display: none !important; }
        .filter-wrap { flex-shrink: 0; }
      }
      /* Mobil: navigace celý 1. řádek, filtry 2. řádek vedle sebe vycentrované */
      @media (max-width: 680px) {
        .cal-bar__inner { justify-content: center; }
        .nav-group { flex: 0 0 100%; display: flex; justify-content: center; align-items: center; }
        .filter-wrap { flex-shrink: 0; }
        .shortcuts-wrap { flex-shrink: 0; }
        #btn-this-weekend, #btn-next-weekend, #btn-today { display: none; }
        .shortcuts-btn { display: flex !important; }
      }
      @media (max-width: 400px) {
        .period-label { max-width: 180px; font-size: .85rem; }
        .arr-btn { width: 30px; height: 30px; }
      }
      /* filter-wrap jako flex aby neroztahoval řádek */
      .filter-wrap {
        position: relative;
        display: flex;
        align-items: center;
        flex-shrink: 0;
      }
      /* Dropdown — fixed na mobilu aby neutekl */
      
      
      .shortcuts-wrap { position: relative; flex-shrink: 0; }
      .shortcuts-btn {
        display: none; align-items: center; gap: 5px; padding: 6px 10px;
        border: 1.5px solid var(--border); border-radius: var(--r-sm);
        font-size: .78rem; font-weight: 600; color: var(--muted);
        background: #fff; transition: all var(--tr); white-space: nowrap;
      }
      .shortcuts-btn:hover { border-color: var(--blue); color: var(--blue); }
      .shortcuts-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
      .shortcuts-btn .sc-chev { transition: transform var(--tr); }
      .shortcuts-btn.open .sc-chev { transform: rotate(180deg); }
      
      .shortcuts-menu__head {
        padding: 7px 14px; font-size: .7rem; font-weight: 700;
        text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
        border-bottom: 1px solid var(--border);
      }
      .sc-opt {
        display: flex; align-items: center; gap: 10px;
        padding: 10px 14px; font-size: .84rem; font-weight: 600;
        cursor: pointer; border-bottom: 1px solid var(--faint);
        transition: background var(--tr); color: var(--text);
      }
      .sc-opt:last-child { border-bottom: none; }
      .sc-opt:hover { background: var(--faint); }
      .sc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
      /* ── FILTER DROPDOWN ──────────────────────────────── */
      .filter-wrap {
        position: relative;
        flex-shrink: 0;
      }
      .filter-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px 5px 10px;
        border: 1.5px solid var(--border);
        border-radius: var(--r-sm);
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--muted);
        background: #fff;
        transition: all var(--tr);
        white-space: nowrap;
      }
      .filter-btn:hover {
        border-color: var(--blue);
        color: var(--blue);
      }
      .filter-btn.has-filter {
        border-color: var(--sc, var(--blue));
        color: var(--sc, var(--blue));
        background: var(--sc-l, var(--blue-l));
      }
      .filter-btn .ficon {
        width: 22px;
        height: 22px;
        border-radius: 4px;
        object-fit: contain;
        flex-shrink: 0;
        background: #f0f0f0;
      }
      .filter-btn .ficon-ph {
        width: 22px;
        height: 22px;
        border-radius: 4px;
        flex-shrink: 0;
        background: var(--sc, var(--blue));
        opacity: 0.7;
      }
      .filter-btn .chev {
        transition: transform var(--tr);
        width: 13px;
        height: 13px;
        flex-shrink: 0;
      }
      .filter-btn.open .chev {
        transform: rotate(180deg);
      }

   
      @keyframes ddIn {
        from {
          opacity: 0;
          transform: translateY(-6px);
        }
        to {
          opacity: 1;
          transform: none;
        }
      }
      .filter-menu__head {
        padding: 8px 14px;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--muted);
        border-bottom: 1px solid var(--border);
      }

      .fopt {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 14px;
        font-size: 0.83rem;
        font-weight: 500;
        cursor: pointer;
        transition: background var(--tr);
        border-bottom: 1px solid var(--faint);
      }
      .fopt:last-child {
        border-bottom: none;
      }
      .fopt:hover {
        background: var(--faint);
      }
      .fopt.active {
        font-weight: 700;
        background: var(--faint);
      }

      /* Source logo in filter */
      .fopt-img {
        width: 28px;
        height: 28px;
        border-radius: 5px;
        object-fit: contain;
        flex-shrink: 0;
        background: #f0f0f0;
        padding: 2px;
      }
      .fopt-ph {
        width: 28px;
        height: 28px;
        border-radius: 5px;
        flex-shrink: 0;
        background: var(--sc, #ddd);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.62rem;
        font-weight: 800;
        color: #fff;
        letter-spacing: 0.02em;
        overflow: hidden;
      }

      .fopt-name {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .fcheck {
        margin-left: auto;
        opacity: 0;
        color: var(--blue);
        flex-shrink: 0;
      }
      .fopt.active .fcheck {
        opacity: 1;
      }

      /* ── MAIN ──────────────────────────────────────────── */
      .cal-wrap {
        max-width: 1200px;
        margin: 24px auto;
        padding: 0 clamp(16px, 4vw, 40px) 72px;
      }

      /* ── STATE ──────────────────────────────────────────── */
      .state {
        background: var(--surface);
        border-radius: var(--r);
        padding: 72px 24px;
        text-align: center;
        color: var(--muted);
        box-shadow: var(--sh);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
      }
      .spin {
        width: 38px;
        height: 38px;
        border: 3px solid var(--border);
        border-top-color: var(--blue);
        border-radius: 50%;
        animation: sp 0.8s linear infinite;
      }
      @keyframes sp {
        to {
          transform: rotate(360deg);
        }
      }

      /* ── WEEK STRIP ───────────────────────────────────── */
      .week-strip {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        background: var(--surface);
        border-radius: var(--r) var(--r) 0 0;
        border: 1px solid var(--border);
        border-bottom: 2px solid var(--blue);
        overflow: hidden;
      }
      .wday-col {
        padding: 10px 4px 8px;
        text-align: center;
        border-right: 1px solid var(--border);
        cursor: pointer;
        transition: background var(--tr);
      }
      .wday-col:last-child {
        border-right: none;
      }
      .wday-col:hover {
        background: var(--faint);
      }
      .wday-col.today-col {
        background: var(--blue-l);
      }
      .wday-col.wknd-col .wday-name,
      .wday-col.wknd-col .wday-num {
        color: var(--red);
      }
      .wday-name {
        font-size: 0.67rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--muted);
        margin-bottom: 4px;
      }
      .wday-num {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text);
        line-height: 1;
      }
      .wday-col.today-col .wday-num {
        background: var(--blue);
        color: #fff;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
      }
      .wday-dots {
        display: flex;
        justify-content: center;
        gap: 3px;
        margin-top: 5px;
        min-height: 8px;
      }
      .wday-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--sc);
      }
      .wday-dot.faded {
        opacity: 0.18;
      }

      /* ── AGENDA BODY ──────────────────────────────────── */
      .agenda-body {
        background: var(--surface);
        border: 1px solid var(--border);
        border-top: none;
        border-radius: 0 0 var(--r) var(--r);
        overflow: hidden;
      }
      .no-week {
        padding: 56px 24px;
        text-align: center;
        color: var(--muted);
        font-size: 0.9rem;
      }

      .ag-day {
        border-bottom: 1px solid var(--border);
      }
      .ag-day:last-child {
        border-bottom: none;
      }
      .ag-day.is-empty {
        display: none;
      }
      .ag-day.all-faded {
        display: none;
      }

      /* Day header */
      .ag-date-row {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 20px 10px;
        background: var(--faint);
        border-bottom: 1px solid var(--border);
      }
      .ag-date-block {
        flex-shrink: 0;
        width: 52px;
        text-align: center;
      }
      .ag-num {
        font-family: 'DM Serif Display', Georgia, serif;
        font-size: 2.2rem;
        line-height: 1;
        color: var(--blue);
      }
      .ag-wday {
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: var(--muted);
        margin-top: 2px;
      }
      .ag-date-row.is-today .ag-date-block {
        background: var(--blue-l);
        border-radius: 8px;
        padding: 4px 0;
      }
      .ag-date-row.is-today .ag-num,
      .ag-date-row.is-today .ag-wday {
        color: var(--blue);
      }
      .ag-date-row.is-wknd .ag-num,
      .ag-date-row.is-wknd .ag-wday {
        color: var(--red);
      }
      .ag-date-row.is-wknd.is-today .ag-date-block {
        background: var(--red-l);
      }
      .ag-date-row.is-wknd.is-today .ag-num,
      .ag-date-row.is-wknd.is-today .ag-wday {
        color: var(--red);
      }
      .ag-line {
        flex: 1;
        height: 1px;
        background: var(--border);
      }
      .ag-full-date {
        font-size: 0.78rem;
        color: var(--muted);
        white-space: nowrap;
      }
      .today-pip {
        font-size: 0.65rem;
        font-weight: 700;
        background: var(--blue);
        color: #fff;
        padding: 2px 8px;
        border-radius: 20px;
        letter-spacing: 0.04em;
      }

      /* Event cards */
      .ev-list {
        display: flex;
        flex-direction: column;
      }
      .ev-card {
        background: var(--surface);
        display: flex;
        overflow: hidden;
        cursor: pointer;
        border-bottom: 1px solid var(--border);
        transition: background var(--tr);
        min-height: 88px;
      }
      .ev-card:last-child {
        border-bottom: none;
      }
      .ev-card:hover {
        background: var(--faint);
      }
      .ev-card.faded {
        opacity: 0.2;
        pointer-events: none;
      }
      .ev-stripe {
        width: 5px;
        flex-shrink: 0;
        background: var(--sc);
      }

      /* Thumbnail — shows source logo when no event image */
      .ev-thumb {
        width: 120px;
        flex-shrink: 0;
        overflow: hidden;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .ev-thumb.has-logo {
        background: #fff;
        border-right: 1px solid var(--border);
      }
      .ev-thumb.has-gradient {
        background: linear-gradient(
          135deg,
          var(--sc),
          color-mix(in srgb, var(--sc) 55%, #000)
        );
      }
      .ev-thumb img.ev-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      .ev-logo.logo-invert {
        filter: invert(1);
      }
      .fopt-img.logo-invert {
        filter: invert(1);
      }
      .modal-ph.has-logo img.logo-invert {
        filter: invert(1);
      }
      .ev-thumb img.ev-logo {
        width: 72%;
        height: 72%;
        object-fit: contain;
      }
      .ev-thumb-ph svg {
        width: 36px;
        height: 36px;
        fill: rgba(255, 255, 255, 0.22);
      }

      .ev-body {
        flex: 1;
        padding: 12px 14px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        min-width: 0;
      }
      .ev-top {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }
      .ev-time {
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--sc);
        white-space: nowrap;
      }
      .ev-src-badge {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 2px 7px 2px 4px;
        border-radius: 10px;
        background: var(--sc-l);
        color: var(--sc);
        white-space: nowrap;
      }

      /* Typ akce badge */
      .ev-type-badge {
        font-size: .62rem; font-weight: 700;
        padding: 1px 7px; border-radius: 10px;
        white-space: nowrap; flex-shrink: 0;
        border: 1px solid currentColor;
        opacity: .85;
      }

      .ev-type-badge {
        font-size: .62rem; font-weight: 700;
        padding: 1px 7px; border-radius: 10px;
        white-space: nowrap; flex-shrink: 0;
        border: 1px solid currentColor; opacity: .85;
      }
      .ev-src-badge img {
        width: 16px;
        height: 16px;
        border-radius: 3px;
        object-fit: contain;
        flex-shrink: 0;
      }
      .ev-src-badge .badge-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--sc);
        flex-shrink: 0;
      }
      .ev-title {
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--text);
        line-height: 1.3;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
      }
      .ev-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 3px 14px;
        margin-top: 1px;
      }
      .ev-meta-i {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.75rem;
        color: var(--muted);
      }
      .ev-meta-i svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
      }
      .ev-arrow {
        display: flex;
        align-items: center;
        padding: 0 14px;
        color: var(--border);
        flex-shrink: 0;
        transition: color var(--tr);
      }
      .ev-card:hover .ev-arrow {
        color: var(--sc);
      }
      .ev-arrow svg {
        width: 16px;
        height: 16px;
      }

      @media (max-width: 480px) {
        .ev-thumb {
          display: none;
        }
        .period-label {
          max-width: 150px;
          font-size: 0.84rem;
        }
        .week-strip .wday-name {
          font-size: 0.6rem;
        }
      }
      @media (min-width: 481px) and (max-width: 720px) {
        .ev-thumb {
          width: 88px;
        }
      }


      /* ── Dropdowny — sdílené styly ──────────────────────── */
      .filter-menu,
      .shortcuts-menu {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--r);
        box-shadow: var(--sh-lg);
        min-width: 210px;
        max-width: 290px;
        z-index: 500;
        overflow: hidden;
        animation: ddIn .14s ease;
      }
      .filter-menu.open,
      .shortcuts-menu.open { display: block; }

      /* Mobil: vycentrovat uprostřed obrazovky */
      @media (max-width: 680px) {
        .filter-menu,
        .shortcuts-menu {
          position: fixed !important;
          left: 50% !important;
          right: auto !important;
          top: 148px !important;
          transform: translateX(-50%) !important;
          width: calc(100vw - 32px) !important;
          max-width: 340px !important;
          min-width: 0 !important;
          z-index: 700 !important;
        }
      }

      /* ── POPUP ────────────────────────────────────────── */
      .popup {
        display: none;
        position: fixed;
        z-index: 500;
        background: var(--surface);
        border-radius: var(--r);
        box-shadow: var(--sh-lg);
        padding: 14px;
        min-width: 250px;
        max-width: 310px;
        border: 1px solid var(--border);
      }
      .popup.open {
        display: block;
      }
      .popup-head {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--blue);
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
        margin-bottom: 6px;
      }
      .popup-item {
        padding: 7px 0;
        border-bottom: 1px solid var(--faint);
        cursor: pointer;
      }
      .popup-item:hover {
        opacity: 0.7;
      }
      .popup-time {
        font-size: 0.7rem;
        font-weight: 700;
      }
      .popup-name {
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--text);
        line-height: 1.25;
      }

      /* ── MODAL ────────────────────────────────────────── */
      .modal-bg {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(10, 20, 40, 0.5);
        backdrop-filter: blur(3px);
        z-index: 900;
        align-items: center;
        justify-content: center;
        padding: 16px;
      }
      .modal-bg.open {
        display: flex;
      }
      .modal {
        background: var(--surface);
        border-radius: var(--r);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
        width: 100%;
        max-width: 540px;
        max-height: 92vh;
        overflow-y: auto;
        animation: mIn 0.2s ease;
      }
      @keyframes mIn {
        from {
          opacity: 0;
          transform: scale(0.95) translateY(12px);
        }
        to {
          opacity: 1;
          transform: none;
        }
      }
      .modal-img {
        width: 100%;
        height: 210px;
        object-fit: cover;
        display: block;
      }
      .modal-ph {
        height: 140px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .modal-ph.has-logo {
        background: #f8f8f8;
        border-bottom: 1px solid var(--border);
      }
      .modal-ph.has-logo img {
        width: 120px;
        height: 120px;
        object-fit: contain;
      }
      .modal-ph.has-gradient {
        background: linear-gradient(
          135deg,
          var(--sc, var(--blue)),
          color-mix(in srgb, var(--sc, var(--blue)) 60%, #000)
        );
      }
      .modal-ph.has-gradient svg {
        width: 52px;
        height: 52px;
        fill: rgba(255, 255, 255, 0.25);
      }
      .modal-stripe {
        height: 4px;
      }
      .modal-body {
        padding: 20px 24px 28px;
      }
      .modal-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        gap: 10px;
      }
      .modal-badges {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        align-items: center;
      }
      .modal-badge {
        font-size: 0.72rem;
        font-weight: 700;
        padding: 4px 12px;
        border-radius: 20px;
      }
      .modal-src-b {
        font-size: 0.72rem;
        font-weight: 600;
        padding: 3px 9px 3px 5px;
        border-radius: 20px;
        background: var(--faint);
        color: var(--muted);
        border: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 5px;
      }
      .modal-src-b img {
        width: 18px;
        height: 18px;
        border-radius: 3px;
        object-fit: contain;
      }
      .modal-close {
        width: 30px;
        height: 30px;
        border: 1px solid var(--border);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        cursor: pointer;
        transition: all var(--tr);
      }
      .modal-close:hover {
        background: var(--faint);
      }
      .modal-title {
        font-family: 'DM Serif Display', Georgia, serif;
        font-size: 1.4rem;
        line-height: 1.2;
        color: var(--text);
        margin-bottom: 16px;
      }
      .modal-rows {
        display: flex;
        flex-direction: column;
        gap: 9px;
        margin-bottom: 14px;
      }
      .modal-row {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        font-size: 0.88rem;
      }
      .modal-row svg {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
        margin-top: 2px;
      }
      .modal-lbl {
        font-weight: 600;
        min-width: 76px;
      }
      .modal-val {
        color: var(--text);
        flex: 1;
      }
      .modal-desc {
        font-size: 0.88rem;
        line-height: 1.75;
        color: var(--muted);
        margin-bottom: 16px;
        white-space: pre-wrap;
      }
      .modal-extra {
        font-size: 0.82rem;
        line-height: 1.65;
        color: var(--muted);
        background: var(--faint);
        border-radius: var(--r-sm);
        padding: 10px 12px;
        margin-bottom: 16px;
      }
      .modal-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 11px 20px;
        border-radius: var(--r-sm);
        font-weight: 700;
        font-size: 0.88rem;
        color: #fff;
        transition: filter var(--tr);
      }
      .modal-link:hover {
        filter: brightness(0.9);
      }

      @media (max-width: 540px) {
        .modal-bg {
          align-items: flex-end;
          padding: 0;
        }
        .modal {
          max-width: 100%;
          max-height: 88vh;
          border-radius: var(--r) var(--r) 0 0;
          animation: shi 0.22s ease;
        }
        @keyframes shi {
          from {
            transform: translateY(100%);
          }
          to {
            transform: none;
          }
        }
      }

      /* ── Navigační tlačítka ──────────────────────────────── */
      .today-btn {
        padding: 6px 14px;
        border-radius: var(--r-sm);
        font-size: .82rem;
        font-weight: 700;
        border: 2px solid var(--border);
        background: #fff;
        color: var(--muted);
        cursor: pointer;
        transition: all var(--tr);
        flex-shrink: 0;
        white-space: nowrap;
      }
      /* Dnes — červená */
      #btn-today {
        background: #D0021B;
        color: #fff;
        border-color: #D0021B;
      }
      #btn-today:hover { background: #A8001A; border-color: #A8001A; }

      /* Tento víkend — modrá */
      #btn-this-weekend {
        background: #1565C0;
        color: #fff;
        border-color: #1565C0;
      }
      #btn-this-weekend:hover { background: #0D47A1; border-color: #0D47A1; }

      /* Příští víkend — zelená */
      #btn-next-weekend {
        background: #2E7D32;
        color: #fff;
        border-color: #2E7D32;
      }
      #btn-next-weekend:hover { background: #1B5E20; border-color: #1B5E20; }

      /* Na mobilu skryta — přístupná přes dropdown */
      @media (max-width: 680px) {
        #btn-today, #btn-this-weekend, #btn-next-weekend { display: none; }
      }

      /* ── Šipky navigace (prev/next) ─────────────────────── */
      .arr-btn {
        width: 34px;
        height: 34px;
        border-radius: var(--r-sm);
        border: none;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        cursor: pointer;
        transition: all var(--tr);
        flex-shrink: 0;
      }
      .arr-btn:hover {
        background: var(--blue-l);
        color: var(--blue);
      }
      .arr-btn svg {
        width: 18px;
        height: 18px;
        pointer-events: none;
      }

      /* ── Navigační skupina ───────────────────────────────── */
      .nav-group {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
      }