:root {
    --navy: #0a3a5a;
    --navy-dark: #062b44;
    --green: #16813a;
    --green-dark: #0d622b;
    --bg: #f8f3ea;
    --surface: #ffffff;
    --text: #0b2340;
    --muted: #637083;
    --border: #e5ded2;
    --shadow: 0 12px 32px rgba(16, 35, 59, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(22, 129, 58, 0.10), transparent 28%),
        linear-gradient(180deg, #fffaf2 0%, var(--bg) 55%, #f2ebdf 100%);
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
    scroll-behavior: smooth;
}

a {
    color: inherit;
}

.app-shell {
    width: min(100%, 780px);
    margin: 0 auto;
    padding: 14px 14px 26px;
}

.app-hero {
    border-radius: 26px;
    padding: 16px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(10, 58, 90, 0.94), rgba(6, 43, 68, 0.96)),
        url("../../brudzeniak_baner.jpg") center/cover;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.more-hero {
    border-radius: 24px;
    padding: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 10%, rgba(155, 227, 174, .26), transparent 28%),
        linear-gradient(135deg, var(--navy), var(--navy-dark));
    box-shadow: var(--shadow);
}

.more-hero h1 {
    margin: 0;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    letter-spacing: -1px;
}

.more-hero p:last-child {
    margin: 10px 0 0;
    max-width: 520px;
    color: rgba(255, 255, 255, .82);
    line-height: 1.45;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    padding: 8px 10px;
}

.app-brand img {
    width: 182px;
    max-width: 58vw;
    height: auto;
}

.install-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #fff;
    background: var(--green);
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.hero-copy {
    padding: 38px 4px 8px;
}

.eyebrow {
    margin: 0 0 6px;
    color: #9be3ae;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 9vw, 52px);
    line-height: .98;
    letter-spacing: -1.2px;
}

.hero-copy p {
    max-width: 520px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.5;
}

.editor-note {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 14px 0;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff, #f1faf4);
    border: 1px solid rgba(22, 129, 58, .24);
    border-left: 5px solid var(--green);
    box-shadow: 0 8px 24px rgba(16, 35, 59, .07);
}

.note-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--green);
    font-size: 20px;
    font-weight: 900;
}

.editor-note strong {
    display: block;
    color: var(--green);
    font-size: 11px;
    letter-spacing: .65px;
    text-transform: uppercase;
}

.editor-note p {
    margin: 3px 0 0;
    line-height: 1.45;
    font-weight: 750;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.quick-actions a {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(16, 35, 59, .06);
}

.quick-actions span {
    font-size: 23px;
}

.install-promo {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    padding: 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff, #f1faf4);
    border: 1px solid rgba(22, 129, 58, .24);
    box-shadow: 0 8px 24px rgba(16, 35, 59, .07);
}

.install-promo[hidden] {
    display: none;
}

.install-promo-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--green);
    font-size: 21px;
}

.install-promo strong {
    display: block;
    color: var(--text);
    line-height: 1.2;
}

.install-promo p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.install-promo-btn {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 9px 13px;
    background: var(--green);
    color: #fff;
    font-weight: 900;
}

.install-promo-btn[hidden] {
    display: none;
}

.install-promo-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: rgba(10, 58, 90, .08);
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
}

.weather-widget {
    overflow: hidden;
    border-radius: 20px;
    padding: 13px;
    color: #fff;
    background:
        radial-gradient(circle at 84% 14%, rgba(255, 214, 102, .38), transparent 28%),
        linear-gradient(135deg, #0a3a5a 0%, #136f8f 58%, #16813a 100%);
    box-shadow: var(--shadow);
}

.weather-main {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.weather-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, .16);
    font-size: 34px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.weather-kicker {
    color: rgba(255, 255, 255, .76);
    font-size: 11px;
    font-weight: 850;
}

.weather-temp {
    margin-top: 2px;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -1.2px;
}

.weather-label {
    margin-top: 4px;
    color: rgba(255, 255, 255, .92);
    font-weight: 850;
    font-size: 13px;
}

.weather-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-top: 11px;
}

.weather-stats div {
    min-width: 0;
    padding: 8px 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.weather-stats span {
    display: block;
    color: rgba(255, 255, 255, .75);
    font-size: 10px;
    font-weight: 850;
}

.weather-stats strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
}

.comms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.comm-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 7px 20px rgba(16, 35, 59, .06);
}

.comm-card.important {
    grid-column: 1 / -1;
    border-left: 5px solid var(--green);
    background: linear-gradient(135deg, #fff, #f1faf4);
}

.comm-card.comm-type-ostrzezenie {
    border-left-color: #e54822;
    background: linear-gradient(135deg, #fff, #fff0eb);
}

.comm-card.comm-type-urzad {
    border-left-color: #246baf;
    background: linear-gradient(135deg, #fff, #eef4ff);
}

.comm-card.comm-type-informacja {
    border-left-color: #d68b19;
    background: linear-gradient(135deg, #fff, #fff8eb);
}

.comm-card > span {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--green);
    font-size: 18px;
    font-weight: 900;
}

.comm-type-ostrzezenie > span {
    background: #e54822;
}

.comm-type-urzad > span {
    background: #246baf;
}

.comm-type-informacja > span {
    background: #d68b19;
}

.comm-card strong {
    display: block;
    color: var(--text);
    line-height: 1.2;
    font-size: 14px;
}

.comm-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.comm-card.compact p {
    font-size: 12px;
}

.app-section {
    margin-top: 16px;
}

.app-section-tight {
    margin-top: 12px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.section-heading h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.section-heading a {
    color: var(--green);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    min-height: 116px;
    padding: 9px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 7px 20px rgba(16, 35, 59, .06);
}

.news-thumb {
    min-height: 98px;
    border-radius: 15px;
    background-size: cover;
    background-position: center;
}

.news-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--navy), var(--green));
    font-size: 34px;
    font-weight: 900;
}

.news-content {
    min-width: 0;
}

.badge {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 4px 7px;
    border-radius: 999px;
    color: #fff;
    background: var(--green);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.news-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.28;
}

.news-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popular-list a {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 850;
    line-height: 1.35;
}

.popular-list span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--navy);
    font-weight: 900;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.feature-card {
    min-height: 146px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 7px 20px rgba(16, 35, 59, .06);
}

.feature-card span {
    font-size: 27px;
}

.feature-card strong {
    font-size: 15px;
    line-height: 1.25;
}

.feature-card small {
    color: var(--muted);
    line-height: 1.35;
}

.more-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.more-link {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 7px 20px rgba(16, 35, 59, .06);
}

.more-link > span {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 129, 58, .09);
    font-size: 22px;
}

.more-link strong {
    display: block;
    color: var(--text);
    line-height: 1.2;
}

.more-link small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.35;
}

.more-link b {
    color: var(--green);
    font-size: 24px;
    line-height: 1;
}

.install-guide {
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 7px 20px rgba(16, 35, 59, .06);
}

.install-guide .section-heading {
    margin-bottom: 12px;
}

.install-guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.install-guide article {
    padding: 12px;
    border-radius: 18px;
    background: #f8f3ea;
    border: 1px solid rgba(229, 222, 210, .9);
}

.install-guide article span {
    display: block;
    margin-bottom: 8px;
    font-size: 25px;
}

.install-guide article strong {
    display: block;
    color: var(--text);
    line-height: 1.2;
}

.install-guide article p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.42;
}

.full-site-link {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 18px;
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(10, 58, 90, .20);
}

.share-app-btn {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(22, 129, 58, .24);
    border-radius: 18px;
    background: #fff;
    color: var(--green);
    font: inherit;
    font-weight: 900;
    box-shadow: 0 7px 20px rgba(16, 35, 59, .06);
}

.share-app-btn span {
    font-size: 19px;
}

.offline-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offline-card {
    width: 100%;
    padding: 22px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: center;
}

.offline-card img {
    width: 210px;
    max-width: 70vw;
    height: auto;
    margin-bottom: 20px;
}

.offline-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 12px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--navy), var(--green));
    font-size: 34px;
}

.offline-card h1 {
    margin: 0;
    color: var(--text);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -1px;
}

.offline-card p {
    max-width: 460px;
    margin: 12px auto 18px;
    color: var(--muted);
    line-height: 1.5;
}

.offline-card a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font-weight: 900;
}

.empty-state {
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px dashed var(--border);
    color: var(--muted);
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 50;
    width: min(calc(100% - 20px), 760px);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(229, 222, 210, .95);
    box-shadow: 0 16px 38px rgba(16, 35, 59, .18);
    backdrop-filter: blur(16px);
}

.bottom-nav a {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    border-radius: 18px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
}

.bottom-nav span {
    font-size: 18px;
    line-height: 1;
}

.bottom-nav a.is-active,
.bottom-nav a:hover {
    color: var(--green);
    background: rgba(22, 129, 58, .09);
}

.bottom-nav-main {
    color: #fff !important;
    background: var(--green);
    box-shadow: 0 8px 18px rgba(22, 129, 58, .22);
}

.bottom-nav-main:hover {
    background: var(--green-dark) !important;
    color: #fff !important;
}

@media (max-width: 520px) {
    .app-shell {
        padding: 10px 10px 22px;
    }

    .app-hero {
        border-radius: 22px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .install-promo {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .install-promo-btn {
        grid-column: 1 / -1;
    }

    .weather-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .weather-stats strong {
        font-size: 11px;
    }

    .comms-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .news-card p {
        display: none;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .install-guide-grid {
        grid-template-columns: 1fr;
    }
}
