:root {
    color-scheme: light;
    --bg: #eef3f8;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --ink: #152033;
    --muted: #647187;
    --line: #d9e1ec;
    --accent: #155dfc;
    --accent-dark: #0f46c7;
    --danger: #d9483f;
    --danger-bg: #fff3ef;
    --shadow: 0 24px 70px rgba(21, 32, 51, 0.14);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 0%, rgba(21, 93, 252, 0.13), transparent 31rem),
        radial-gradient(circle at 100% 12%, rgba(14, 165, 233, 0.14), transparent 28rem),
        linear-gradient(145deg, #f8fbff 0%, #eef3f8 52%, #f7f9fc 100%);
}

a {
    color: var(--accent);
    font-weight: 600;
    text-underline-offset: 0.18em;
}

.page-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    width: 100%;
    padding: clamp(12px, 1.8vw, 28px);
}

.language-switcher {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 20;
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px;
    border: 1px solid rgba(217, 225, 236, 0.92);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 32px rgba(21, 32, 51, 0.12);
    backdrop-filter: blur(12px);
}

.language-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    color: #40506a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.language-option:hover {
    color: var(--accent);
    background: #edf4ff;
}

.language-option:focus-visible {
    outline: 3px solid rgba(21, 93, 252, 0.28);
    outline-offset: 2px;
}

.language-option.is-active {
    color: #fff;
    background: var(--ink);
}

.flag-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 22px;
    height: 15px;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(21, 32, 51, 0.16);
}

.flag-icon--pl {
    background: linear-gradient(to bottom, #fff 0 50%, #dc143c 50% 100%);
}

.flag-icon--en {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Crect width='60' height='36' fill='%23012169'/%3E%3Cpath d='M0 0l60 36M60 0L0 36' stroke='%23fff' stroke-width='7.2'/%3E%3Cpath d='M0 0l60 36M60 0L0 36' stroke='%23c8102e' stroke-width='4.4'/%3E%3Cpath d='M30 0v36M0 18h60' stroke='%23fff' stroke-width='12'/%3E%3Cpath d='M30 0v36M0 18h60' stroke='%23c8102e' stroke-width='7.2'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.experience {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    align-items: stretch;
    gap: clamp(14px, 1.8vw, 28px);
    width: 100%;
    max-width: 100%;
}

.experience--message {
    display: block;
    max-width: 680px;
}

.photo-panel {
    align-self: center;
    min-width: 0;
}

.photo-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 1.2vw, 14px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0)),
        #0f1726;
    box-shadow: var(--shadow);
    user-select: none;
    -webkit-user-select: none;
}

.photo-preview {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 64px);
    object-fit: contain;
    border-radius: 6px;
    background: #111827;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
}

.photo-shield {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
    cursor: default;
}

.action-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(22px, 3.4vw, 42px);
    border: 1px solid rgba(217, 225, 236, 0.92);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 52px rgba(21, 32, 51, 0.1);
    backdrop-filter: blur(14px);
}

.action-panel--message {
    min-height: 300px;
    text-align: left;
}

.panel-header {
    margin-bottom: 28px;
}

.site-name {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: 0;
}

p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.lead {
    margin-top: 14px;
    color: #40506a;
    font-size: 17px;
    line-height: 1.55;
}

.lead-highlight {
    color: var(--shop-accent-dark);
    font-weight: 850;
}

.retention-note {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(21, 93, 252, 0.18);
    border-radius: var(--radius);
    color: #31435f;
    background: #f0f6ff;
    font-size: 14px;
    line-height: 1.5;
}

.retention-note strong {
    color: var(--ink);
    font-weight: 850;
}

.form-stack {
    display: grid;
    gap: 16px;
    width: 100%;
}

.section-label {
    color: #26364d;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
}

.check-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    color: #40506a;
    font-size: 14px;
    line-height: 1.45;
}

.check-row input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--accent);
}

button {
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:focus-visible {
    outline: 3px solid rgba(21, 93, 252, 0.28);
    outline-offset: 3px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 22px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    box-shadow: 0 18px 34px rgba(21, 93, 252, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.download-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    box-shadow: 0 22px 38px rgba(21, 93, 252, 0.34);
}

.download-btn:focus-visible {
    outline: 3px solid rgba(21, 93, 252, 0.28);
    outline-offset: 3px;
}

.divider {
    width: 100%;
    height: 1px;
    margin: 26px 0;
    background: var(--line);
}

.danger-zone {
    gap: 14px;
}

.delete-btn {
    color: var(--danger);
    background: var(--danger-bg);
    box-shadow: inset 0 0 0 1px rgba(217, 72, 63, 0.2);
}

.delete-btn:hover {
    background: #ffe6de;
}

.warning {
    color: #a53c34;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .page-shell {
        place-items: start center;
        padding: 14px;
    }

    .experience {
        grid-template-columns: 1fr;
        max-width: 680px;
    }

    .photo-frame {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .photo-preview {
        width: auto;
        max-height: 68vh;
    }

    h1 {
        font-size: clamp(28px, 7vw, 38px);
    }

    .action-panel {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .page-shell {
        padding: 10px;
        padding-top: 54px;
    }

    .language-switcher {
        top: max(8px, env(safe-area-inset-top));
        right: max(8px, env(safe-area-inset-right));
    }

    .language-option {
        min-height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }

    .flag-icon {
        width: 20px;
        height: 14px;
    }

    .photo-frame,
    .action-panel {
        border-radius: 0;
    }

    .photo-frame {
        margin: -10px -10px 0;
        padding: 8px;
    }

    .action-panel {
        padding: 18px 16px;
    }

    .panel-header {
        margin-bottom: 18px;
    }

    .site-name {
        margin-bottom: 10px;
        font-size: 12px;
    }

    h1 {
        font-size: 26px;
        line-height: 1.12;
    }

    .lead {
        margin-top: 10px;
        font-size: 14px;
        line-height: 1.48;
    }

    p {
        font-size: 14px;
    }

    .form-stack {
        gap: 12px;
    }

    .section-label,
    .check-row {
        font-size: 13px;
    }

    button {
        min-height: 44px;
        font-size: 14px;
    }

    .divider {
        margin: 18px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
