:root {
    /* ===== Paleta ===== */
    --gold: #CA9C57;
    --gold-2: #E3C38A;
    --purple-900: #010042;
    --purple-800: #22114A;
    --purple-700: #3C36C6;
    --purple-600: #362EDC;
    --purple-500: #6634B2;
    --purple-200: #E0D1D2;
    --white: #FFFFFF;

    /* ===== Motyw ===== */
    --bg: radial-gradient(1200px 800px at 20% -10%, rgba(102, 52, 178, .35), transparent 60%),
    radial-gradient(1200px 800px at 120% 10%, rgba(54, 46, 220, .20), transparent 60%),
    linear-gradient(180deg, #0b0730 0%, var(--purple-900) 55%, #09061f 100%);
    --panel: rgba(34, 17, 74, .85);
    --panel-2: rgba(60, 54, 198, .35);
    --card: rgba(19, 16, 55, .9);
    --card-2: rgba(29, 24, 84, .85);
    --muted: #C9C0D9;
    --text: #F3F0FF;
    --accent: var(--gold);
    --accent-2: var(--gold-2);
    --line: rgba(126, 110, 196, .35);
    --radius: 18px;

    /* ===== Statusy kropek ===== */
    --status-green: #22c55e;
    --status-red: #ef4444;
    --status-gold: var(--accent);

    /* ===== Cienie ===== */
    --shadow-light: 0 2px 5px rgba(0, 0, 0, .05);
    --shadow-medium: 0 4px 10px rgba(0, 0, 0, .10);
    --shadow-heavy: 0 8px 20px rgba(0, 0, 0, .15);
    --shadow-btn-default: 0 2px 4px rgba(0, 0, 0, .10);
    --shadow-btn-hover: 0 4px 8px rgba(0, 0, 0, .20);
}

/* (opcjonalnie) pełne tło strony */
body.lwm-agenda-page {
    background: var(--bg);
    color: var(--text);
    font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
}

/* =====================================================================
   KONTENER
   ===================================================================== */
.schedule {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: min(85dvh, 85vh);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: calc(var(--radius) + 6px);
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0)), var(--panel);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(6px);
}

.schedule .days,
.schedule .halls,
.schedule .subtabs {
    flex: 0 0 auto;
}

/* =====================================================================
   WSPÓLNE: zakładki (dni / hale / tury)
   ===================================================================== */
.schedule .days,
.schedule .halls,
.schedule .subtabs {
    display: flex;
    width: 100%;
    gap: 0;
    background: transparent;
}

.schedule .days {
    border-radius: calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0 0;
    overflow: hidden;
}

.schedule .halls {
    border-top: 1px solid rgba(255, 255, 255, .04);
}

.schedule .subtabs {
    border-top: 1px solid rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .04);
}

/* Element zakładki: wspólne */
.schedule .day,
.schedule .hall,
.schedule .subtab {
    position: relative;
    flex: 1 1 0;
    display: block;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    background: transparent;
    border: 0;
    cursor: pointer;
    user-select: none;
    color: #CFC8EE;
    transition: background .15s ease, color .15s ease, opacity .15s ease;
}

.schedule .day:hover,
.schedule .hall:hover,
.schedule .subtab:hover {
    background: rgba(255, 255, 255, .035);
}

.schedule .day.is-active,
.schedule .hall.is-active,
.schedule .subtab.is-active {
    color: #fff;
}

.schedule .day.is-active::after,
.schedule .hall.is-active::after,
.schedule .subtab.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Dodatki dla dni */
.schedule .day {
    padding: 12px 10px;
    color: #D7D1F0;
    letter-spacing: .2px;
}

.schedule .day small {
    display: block;
    margin-top: 3px;
    font-weight: 400;
    color: #BEB6E3;
}

.schedule .days .day:first-child {
    border-top-left-radius: calc(var(--radius) + 6px);
}

.schedule .days .day:last-child {
    border-top-right-radius: calc(var(--radius) + 6px);
}

/* Dodatki dla tur */
.schedule .subtab small {
    display: block;
    margin-top: 2px;
    font-weight: 400;
    color: #BEB6E3;
}

@media (max-width: 768px) {
    .schedule .days,
    .schedule .halls,
    .schedule .subtabs {
        flex-wrap: wrap;
    }
    .schedule .day,
    .schedule .hall,
    .schedule .subtab {
        flex: 1 1 50%; /* Dwa przyciski w rzędzie */
    }
}

@media (max-width: 480px) {
    .schedule .day,
    .schedule .hall,
    .schedule .subtab {
        flex-basis: 100%; /* Jeden przycisk w rzędzie */
    }
}

/* =====================================================================
   CONTENT / LISTA
   ===================================================================== */
.schedule .content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 20px 14px 22px 18px;
    overflow: hidden;
}

.schedule .session-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 auto;
    margin: 8px 0;
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
}

/* =====================================================================
   SESJA
   ===================================================================== */
.schedule .session {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

@media (max-width: 820px) {
    .schedule .session {
        grid-template-columns: 1fr;
    }
}

.schedule .avatar-badge {
    position: relative;
    width: 96px;
    height: 96px;
    margin-left: 6px;
    border-radius: 50%;
    overflow: hidden;
    background: #000;
    border: 6px solid rgba(75, 62, 167, .65);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    --av-ic: rgba(255, 255, 255, .9);
}

.schedule .avatar-badge img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .18s ease;
    cursor: pointer;
}

.schedule .avatar-badge:hover img {
    transform: scale(1.02);
}

/* Avatar hover overlay (plus/X) */
.schedule .avatar-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease-in-out;
    background-color: rgba(0, 0, 0, .25);
    background-image: linear-gradient(var(--av-ic), var(--av-ic)),
    linear-gradient(var(--av-ic), var(--av-ic));
    background-repeat: no-repeat;
    background-position: center center, center center;
    background-size: 2px 22px, 22px 2px;
}

.schedule .avatar-badge:hover::after,
.schedule .avatar-badge:focus-within::after {
    opacity: 1;
}

.schedule .avatar-badge.is-x::after,
.schedule .avatar-badge[data-hover="x"]::after {
    transform: rotate(45deg);
}

.schedule .session-card {
    padding: 14px 16px;
    background: var(--card-2);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    box-shadow: var(--shadow-light);
}

.schedule .session-top {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #E8E4FF;
    font-weight: 700;
}

.schedule .session-top .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(202, 156, 87, .15);
}

.schedule .title {
    margin: 8px 0;
    font-size: 24px;
    font-weight: 900;
    color: #F6F3FF;
}

.schedule .sep {
    margin: 10px 0;
    height: 1px;
    border: 0;
    background: var(--line);
}

.schedule .desc {
    color: #D7D0EB;
    line-height: 1.6;
}

.schedule .meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    color: #CFC8EE;
    flex-wrap: wrap;
}

.schedule .meta .speaker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Socials */
.schedule .socials,
.modal .socials,
.socials {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.schedule .socials a,
.modal .socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .15);
    text-decoration: none;
    color: var(--text);
    opacity: .95;
    box-shadow: var(--shadow-btn-default);
}

.schedule .socials a:hover,
.modal .socials a:hover {
    color: var(--accent);
    border-color: rgba(202, 156, 87, .55);
    box-shadow: var(--shadow-btn-hover);
}

.modal .socials {
    flex-wrap: wrap;
    row-gap: 6px;
}

.modal .socials a {
    flex: 0 0 auto;
    margin-right: 8px;
}

/* =======================
   PRZERWY — final (padding + bez height:40)
   ======================= */
.schedule .break-row{
  display:grid;
  grid-template-columns:112px 1fr;
  align-items:center;
}

/* kropka | etykieta | czas */
.schedule .break-line{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:10px 1fr auto;
  column-gap:10px;
  align-items:start;
  padding:12px 14px;         /* <-- odstęp od ścianek */
  min-height:40px;           /* miękki minimalny */
  height:auto;               /* nadpisuje starą height:40px */
  justify-content:initial;   /* nadpisuje stare center */
  box-sizing:border-box;

  border:1px solid rgba(202,156,87,.35);
  border-radius:10px;
  background:linear-gradient(90deg, rgba(202,156,87,.18), rgba(227,195,138,.18));
  color:var(--accent);
  font-weight:800;
  letter-spacing:.6px;
  text-transform:uppercase;
  box-shadow:var(--shadow-light);
}

.schedule .break-line .dot{
  width:6px; height:6px; border-radius:50%;
  background:var(--accent, #CA9C57);
  box-shadow:0 0 0 3px rgba(202,156,87,.15);
  margin-top:6px;            /* optycznie centrowane do 1. linii */
}

.schedule .break-line .label{
  min-width:0;
  word-break:break-word;
  overflow-wrap:anywhere;
  line-height:1.25;
  font-weight:800;
}

.schedule .break-line .time{
  white-space:nowrap;         /* godzina zawsze w jednej linii */
  font-weight:700;
  opacity:.9;
  align-self:start;
  margin-left:8px;
}

/* mobile: czas pod etykietą */
@media (max-width:480px){
  .schedule .break-line{
    grid-template-columns:10px 1fr;
    grid-template-areas:
      "dot label"
      ".   time";
    row-gap:6px;
  }
  .schedule .break-line .dot  { grid-area:dot;  }
  .schedule .break-line .label{ grid-area:label;}
  .schedule .break-line .time { grid-area:time; justify-self:start; margin-left:0; }
}


/* =====================================================================
   STATUS KROPEK (opcjonalnie)
   ===================================================================== */
@keyframes pulseDot {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
    }
    70% {
        transform: scale(1.16);
        box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.schedule .dot.dot--upcoming {
    background: var(--status-gold);
    box-shadow: 0 0 0 4px rgba(202, 156, 87, .15);
}

.schedule .dot.dot--live {
    background: var(--status-green);
    animation: pulseDot 1.25s ease-in-out infinite;
}

.schedule .dot.dot--past {
    background: var(--status-red);
    opacity: .95;
}

/* =====================================================================
   MODAL: PRELEGENT (poprawki pod JS: body fixed + backdrop click)
   ===================================================================== */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    overscroll-behavior: contain;    /* blokada łańcuchowego scrollowania */
    pointer-events: none;            /* domyślnie nie łapie klików */
    z-index: 999999;
}

.modal[aria-hidden="false"],
.modal.is-open {
    display: block;
}

/* Gdy otwarty – tylko backdrop i dialog mają klikalność */
.modal[aria-hidden="false"] .modal-backdrop,
.modal[aria-hidden="false"] .modal-dialog,
.modal.is-open .modal-backdrop,
.modal.is-open .modal-dialog {
    pointer-events: auto;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 1000;
}

.modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    width: min(720px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(88dvh, 88vh);
    background: var(--card-2);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    box-shadow: var(--shadow-heavy);
    z-index: 1001;
}

.modal .modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 10; /* Upewnij się, że przycisk jest nad innymi elementami modala */
}

/* Wewnętrzny scroll modala, płynny na iOS */
.modal-body {
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.modal-body .m-header h3 {
    color: #fff;
    font-size: 1.17em;
}

.modal-body .m-header p {
    color: #fff;
}

.modal-body p.bio {
    color: #fff;
}

/* Modal header (avatar + treść) */
.m-header,
.schedule .m-header {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 6px;
    min-width: 0;
}

.m-header, .m-header > * {
    min-width: 0
}

.m-header img,
.schedule .m-header img {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    object-fit: cover;
    border: 4px solid rgba(75, 62, 167, .65);
}

@media (max-width: 520px) {
    .schedule .m-header {
        grid-template-columns: 72px 1fr;
    }

    .schedule .m-header img {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 360px) {
    .schedule .m-header {
        grid-template-columns: 56px 1fr;
    }

    .schedule .m-header img {
        width: 56px;
        height: 56px;
    }
}

/* =====================================================================
   DOSTĘPNOŚĆ / FOCUS
   ===================================================================== */
.schedule .day:focus-visible,
.schedule .hall:focus-visible,
.schedule .subtab:focus-visible,
.modal-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* =====================================================================
   SCROLLBARY (tylko lista i modal)
   ===================================================================== */
.schedule .session-list,
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(202, 156, 87, .45) transparent;
}

.schedule .session-list::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.schedule .session-list::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.schedule .session-list::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(202, 156, 87, .55), rgba(227, 195, 138, .35));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.schedule .session-list::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(202, 156, 87, .65), rgba(227, 195, 138, .45));
}

.schedule .session-list::-webkit-scrollbar-button,
.modal-body::-webkit-scrollbar-button {
    width: 14px;
    height: 18px;
    background: rgba(202, 156, 87, .10);
    border-radius: 10px;
}

.schedule .session-list::-webkit-scrollbar-button:hover,
.modal-body::-webkit-scrollbar-button:hover {
    background: rgba(202, 156, 87, .18);
}

/* =====================================================================
   Blokada scrolla tła przy otwartym modalu (spójna z JS)
   ===================================================================== */
/*html.modal-open,
body.modal-open {
    overflow: hidden !important;
    height: 100%;
}
*/
html {
  scroll-behavior: auto !important;
  scrollbar-gutter: stable;
}
