:root {
    --ink: #101218;
    --ink-soft: #1c212b;
    --paper: #f7f4ef;
    --gold: #d4b483;
    --gold-deep: #9a7344;
    --line: rgba(255, 255, 255, 0.12);
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
    --pole-red: #e23b45;
    --pole-blue: #1c408c;
}

html,
body {
    background: transparent;
}

body {
    position: relative;
    z-index: 0;
    font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: #fff;
    background-image: repeating-linear-gradient(
        45deg,
        var(--pole-red) 0 34px,
        #fff 34px 68px,
        var(--pole-blue) 68px 102px,
        #fff 102px 136px
    );
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 auto;
    width: min(56rem, calc(100% - 2rem));
    margin-top: calc(12px + var(--safe-top));
    padding: 10px 12px 10px 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(16, 18, 24, 0.78);
    color: #f6f1e8;
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.brand img {
    width: 42px;
    height: 48px;
    object-fit: contain;
}

.brand strong {
    display: block;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 14px;
}

.brand small {
    display: block;
    color: #c8c0b4;
    font-size: 12px;
}

.app-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-link,
.icon-btn,
#account-btn {
    border: 0;
    border-radius: 999px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.header-link {
    display: inline-flex;
    align-items: center;
    color: #f6f1e8;
    text-decoration: none;
    background: transparent;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f6f1e8;
}

#account-btn {
    background: var(--gold);
    color: #1a140d;
    box-shadow: none;
}

#account-btn:hover {
    background: #e3c79a;
}

.icon-btn {
    position: relative;
    width: 42px;
    padding: 0;
    display: grid;
    place-items: center;
}

#notices-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    line-height: 18px;
    font-weight: 700;
}

.booking-card {
    border-radius: 28px;
}

.price-stack {
    text-align: right;
    min-width: 9.5rem;
}

.price-now {
    font-weight: 750;
    font-size: 1.05rem;
    color: #111827;
    letter-spacing: -0.02em;
}

.price-anchor {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.35;
}

.price-anchor strong,
.price-anchor .price-anchor-value {
    font-weight: 700;
    white-space: nowrap;
}

.summary-anchor {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.4;
}

.summary-anchor strong {
    display: block;
    margin-top: 2px;
}

.site-footer {
    width: min(56rem, calc(100% - 2rem));
    margin-top: auto;
    margin-right: auto;
    margin-bottom: calc(16px + var(--safe-bottom));
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px 12px 18px;
    border-radius: 22px;
    background: rgba(16, 18, 24, 0.92);
    color: #f6f1e8;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0;
    font-size: 14px;
}

.site-footer-links a,
.site-footer-links button {
    color: #f6f1e8;
    font-weight: 650;
    text-decoration: none;
}

.site-footer-links button {
    border: 0;
    padding: 0;
    background: none;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.site-credit {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    flex-shrink: 0;
    padding: 9px 16px;
    border-radius: 999px;
    background: #fff;
    color: #16181d;
    text-decoration: none;
    font-size: 14px;
}

.site-credit span {
    color: #6b645c;
    font-weight: 600;
}

.site-credit strong {
    font-weight: 800;
}

.legal-page h2 {
    margin: 28px 0 8px;
    font-size: 22px;
}

.legal-page p {
    margin: 0 0 12px;
    line-height: 1.55;
}

.legal-page a {
    color: var(--gold-deep);
}

.legal-dl {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.legal-dl div {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 12px;
}

.legal-dl dt {
    color: #6b645c;
    font-size: 13px;
    font-weight: 700;
}

.legal-dl dd {
    margin: 0;
}

.cookie-modal[hidden] {
    display: none !important;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(16, 18, 24, 0.55);
}

.cookie-card {
    width: min(100%, 28rem);
    padding: 22px 22px 18px;
    border-radius: 24px;
    background: #fff;
    color: #16181d;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.cookie-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.cookie-card p {
    margin: 0 0 12px;
    color: #3d3a36;
    line-height: 1.5;
}

.cookie-card a {
    color: var(--gold-deep);
    font-weight: 700;
}

#cookie-accept {
    width: 100%;
    min-height: 48px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: #16181d;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.notices-panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: min(100%, 420px);
    background: #f7f4ef;
    color: #16181d;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.25);
}

.notices-panel.is-open {
    transform: translateX(0);
}

.notices-head,
.notices-foot {
    padding: 20px;
}

.notices-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid #e7e1d8;
}

.notices-head h2 {
    font-size: 1.25rem;
    font-weight: 750;
}

.notices-head p,
#notices-status,
.notice-empty,
#ios-install-hint {
    color: #5c564e;
    font-size: 14px;
    line-height: 1.45;
}

#notices-list {
    flex: 1;
    overflow: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice-item {
    background: white;
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid #ece6dc;
}

.notice-when {
    color: var(--gold-deep);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notice-item h3 {
    margin-top: 4px;
    font-weight: 720;
}

.notice-item p:last-child {
    color: #5c564e;
    font-size: 14px;
}

.notices-foot {
    border-top: 1px solid #e7e1d8;
}

#enable-notices-btn,
.file-link,
#install-banner-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    min-height: 48px;
    background: var(--ink);
    color: #f6f1e8;
    font-weight: 700;
    cursor: pointer;
}

.file-link,
#install-banner-btn {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    text-decoration: none;
}

#ios-install-hint {
    margin-top: 12px;
}

.install-banner[hidden] {
    display: none !important;
}

.install-banner {
    position: fixed;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(56rem, calc(100% - 2rem));
    bottom: calc(12px + var(--safe-bottom));
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    background: #f7f4ef;
    color: #16181d;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.install-banner strong {
    display: block;
}

.install-banner p {
    color: #5c564e;
    font-size: 13px;
}

.install-banner.is-ios {
    align-items: stretch;
    flex-wrap: wrap;
}

.install-ios-steps {
    margin: 8px 0 0;
    padding-left: 1.1rem;
    color: #3f3a34;
    font-size: 13px;
    line-height: 1.45;
}

.install-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.sheet-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #efeae3;
    color: #16181d;
    font-size: 16px;
    cursor: pointer;
}

.account-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.account-mobile-intro,
.profile-avatar {
    display: none;
}

.profile-id {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.profile-bar p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#install-dismiss {
    border: 0;
    background: transparent;
    color: #6b645c;
    font-weight: 700;
    min-height: 44px;
    cursor: pointer;
}

.cjenik-body {
    margin: 0;
    min-height: 100vh;
    color: #16181d;
}

.cjenik-main {
    width: min(56rem, calc(100% - 2rem));
    margin: 18px auto 48px;
}

.cjenik-card {
    background: var(--paper);
    border-radius: 28px;
    padding: 28px 22px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.cjenik-card + .cjenik-card {
    margin-top: 16px;
}

.eyebrow {
    color: var(--gold-deep);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cjenik-card h1 {
    margin: 6px 0 8px;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.04em;
}

.lede,
.legal {
    color: #5c564e;
    line-height: 1.5;
}

.file-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 8px;
}

.cjenik-card h2 {
    margin: 26px 0 10px;
    font-size: 1.15rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #e6dfd4;
}

.price-row h3 {
    font-size: 1rem;
    font-weight: 700;
}

.price-row p {
    color: #6b645c;
    font-size: 13px;
    margin-top: 3px;
}

.archive-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.archive-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 0;
    border-top: 1px solid #e6dfd4;
}

.archive-list a {
    color: #16181d;
    font-weight: 650;
    word-break: break-word;
}

.archive-list time,
.legal {
    font-size: 13px;
}

.legal a {
    color: var(--gold-deep);
}

#summary-price.price-stack { text-align: left; }
#summary-price .price-anchor { justify-content: flex-start; }

@media (min-width: 640px) {
    .app-header,
    .install-banner,
    .cjenik-main,
    .site-footer {
        width: min(56rem, calc(100% - 3rem));
    }
}

body.has-install-banner .booking-main {
    padding-bottom: 7.5rem;
}

@media (max-width: 767px) {
    .price-anchor {
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
    }
    .header-link {
        display: none;
    }

    #account-btn {
        max-width: 132px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #account-overlay {
        top: var(--account-top, 0px);
        background: var(--paper);
    }

    #account-overlay > div:first-child {
        background: transparent;
        backdrop-filter: none;
    }

    .app-header {
        z-index: 50;
    }

    #account-panel {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
        padding-bottom: var(--safe-bottom);
    }

    #account-panel {
        background: var(--paper);
        color: #16181d;
    }

    #account-panel .account-head {
        display: none;
    }

    .account-mobile-intro {
        display: block;
        margin-bottom: 18px;
    }

    .account-mobile-intro h2 {
        margin: 4px 0 6px;
        font-size: 1.85rem;
        line-height: 1.1;
        letter-spacing: -0.04em;
        font-weight: 800;
    }

    .account-mobile-intro p:last-child {
        color: #5c564e;
        font-size: 14px;
        line-height: 1.45;
    }

    .auth-tabs,
    .account-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-bottom: 16px;
        padding: 4px;
        border: 0;
        border-radius: 16px;
        background: #efeae3;
    }

    .account-tabs {
        margin: 14px 16px 0;
        padding: 4px;
        border-bottom: 0;
    }

    #tab-login,
    #tab-register,
    #user-tab-history,
    #user-tab-recurring {
        margin: 0 !important;
        border: 0 !important;
        border-radius: 12px;
        background: transparent;
        color: #5c564e;
        font-weight: 700;
    }

    #tab-login.is-active,
    #tab-register.is-active,
    #user-tab-history.is-active,
    #user-tab-recurring.is-active {
        background: #fff;
        color: #16181d;
        box-shadow: 0 1px 2px rgba(16, 18, 24, 0.06);
    }

    #login-form,
    #register-form {
        background: #fff;
        border: 1px solid #ece6dc;
        border-radius: 22px;
        padding: 16px;
    }

    #auth-section label {
        color: #3f3a34;
        font-size: 13px;
        font-weight: 700;
    }

    #auth-section input {
        border: 1px solid #e6dfd4;
        background: #fff;
        padding: 0 14px;
    }

    #login-form button[type="submit"],
    #register-form button[type="submit"] {
        background: var(--ink);
        color: #f6f1e8;
        border-radius: 16px;
        font-weight: 700;
        box-shadow: none;
    }

    .profile-bar {
        margin: 4px 16px 0;
        padding: 14px !important;
        background: #fff !important;
        border: 1px solid #ece6dc !important;
        border-radius: 22px;
    }

    .profile-avatar {
        display: grid;
        width: 48px;
        height: 48px;
        flex: none;
        place-items: center;
        border-radius: 16px;
        background: var(--ink);
        color: var(--gold);
        font-size: 15px;
        font-weight: 800;
        letter-spacing: 0.04em;
    }

    #panel-user-name {
        font-size: 16px;
        font-weight: 750;
    }

    .profile-logout {
        border: 0;
        border-radius: 999px;
        min-height: 36px;
        padding: 0 14px;
        background: #efeae3;
        color: #16181d !important;
    }

    #user-history,
    #user-recurring {
        padding: 14px 16px calc(20px + var(--safe-bottom));
    }

    .history-card {
        background: #fff !important;
        border: 1px solid #ece6dc !important;
        border-radius: 18px !important;
    }

    #account-panel.translate-x-full {
        transform: translateY(8%);
    }

    #account-panel:not(.translate-x-full) {
        transform: translateY(0);
    }

    #auth-section {
        padding-bottom: calc(20px + var(--safe-bottom));
    }

    #auth-section input,
    #user-history textarea,
    #booking-form input,
    #booking-form textarea {
        font-size: 16px;
        min-height: 48px;
        border-radius: 14px;
    }

    #login-form button[type="submit"],
    #register-form button[type="submit"],
    #tab-login,
    #tab-register {
        min-height: 48px;
        font-size: 16px;
    }

    #login-form button[type="submit"],
    #register-form button[type="submit"] {
        border-radius: 16px;
    }

    main.booking-main {
        padding-top: 12px;
    }

    #summary-panel.summary-deferred {
        display: none;
    }

    #summary-panel {
        position: sticky;
        bottom: 0;
        z-index: 5;
        border-radius: 0 0 28px 28px;
        box-shadow: 0 -12px 30px rgba(16, 18, 24, 0.08);
        padding-bottom: calc(16px + var(--safe-bottom));
    }

    .site-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 14px;
    }

    .site-footer-links {
        justify-content: center;
    }

    .site-credit {
        justify-content: center;
    }

    .time-slot-btn,
    #btn-next-step3,
    #submit-btn,
    #btn-first-slot {
        min-height: 44px;
    }

    #step-3 .flex.items-center.justify-between {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (display-mode: standalone) {
    body {
        padding-bottom: var(--safe-bottom);
    }
}

@media (prefers-reduced-motion: reduce) {
    .notices-panel,
    .step-transition {
        transition: none;
    }
}
