.topr-bulletin {
    display: flex;
    flex-wrap: wrap;
    background: #f8f8f8;
    border-radius: 20px;
    padding: 30px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.topr-pdf-general-info {
    flex-basis: 100%;
    background: #f8f8f8;
    border-radius: 20px;
    padding: 30px;
}

.topr-bulletin h2 {
    flex-basis: 100%;
    font-size: 30px;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.topr-bulletin h3 {
    font-size: 28px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.topr-bulletin h4 {
    font-size: 24px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.topr-bulletin p {
    font-size: 20px;
}

.topr-meta {
    font-size: 18px;
}

.tendency-wrapp {
    font-size: 18px;
}

.tendency-meta {
    display: flex;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    align-items: center;
    margin-top:10px;
}

.tendency-meta svg {
    height: 60px !important;
    margin-right: 30px;
} 

.danger-ico {
    height: 140px;
}

.danger-level-wrapper {
    display:flex;
    align-items: center;
}

.danger-level {
    text-transform: uppercase;
    font-weight: 800;
    font-size: 24px;
}

.avalanche-meta-info {
    display: flex;
    flex-basis: calc(50% - 10px);
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    flex-direction: column;
}

.avalanche-info-desc {
    display: flex;
    flex-basis: calc(50% - 10px);
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    flex-direction: column;
}

.avalanche-info-desc > a {
        display: none;
    }

.avalanche-problems {
    display: flex;
    flex-basis: calc(60% - 10px);
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    flex-direction: column;
    margin-top: 20px;
}

.avalanche-comment {
    display: flex;
    flex-basis: calc(40% - 10px);
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    flex-direction: column;
    margin-top: 20px;
}

.avalanche-pdf {
    display: flex;
    flex-basis: 100%;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    flex-direction: row;
}

.avalanche-pdf a {
    border-radius: 12px;
    color: #fff;
    background-color: #19abff;
    margin-right: 20px;
    padding: 10px 20px;
    text-transform: uppercase;
    font-size: 16px;
    font-weight: 600;
}

.avalanche-pdf a:hover {
    color:#000;
}

.problem-list div:last-child {
    border: none !important;
}

.morning-problems, .afternoon-problems, .allday-problems {
    display: flex;
    align-items: center;
    border-bottom: solid 1px #19abff;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.period-group-ico {
    flex-basis: 30%;
    text-align: center;
}
.period-group-ico svg {
    height: 110px !important;
}

.problem-group {
    flex-basis: 70%;
}

.problem-icons {
    display: flex;
    align-items: center;
    margin-right: 30px;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.problem-row {
    display: flex;
    flex-direction: column;
    border-bottom: solid 1px #ccc;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.problem-row:last-child {
    border: none;
    margin-bottom: 0px;
    padding-bottom: 0px;
}

.problem-meta {
    display: flex;
    flex-direction: column;
}

.problem-meta strong {
    margin-bottom: 0px;
    font-size: 17px;
}

.problem-meta span {
    font-size: 15px;
}

.problem-img {
    height: 80px !important;
    cursor: pointer;
    margin-right: 20px;
}

.problem-svg {
    max-width: 140px;
    overflow: hidden;
    margin-right: 12px;
    cursor: pointer;
}

.problem-svg svg {
    height: 80px !important;
}

.period-danger-info img {
    max-height: 100px;
}
.period-danger-info .danger-row {
    display: flex;
    flex-direction: column;
}

.general-warning {
    display: flex;
    flex-basis: 100%;
    background: #19abff;
    color: #fff;
    border-radius: 20px;
    padding: 20px;
    flex-direction: column;
    margin-top: 20px;
}
.general-warning h4 {
    color: #fff;
}

.topr-bulletin-wrapper.two-regions {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: baseline;
}

.topr-bulletin-wrapper.two-regions .topr-bulletin {
    flex-basis: calc(50% - 10px);
    overflow-x: hidden;
}

.topr-bulletin-wrapper.two-regions .avalanche-meta-info {
    flex-basis: 100%;
  }
.topr-bulletin-wrapper.two-regions .avalanche-info-desc {
    flex-basis: 100%;
    margin-top:20px;
  }
.topr-bulletin-wrapper.two-regions .avalanche-problems {
    flex-basis: 100%;
  }
.topr-bulletin-wrapper.two-regions .avalanche-comment {
    flex-basis: 100%;
  }

@media screen and (max-width: 1024px) {
  .avalanche-meta-info {
    flex-basis: 100%;
  }
  .avalanche-info-desc {
    flex-basis: 100%;
    margin-top:20px;
  }
  .avalanche-problems {
    flex-basis: 100%;
  }
  .avalanche-comment {
    flex-basis: 100%;
  }
  .topr-bulletin-wrapper.two-regions {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: column;
}
}

@media screen and (max-width: 768px) {
  .topr-bulletin {
    padding:15px;
  }
  .morning-problems, .afternoon-problems, .allday-problems {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: solid 1px #19abff;
    margin-bottom: 20px;
    padding-bottom: 20px;
}
.period-group-ico {
    flex-basis: 30%;
    text-align: center;
    margin-bottom: 20px;
}
  .avalanche-meta-info {
    padding:15px;
  }
}

@media screen and (max-width: 480px) {
  .danger-level-wrapper {
    flex-direction: column;
  }
  .problem-row {
    flex-direction: column;
}
.problem-icons {
        flex-wrap: wrap;
        margin-right: 0;
        margin-bottom: 20px;
}
.problem-icons .problem-svg {
    flex-basis: calc(50% - 10px);
}
.problem-icons .problem-svg, .problem-icons .problem-img {
    margin-bottom: 0px;
    cursor: pointer;
}
    .avalanche-pdf {
        flex-direction: column;
        align-items: center;
    }
    .avalanche-pdf a {
        margin-bottom: 20px;
        margin-right: 0;
    }
    .avalanche-pdf a:last-child {
        margin-bottom:0 !important;
    }

}

/* Widok mobilny ukryty na desktopie */
.topr-mobile-overview,
.topr-mobile-back {
    display: none;
}

@media (max-width: 767px) {

    .vc_column_container>.vc_column-inner {
        box-sizing: border-box;
        padding-left: 5px !important;
        padding-right: 5px !important;
        width: 100%;
    }

    .topr-pdf-general-info {
        flex-basis: 100%;
        background: #fff;
        border-radius: 20px;
        padding: 0;
    }

    .avalanche-pdf {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .avalanche-pdf a {
        margin-bottom: 10px;
        margin-right: 0;
        width: 100%;
        font-size: 14px;
    }

    .general-warning h4 {
        color: #fff;
        font-size: 18px;
    }

    

    /* Ekran główny */
    .topr-lawiny-container .topr-mobile-overview {
        display: block;
    }

    .topr-lawiny-container:not(.is-detail)
    > .topr-bulletin-wrapper {
        display: none !important;
    }

    /* Główne panele */
    .topr-mobile-panel {
        background: #fff;
        padding: 30px 0px;
        margin-bottom: 0px;
        border-radius: 20px;
    }
    .topr-mobile-panel.topr-mobile-description {
        padding: 0 !important;
    }

    .topr-mobile-panel h3 {
        margin-top: 0;
        font-size: 20px;
    }

    /* Najwyższy stopień zagrożenia */
    .topr-mobile-main-danger {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0px;
        margin: 5px 0;
    }

    .topr-mobile-main-icon {
        width: 140px;
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    .topr-mobile-grade-link {
        display: block;
        width: fit-content;
        margin: 10px auto 10px;
        padding: 5px 15px;
        background: #19abff;
        color: #fff;
        text-align: center;
        text-decoration: none;
    }

    /* Dwa regiony obok siebie */
    .topr-mobile-region-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 16px 0 24px;
    }

    .topr-mobile-region-card {
        appearance: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        gap: 10px;
        padding: 14px 8px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 16px;
        text-align: center;
        font: inherit;
        color: inherit;
        cursor: pointer;
        position: relative;
    }

    /* Delikatne przesunięcie jak na wzorcu */
    .topr-mobile-region-card:nth-child(even) {
        transform: translateY(15px);
    }

    .topr-mobile-region-card::after {
        content: 'i';
        position: absolute;
        right: 5px;
        bottom: 5px;
        border-radius: 50%;
        color: #333;
        border: solid 1px #333;
        width: 20px;
        height: 20px;
        line-height: 18px;
        text-align: center;
        text-transform: none;
        font-style: italic;
    }

    .topr-mobile-region-name {
        font-weight: 700;
        font-size: 13px;
        text-wrap: wrap;
        line-height: 1;
    }

    .topr-mobile-region-icon {
        max-width: 95%;
        width: auto;
        height: 75px;
        object-fit: contain;
    }

    .topr-mobile-region-level {
        display: block;
        font-size: 11px;
    }

    .topr-mobile-region-tendency svg {
        display: block;
        width: 40px;
        height: 30px;
        max-width: 100%;
    }

    /* Daty */
    .topr-mobile-dates {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        font-size: 13px;
        margin-top: 10px;
    }

    .topr-mobile-dates > div {
        display: flex;
        flex-direction: column;
        gap: 5px;
        min-width: 0;
    }

    .topr-mobile-dates > div:last-child {
        text-align: right;
    }

    .topr-mobile-dates strong {
        overflow-wrap: anywhere;
    }

    /* Opis najwyższego stopnia */
    .topr-mobile-description p {
        margin-bottom: 15px;
        font-size: 14px;
    }

    /* Po kliknięciu w region */
    .topr-lawiny-container.is-detail
    > .topr-mobile-overview,
    .topr-lawiny-container.is-detail
    > .topr-pdf-general-info {
        display: none !important;
    }

    .topr-lawiny-container.is-detail
    > .topr-bulletin-wrapper {
        display: block !important;
    }

    .topr-lawiny-container.is-detail
    .topr-bulletin {
        display: none !important;
    }

    .topr-lawiny-container.is-detail
    .topr-bulletin.topr-mobile-active {
        display: block !important;
    }

    .topr-lawiny-container.is-detail
    .topr-mobile-back {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        padding: 12px;
        background: #19abff;
        top:20px !important;
        border: 0;
        text-align: left;
        cursor: pointer;
    }
}

/* Elementy mobilne ukryte na desktopie */
.topr-mobile-detail-heading,
.topr-mobile-detail-card,
.topr-mobile-period-title,
.topr-mobile-def-label {
    display: none;
}

@media (max-width: 767px) {
    .topr-bulletin {
        background-color: #fff !important;
    }

    /* GŁÓWNY KONTENER SZCZEGÓŁÓW */
    .topr-lawiny-container.is-detail
    .topr-bulletin.topr-mobile-active {
        display: flex !important;
        flex-direction: column;
        position: relative;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
    }

    /* Ukrywamy stare informacje w nagłówku */
    .topr-lawiny-container.is-detail
    .avalanche-meta-info {
        display: none !important;
    }

    /* Kolejność poszczególnych sekcji */
    .topr-mobile-detail-heading {
        display: block;
        order: 1;
        padding-right: 40px;
        margin-top: 17px !important;
        text-align: left !important;
        font-size: 18px !important;
    }

    .topr-mobile-detail-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        order: 2;
    }

    .avalanche-problems {
        order: 3;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .avalanche-comment {
        order: 4;
        width: 100%;
    }

    .avalanche-info-desc {
        order: 5;
        width: 100%;
    }

    /* PRZYCISK POWROTU */
    .topr-lawiny-container.is-detail
    .topr-mobile-back {
        position: absolute;
        top: 0;
        right: 0;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        font-size: 0;
        cursor: pointer;
    }

    .topr-mobile-back::before {
        content: "↶";
        font-size: 28px;
        position: absolute;
        left:9px;
    }

    /* KARTA REGIONU */
    .topr-mobile-detail-card {
        width: 100%;
        padding: 0px;
        border: none;
        margin-bottom: 0px;
    }

    .topr-mobile-detail-meta {
        display: flex;
        width: 100%;
        justify-content: space-between;
        gap: 12px;
        font-size: 12px;
    }

    .topr-mobile-detail-meta > div {
        display: flex;
        flex-direction: column;
        gap: 0px;
    }

    .topr-mobile-detail-meta > div:last-child {
        text-align: right;
    }

    .topr-mobile-detail-icon {
        display: block;
        width: 145px;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        margin: 5px auto;
    }

    .topr-mobile-detail-danger {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0px;
        font-size: 12px;
        text-align: center;
    }

    .topr-mobile-detail-tendency-icon {
        margin: 25px auto 10px;
    }

    .topr-mobile-detail-tendency-icon svg {
        display: block;
        width: 70px;
        height: 50px;
        margin: auto;
    }

    .topr-mobile-detail-tendency {
        text-align: center;
        font-size: 12px;
    }

    /* SEKCJE PROBLEMÓW */
    .avalanche-problems > h4 {
        display: none;
    }

    .topr-mobile-period-title {
        display: block;
        position: absolute;
        top: -40px;
        left: 0;
        margin: 0;
        font-size: 16px;
    }

    .problem-list {
        display: block;
    }

    .morning-problems,
    .afternoon-problems,
    .allday-problems {
        display: grid !important;
        grid-template-columns: 65px minmax(0, 1fr);
        gap: 5px;
        align-items: center;
        position: relative;
        padding: 0px;
        padding-bottom: 20px;
        margin: 55px 0 20px;
        
    }

    /* Ikona AM / PM */
    .period-header {
        grid-column: 1;
        display: flex;
        justify-content: center;
    }

    .period-header-label {
        display: none;
    }

    /* Trójkąt zagrożenia */
    .period-group-ico {
        grid-column: 2;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-bottom: 0;
    }

    /* Tekstowe opisy stopni niepotrzebne pod trójkątem */
    .period-danger-info {
        display: none;
    }

    .period-danger-icon {
        display: block;
    }

    .period-danger-icon svg {
        display: block;
        max-width: 100px;
        height: 60px !important;
    }

    /* Lista problemów pod trójkątem */
    .problem-group {
        grid-column: 1 / -1;
        border-top: 1px solid #e0e6ef;
        padding-top: 0px;
    }

    .problem-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    /* .problem-row + .problem-row {
        border-top: 1px solid #e0e6ef;
        margin-top: 15px;
        padding-top: 15px;
    } */

    /* Problem -> góra -> kompas */
    .problem-icons {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        margin-bottom: 0 !important;
    }

    .problem-icons .problem-img {
        width: 65px;
        height: auto;
        object-fit: contain;
    }

    .problem-icons .problem-svg {
        flex: 1 1 0;
        min-width: 0;
    }

    .problem-icons .problem-svg svg {
        display: block;
        max-width: 100%;
        height: 60px !important;
    }

    .problem-meta strong {
        font-size: 14px !important;
    }

    /* Nazwa i dodatkowe informacje problemu */
    .problem-meta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .problem-meta span {
        display: block;
    }

    /* KOMENTARZ */
    .avalanche-comment {
        margin-top: 0px;
        padding: 0 !important;
    }

    .avalanche-comment h4 {
        font-size: 18px;
    }

    .avalanche-comment p {
        padding: 0px;
        background: #fff;
        font-size: 14px;
    }

    /* OPIS STOPNIA */
    .avalanche-info-desc {
        margin-top: 0px;
        padding: 0 !important;
    }

    .avalanche-info-desc h4 {
        font-size: 18px;
    }

    .topr-mobile-def-label {
        display: block;
        margin-bottom: 5px;
        font-weight: 400;
        opacity: .65;
    }

    .avalanche-info-desc p {
        margin-bottom: 20px;
        font-size: 14px !important;
    }

    .avalanche-info-desc > a {
        display: none;
    }
}

@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
    .topr-bulletin h3 {
        font-size: 22px;
        margin-bottom: 5px;
        text-transform: uppercase;
    }
    .topr-meta {
        font-size: 14px;
    }

    .topr-bulletin h4 {
        font-size: 18px;
        margin-bottom: 20px;
        margin-top: 20px !important;
        text-transform: uppercase;
    }

    .danger-ico {
        height: 100px;
    }

    .danger-level {
        text-transform: uppercase;
        font-weight: 800;
        font-size: 18px;
    }
    .tendency-wrapp {
        font-size: 16px;
    }
    .tendency-meta svg {
        height: 40px !important;
        margin-right: 20px;
    }
    .tendency-meta {
        font-size: 14px;
    }
    .topr-bulletin p {
        font-size: 16px;
        line-height: 1.3;
    }
    .period-header-label {
        display: none;
    }
    .period-group-ico svg {
        height: 60px !important;
    }
    .problem-img {
        height: 60px !important;
        cursor: pointer;
        margin-right: 10px;
    }
    .problem-svg svg {
        height: 60px !important;
    }
    .problem-meta strong {
        margin-bottom: 0px;
        font-size: 14px;
    }
    .general-warning h4 {
        color: #fff;
        font-size: 20px;
    }
    .general-warning p {
        font-size: 16px;
    }
}

/* ==========================================
   SCREEN INFO
========================================== */

@media (min-width: 768px) {

    .screen-info {
        height:550px;
        overflow: hidden;
    }

    .screen-qr {
        position: absolute;
        display: flex;
        right: 0;
        bottom: 0;
        gap: 10px;
        font-size: 14px;
        font-weight: 600;
        align-items: flex-end;
        text-transform: uppercase;
    }

    .screen-qr span {
        background-color: #fff;
    }

    .screen-qr img {
        width: 100px;
        height: auto;
    }

    .screen-info > .topr-bulletin {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: stretch;
        gap: 0px;
        background-color: transparent;
        padding: 0;
    }

    .screen-info .topr-bulletin h3, .screen-info .topr-bulletin h4 {
        font-size: 17px;
        margin-bottom: 5px;
        margin-top: 10px;
    }
    .screen-info .topr-meta {
        font-size: 14px;
    }

    .screen-info .danger-ico {
        height: 100px;
    }

    .screen-info .tendency-meta span {
        font-size: 16px;
    }

    .screen-info .tendency-meta svg {
        height: 45px !important;
        margin-right: 30px;
    }

    .screen-info .tendency-wrapp strong {
        font-size: 16px;
    }

    .screen-info .danger-level {
        text-transform: uppercase;
        font-weight: 800;
        font-size: 20px;
    }

    .screen-info .topr-bulletin p {
        font-size: 15px;
        margin-bottom: 0px;
    }

    .screen-info .period-group-ico svg {
        height: 60px !important;
    }

    .screen-info .period-header-label {
        font-size: 14px;
        text-align: left;
        line-height: 1;
    }

    .screen-info .morning-problems, .screen-info .afternoon-problems, .screen-info .allday-problems {
        gap: 20px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .screen-info .problem-img {
        height: 60px !important;
        cursor: pointer;
        margin-right: 10px;
    }
    .screen-info .problem-svg {
        width: 140px;
    }
    .screen-info .problem-svg svg {
        height: 60px !important;
    }
    .screen-info .problem-row {
        display: flex;
        flex-direction: column;
        border-bottom: solid 1px #ccc;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    .screen-info .problem-meta strong {
        margin-bottom: 0px;
        font-size: 14px;
    }
    .screen-info .problem-icons {
        display: flex;
        align-items: center;
        margin-right: 0px;
        flex-shrink: 0;
        margin-bottom: 5px;
    }

    .screen-info .problem-list div:last-child {
        border: none !important;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    /* 1. Region — lewa góra */
    .screen-info .avalanche-meta-info {
        order: 1;
        flex: 0 0 calc(42% - 10px);
        margin: 0;
    }

    /* 2. Problemy — prawa góra */
    .screen-info .avalanche-problems {
        order: 2;
        flex: 0 0 calc(58% - 10px);
        margin: 0;
    }

    /* 3. Opis — lewy dół */
    .screen-info .avalanche-info-desc {
        order: 3;
        flex: 0 0 calc(100% - 0px);
        margin-bottom: 0;
        margin-top: -10px;
        padding: 0 20px;
    }

    /* 4. Komentarz — prawy dół */
    .screen-info .avalanche-comment {
        order: 4;
        flex: 0 0 calc(100% - 0px);
        margin: 8px 0px 0px 0px;
        padding: 0 20px;
        max-width: calc(100% - 80px);
    }

    .screen-info .topr-bulletin > div {
        min-width: 0;
        box-sizing: border-box;
    }
}

/* Nagłówek problemów — tylko mobile */
.topr-mobile-problems-title {
    display: none;
}

@media (max-width: 767px) {

    .topr-mobile-period-title {
        text-transform: uppercase;
        font-weight: 700;
    }

    .topr-mobile-problems-title {
        display: block;
        grid-column: 1 / -1;
        position: static;
        margin: 20px 0 5px;
        padding: 0;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.3;
        text-transform: uppercase;
    }

}

.period-danger-icon .topr-treeline-legend,
.problem-svg .topr-treeline-legend {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: max-content;
    margin: 6px 0 0;
    padding: 0;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    color: #333;
}

/* Dodatkowe drzewka przy legendzie */
.period-group-ico .topr-treeline-trees,
.problem-svg .topr-treeline-trees {
    display: block;
    width: 32px !important;
    height: 24px !important;
    max-width: none !important;
    flex-shrink: 0;
}
.period-group-ico .topr-treeline-legend .topr-treeline-trees {
    height: 20px !important;
}

/* ============================================================
   ROTATOR EKRANÓW TOPR — 1024 x 570 px (tylko shortcode ekranowy)
   ============================================================ */
.topr-screen-rotator {
    position: relative;
    width: 1024px;
    max-width: 100%;
    height: 570px;
    overflow: hidden;
    background: #f6f7f9;
    border-radius: 0;
    box-sizing: border-box;
}

.topr-screen-rotator,
.topr-screen-rotator * {
    box-sizing: border-box;
}

.topr-screen-rotator .topr-screen-source {
    display: none !important;
}

.topr-screen-rotator .topr-screen-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.topr-screen-rotator .topr-screen-slide {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 12px;
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .55s ease, visibility .55s;
}

.topr-screen-rotator .topr-screen-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.topr-screen-rotator .topr-screen-slide--summary {
    grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
}

/* Ekran 2 i 4 — podział poziomy */
.topr-screen-rotator .topr-screen-slide--detail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 70fr) minmax(0, 30fr);
    gap: 10px;
}

/* Sekcja AM / PM — pełna szerokość */
.topr-screen-rotator .topr-screen-detail-top {
    width: 100%;
    min-width: 0;
}

/* AM i PM po 50% */
.topr-screen-rotator .topr-screen-detail-top .problem-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

/* Komentarz pod problemami */
.topr-screen-rotator .topr-screen-detail-bottom {
    width: 100%;
    min-width: 0;
}

.topr-screen-rotator .topr-screen-detail-bottom > .topr-screen-fit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 16px;
    align-items: start;
}

/* QR po prawej stronie komentarza */
.topr-screen-rotator .topr-screen-detail-bottom .screen-qr {
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin: 0;
    text-align: center;
    align-items: flex-end;
    position: absolute;
    right: -20px;
    bottom: 20px;
    width: 230px;
    height: 120px;
}

.topr-screen-rotator .topr-screen-panel {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
}

.topr-screen-rotator .topr-screen-fit {
    width: 100%;
    transform-origin: top left;
}

/* PIERWSZY EKRAN — region, stopień, daty, tendencja, opis */
.topr-screen-rotator .avalanche-meta-info,
.topr-screen-rotator .avalanche-info-desc,
.topr-screen-rotator .avalanche-problems,
.topr-screen-rotator .avalanche-comment {
    display: block;
    flex: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.topr-screen-rotator .avalanche-meta-info h3 {
    margin: 0 0 8px;
    font-size: 23px;
    line-height: 1.2;
    text-transform: uppercase;
}

.topr-screen-rotator .topr-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    font-size: 14px;
    line-height: 1.3;
}

.topr-screen-rotator .avalanche-meta-info h4 {
    margin: 12px 0 5px !important;
    font-size: 17px;
    line-height: 1.15;
}

.topr-screen-rotator .danger-level-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.topr-screen-rotator .danger-ico {
    height: 74px;
    max-width: 100%;
    object-fit: contain;
}

.topr-screen-rotator .danger-level {
    font-size: 18px;
}

.topr-screen-rotator .tendency-wrapp {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.25;
}

.topr-screen-rotator .tendency-meta {
    display: flex;
    gap: 8px;
    margin: 2px 0 0;
    align-items: center;
    font-size: 13px;
}

.topr-screen-rotator .tendency-meta svg {
    height: 32px !important;
    margin: 0;
}

.topr-screen-rotator .avalanche-info-desc {
    margin-top: 12px !important;
}

.topr-screen-rotator .avalanche-info-desc h4,
.topr-screen-rotator .avalanche-problems > h4,
.topr-screen-rotator .avalanche-comment h4 {
    margin: 0 0 8px !important;
    font-size: 18px;
    line-height: 1.2;
    text-transform: uppercase;
}

.topr-screen-rotator .avalanche-info-desc p {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.28;
}

.topr-screen-rotator .avalanche-info-desc > a {
    display: none;
}

/* DRUGI EKRAN — okresy AM/PM i problemy lawinowe */
.topr-screen-rotator .topr-screen-region {
    font-size: 21px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.topr-screen-rotator .problem-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.topr-screen-rotator .morning-problems,
.topr-screen-rotator .afternoon-problems,
.topr-screen-rotator .allday-problems {
    display: block !important;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
}

.topr-screen-rotator .period-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.topr-screen-rotator .period-header-ico svg {
    display: block;
    height: 38px !important;
    width: 38px;
}

.topr-screen-rotator .period-header-label {
    display: block !important;
    font-size: 12px;
}

.topr-screen-rotator .period-group-ico {
    width: 100%;
    margin: 0 0 6px;
    text-align: left;
}

.topr-screen-rotator .period-danger-icon svg {
    display: block;
    height: 61px !important;
}

.topr-screen-rotator .problem-group {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
}

.topr-screen-rotator .problem-row {
    display: block;
    min-width: 0;
    padding: 5px 0;
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
}

.topr-screen-rotator .problem-icons {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    min-width: 0;
    margin: 0 0 3px;
}

.topr-screen-rotator .problem-img {
    display: block;
    height: 41px !important;
    width: auto;
    max-width: 62px;
    object-fit: contain;
    margin: 0;
}

.topr-screen-rotator .problem-svg {
    width: auto;
    max-width: 100px;
    min-width: 0;
    margin: 0;
    overflow: visible;
}

.topr-screen-rotator .problem-svg svg {
    display: block;
    max-width: 100%;
    height: 41px !important;
}

.topr-screen-rotator .problem-meta {
    display: block;
    font-size: 12px;
    line-height: 1.2;
}

.topr-screen-rotator .problem-meta strong {
    font-size: 12px;
    line-height: 1.2;
    margin: 0;
}

.topr-screen-rotator .topr-mobile-period-title,
.topr-screen-rotator .topr-mobile-problems-title {
    display: none !important;
}

/* Komentarz TOPR + dotychczasowy kod QR */
.topr-screen-rotator .avalanche-comment p {
    margin: 0;
    font-size: 15px;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.topr-screen-rotator .screen-qr {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
    font-size: 13px;
}

.topr-screen-rotator .screen-qr img {
    display: block;
    width: 65px;
    height: auto;
}

/* Awaryjnie pokaż pierwszy komunikat, gdyby JavaScript się nie uruchomił. */
.topr-screen-rotator:not(.topr-screen-ready) > .topr-screen-source:nth-child(2) {
    display: block !important;
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* =====================================================
   RĘCZNE PRZEŁĄCZANIE EKRANÓW — TRYB TESTOWY
   ===================================================== */

.topr-screen-rotator .topr-screen-controls {
    position: absolute;
    z-index: 100;
    right: 15px;
    top: 15px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;

    color: #fff;
}

.topr-screen-rotator .topr-screen-controls button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    padding: 0;

    border: 0;
    border-radius: 5px;
    background: #19abff;
    color: #fff;

    font-size: 18px;
    cursor: pointer;
}

.topr-screen-rotator .topr-screen-controls button:hover {
    background: #087fc2;
}

.topr-screen-rotator .topr-screen-counter {
    min-width: 45px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* =====================================================
   EKRAN 2 / 4 — AM I PM
   Ikona okresu oraz góra obok siebie
   ===================================================== */

.topr-screen-rotator .topr-screen-slide--detail
.morning-problems,

.topr-screen-rotator .topr-screen-slide--detail
.afternoon-problems,

.topr-screen-rotator .topr-screen-slide--detail
.allday-problems {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 8px;
    align-items: center;
}

/* Lewa strona — AM / PM */
.topr-screen-rotator .topr-screen-slide--detail
.period-header {
    grid-column: 1;
    grid-row: 1;

    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

/* Prawa strona — góra ze stopniami */
.topr-screen-rotator .topr-screen-slide--detail
.period-group-ico {
    grid-column: 2;
    grid-row: 1;

    width: 100%;
    min-width: 0;
    margin: 0;
}

/* Problemy — pełna szerokość pod AM/PM i górą */
.topr-screen-rotator .topr-screen-slide--detail
.problem-group {
    grid-column: 1 / -1;
    grid-row: 2;

    width: 100%;
    min-width: 0;
}

/* Rozmiar ikony AM / PM */
.topr-screen-rotator .topr-screen-slide--detail
.period-header-ico svg {
    width: 44px;
    height: 44px !important;
}