/* 4fin Kongres 2026 — Selfie Wall. Light warm-grey theme, 4fin brand (Artegra Sans). */

/* ===== Brand font: Artegra Sans Extended (self-hosted from the 4fin key visual) ===== */
@font-face {
    font-family: "Artegra Sans Extended";
    src: url("./assets/fonts/ArtegraSansExtended-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Artegra Sans Extended";
    src: url("./assets/fonts/ArtegraSansExtended-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* 4fin brand — red→violet accents on warm grey */
    --color-primary: #c4005a;          /* 4fin magenta-crimson */
    --color-primary-hover: #a8004d;
    --color-red: #dc2626;              /* red end of the button gradient */
    --color-violet: #7a1550;           /* violet end of the button gradient */
    --color-secondary: #e0ddd8;        /* warm light surface */
    --color-secondary-hover: #d3cec7;
    --color-accent: #c4005a;           /* magenta accent (active states, links) */
    --color-accent-soft: #8c1642;
    --color-background: #d8d4ce;        /* warm grey */
    --color-surface: #f2f0ec;           /* near-white card */
    --color-surface-2: #e7e3dd;
    --color-text-primary: #1a1614;      /* near-black */
    --color-text-secondary: #4a4847;    /* warm grey ink */
    --color-border: #c0b8b2;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(26, 22, 20, 0.12);
    --shadow-md: 0 4px 14px rgba(26, 22, 20, 0.16);
    --shadow-lg: 0 12px 30px rgba(26, 22, 20, 0.22);
    --shadow-primary: 0 6px 20px rgba(196, 0, 90, 0.35);

    --font-family: "Artegra Sans Extended", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Artegra Sans Extended", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    width: 100%;
    height: 100%;
    background-color: var(--color-background);
    /* Warm-grey base with a soft violet brand glow at the TOP (just below the white nav bar)
       and at the BOTTOM. Kept subtle. */
    background-image:
        radial-gradient(130% 42% at 50% 0%, rgba(123, 47, 247, 0.20) 0%, rgba(123, 47, 247, 0.07) 38%, rgba(216, 212, 206, 0) 72%),
        radial-gradient(130% 42% at 50% 100%, rgba(123, 47, 247, 0.18) 0%, rgba(123, 47, 247, 0.06) 38%, rgba(216, 212, 206, 0) 72%),
        radial-gradient(100% 90% at 50% 50%, #f2f0ec 0%, #d8d4ce 85%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--color-text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.main-container,
.app-container {
    background-color: transparent !important;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
    color: var(--color-text-primary);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.005em;
}

p {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* ====== LAYOUT ====== */

.main-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.app-container {
    width: 100%;
    max-width: 393px;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    max-height: 950px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 0 auto;
    container-type: inline-size;   /* enables cqw sizing for the welcome headline */
}

/* ====== HEADER ====== */

.header {
    width: 100%;
    background: rgba(242, 240, 236, 0.96);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: 0 2px 12px rgba(26, 22, 20, 0.10);
    position: relative;
    z-index: 2;
}

.header-inner {
    height: 64px;
    max-width: 393px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
}

/* 4fin circle logo top-left — doubles as the Home / reset trigger.
   Bigger than the bar so it OVERFLOWS below the header (bleeds down into the app). */
.brand-logo {
    position: absolute;
    top: 9px;
    left: var(--spacing-md);
    height: 84px;
    width: 84px;
    border-radius: 50%;        /* clip the square asset to a clean circle */
    object-fit: cover;
    cursor: pointer;
    user-select: none;
    display: block;
    z-index: 5;
    filter: drop-shadow(0 4px 12px rgba(26, 22, 20, 0.25));
    transition: transform 0.15s;
}
.brand-logo:hover { transform: scale(1.03); }
.brand-logo:active { transform: scale(0.98); }

/* Centre wordmark in the nav bar — unused (kept for compatibility). */
.header-center-logo { display: none; }

/* Language switch — pushed to the right corner; only the active flag is visible. */
.lang-switch { display: flex; align-items: center; margin-left: auto; }

.lang-switch button {
    appearance: none;
    border: 2px solid var(--color-primary);
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.2s;
}

.lang-switch button:hover { transform: scale(1.06); }
.lang-switch button:active { transform: scale(0.96); }

.lang-switch button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.lang-switch button:not(.is-active) { display: none; }

/* ====== SCREENS ====== */

.screen {
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-md);
    box-sizing: border-box;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen.active { display: flex; }

h2 {
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    letter-spacing: 0.005em;
    color: var(--color-text-primary);
}

h2 .accent { color: var(--color-accent); }

/* ====== BUTTONS ====== */

.button {
    display: inline-block;
    width: 100%;
    height: 54px;
    margin-top: var(--spacing-lg);
    border-radius: var(--radius-pill);
    /* red → magenta → violet "červeno-fialové" gradient */
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-primary) 55%, var(--color-violet) 100%);
    color: #FFFFFF;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: var(--shadow-primary);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.button:hover {
    box-shadow: 0 8px 24px rgba(196, 0, 90, 0.45);
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.button:active { transform: scale(0.98); }

#retake-button { margin-top: var(--spacing-md); }

.button-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: none;
}
.button-secondary:hover {
    background: rgba(196, 0, 90, 0.08);
    box-shadow: none;
    filter: none;
}

/* ====== WELCOME SCREEN ====== */

/* Frameless. The headline block spans EXACTLY from the nav bar down to the Start button,
   with the text centred inside it → the text is equidistant from the nav bar (above) and
   the button (below). The block height equals the GDPR "Souhlasím" button's top offset
   (32 padding + 16 + 440 content + 24 = 512px), so Start lands on the SAME line as
   Souhlasím — the primary tap target never moves between steps. */
#welcome-screen {
    height: 100%;
    justify-content: flex-start;
    padding: 0 20px;
}

#welcome-screen .welcome-copy {
    flex: 0 0 auto;
    height: 512px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

#welcome-screen h2 {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    /* Sized to the app-container width (cqw) so the long line fits without clipping,
       on both phone and the wider desktop column. Artegra Sans Extended is very wide. */
    font-size: clamp(20px, 5.4cqw, 62px);
    line-height: 1.1;
    letter-spacing: 0;
    margin: 0 auto;
    color: var(--color-text-primary);
}

#welcome-screen p.welcome-sub {
    font-weight: 400;
    font-size: clamp(15px, 4.6vw, 22px);
    line-height: 1.4;
    margin: 18px 0 0;
    color: var(--color-text-secondary);
}

/* ── Letter-by-letter welcome intro ──
   Each character fades in on its own; the headline + subtitle type in, then the button. */
#welcome-screen .ch {
    opacity: 0;
    transition: opacity 0.22s ease;
}
#welcome-screen .ch.show { opacity: 1; }

/* Before the text is split (i18n-ready), keep the raw text hidden — no flash. */
#welcome-screen[data-intro="pending"] h2,
#welcome-screen[data-intro="pending"] .welcome-sub { visibility: hidden; }

/* Start button stays hidden while the text is still appearing; fades in when done. */
#welcome-screen[data-intro="pending"] #start-button,
#welcome-screen[data-intro="running"] #start-button {
    opacity: 0;
    pointer-events: none;
}
#start-button { transition: opacity 0.3s ease; }

/* Respect reduced-motion: show everything immediately, no typing. */
@media (prefers-reduced-motion: reduce) {
    #welcome-screen .ch { opacity: 1 !important; transition: none; }
    #welcome-screen[data-intro] h2,
    #welcome-screen[data-intro] .welcome-sub { visibility: visible !important; }
    #welcome-screen[data-intro] #start-button { opacity: 1 !important; pointer-events: auto !important; }
}

#start-button {
    height: 64px;
    font-size: 24px;
    letter-spacing: 0.03em;
    margin-top: 0;
    width: 100%;
    max-width: 360px;
    flex: 0 0 auto;
    /* Calm "breathing" magenta glow so it clearly reads as the thing to tap. */
    animation: brandPulse 4.2s ease-in-out infinite;
}

@keyframes brandPulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(196, 0, 90, 0.35), 0 0 6px 0 rgba(123, 47, 247, 0.0);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 26px rgba(196, 0, 90, 0.5), 0 0 22px 5px rgba(123, 47, 247, 0.35);
        transform: scale(1.02);
    }
}

@media (prefers-reduced-motion: reduce) {
    #start-button { animation: none; }
}

/* ====== GDPR SCREEN ====== */

#gdpr-screen { justify-content: flex-start; }

.gdpr-content {
    margin-top: var(--spacing-md);
    overflow-y: auto;
    max-height: 440px;
    text-align: left;
    padding-right: var(--spacing-sm);
}

.gdpr-content h2 {
    margin: 0 0 16px;
    font-size: clamp(12px, 3.9vw, 16px);
    text-align: left;
    white-space: nowrap;
    letter-spacing: 0;
}

.gdpr-content h4 {
    margin: 14px 0 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-accent);
    letter-spacing: 0.05em;
    font-family: var(--font-family);
}

.gdpr-content p,
.gdpr-content .gdpr-intro {
    color: var(--color-text-secondary);
    text-align: left !important;
    font-size: 12.5px;
    line-height: 1.55;
    margin: 0 0 10px;
}

.gdpr-content .gdpr-list { list-style: none; padding: 0; margin: 0; }

.gdpr-content .gdpr-list li {
    position: relative;
    padding: 6px 0 6px 22px;
    color: var(--color-text-secondary);
    font-size: 12.5px;
    line-height: 1.5;
    text-align: left;
    border-top: 1px solid var(--color-border);
}
.gdpr-content .gdpr-list li:first-child { border-top: none; }
.gdpr-content .gdpr-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
}
.gdpr-content .gdpr-list li strong { color: var(--color-text-primary); font-weight: 700; margin-right: 4px; }
.gdpr-content a { color: var(--color-accent); font-weight: 700; }

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: var(--spacing-lg);
}
.button-group .button { margin-top: 0; height: 50px; }

/* ====== CAMERA SCREEN ====== */

.step-top {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    box-sizing: border-box;
}

#camera-screen { height: 100%; justify-content: flex-start; padding: 0 var(--spacing-md) var(--spacing-lg); }
#camera-screen .step-top { height: 499px; }
#camera-screen h2 { margin-bottom: 0; font-size: 30px; }

.camera-cluster {
    position: relative;
    width: 100%;
    max-width: 330px;
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.camera-wrapper {
    position: relative;
    width: 100%;
    max-width: 330px;
    margin: 0 auto;
}

#camera-feed {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 3px solid var(--color-primary);
    box-shadow: var(--shadow-md), 0 0 0 4px rgba(196, 0, 90, 0.12);
    background: #000;
    transform: scaleX(-1);
}

#capture-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--color-red), var(--color-violet) 75%);
    border: 4px solid #FFFFFF;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(196, 0, 90, 0.35), 0 8px 22px rgba(26, 22, 20, 0.35);
}

#camera-error {
    color: #7a1228;
    background-color: rgba(196, 0, 90, 0.12);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-top: var(--spacing-md);
}

/* Group/Solo toggle — the two halves meet flush as ONE bar (no centre gap); the round
   shutter sits in a layer ON TOP of the seam. */
#group-toggle-wrap {
    width: 100%;
    margin: 0;
    display: flex;
    gap: 0;
}
#group-toggle-wrap .toggle-btn:first-child {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    border-right: none;
    padding-right: 44px;   /* keep the label clear of the overlaid shutter */
}
#group-toggle-wrap .toggle-btn:last-child {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    border-left: none;
    padding-left: 44px;
}
#group-toggle-wrap .toggle-btn {
    flex: 1;
    min-width: 0;
    appearance: none;
    border: 2px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    padding: 8px 6px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1.1;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}
#group-toggle-wrap .toggle-btn .ico { font-size: 18px; line-height: 1; }
#group-toggle-wrap .toggle-btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #FFFFFF;
    box-shadow: var(--shadow-primary);
}
#group-toggle-wrap.is-hidden { display: none; }

/* ====== CONFIRM PHOTO SCREEN ====== */

#confirm-photo-screen { height: 100%; justify-content: flex-start; padding-top: 0; }
#confirm-photo-screen .step-top { height: 512px; }
#confirm-photo-screen img {
    max-width: 100%;
    max-height: 360px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--color-primary);
}
#confirm-photo-screen h2 { margin-bottom: 0; }
#confirm-photo-screen .button-group { margin-top: 0; }

/* ====== MOOD SCREEN (CATEGORIES) ====== */

#mood-screen h2 { margin-bottom: 28px; }

.mood-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 16px;
    width: 100%;
}

.mood-button {
    height: 92px;
    width: 100%;
    margin: 0;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background: var(--color-secondary);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: var(--shadow-md);
    padding: 0;
}

.mood-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--bg-image, linear-gradient(135deg, var(--color-primary) 0%, var(--color-violet) 100%));
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.mood-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22, 10, 46, 0.10) 0%, rgba(22, 10, 46, 0.55) 100%);
    z-index: 1;
}

.mood-button .mood-label {
    position: relative;
    z-index: 2;
    padding: 0 8px 12px;
    font-family: var(--font-display);
    font-size: clamp(16px, 4.6vw, 20px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.005em;
    word-break: break-word;
    hyphens: auto;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    height: 100%;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
}

.mood-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.mood-button.selected { border-color: var(--color-primary); }
.mood-button.selected::after {
    background: linear-gradient(180deg, rgba(196, 0, 90, 0.30) 0%, rgba(123, 47, 247, 0.70) 100%);
}

/* Category background gradients (4fin "New Era" neon palette). */
.mood-button[data-mood="Energetic"]::before    { background: linear-gradient(135deg, #2BB8FF 0%, #7B2FF7 55%, #E0218A 100%); }
.mood-button[data-mood="Adventurous"]::before   { background: linear-gradient(135deg, #160A2E 0%, #7B2FF7 55%, #FF9E1B 120%); }
.mood-button[data-mood="Humorous"]::before       { background: linear-gradient(135deg, #E0218A 0%, #7B2FF7 60%, #2BB8FF 120%); }
.mood-button[data-mood="Passionate"]::before    { background: linear-gradient(135deg, #E8112D 0%, #E0218A 55%, #160A2E 120%); }
.mood-button[data-mood="Calm"]::before           { background: linear-gradient(135deg, #2BB8FF 0%, #7B2FF7 60%, #FF9E1B 130%); }
.mood-button[data-mood="Imaginative"]::before    { background: linear-gradient(135deg, #E0218A 0%, #7B2FF7 50%, #2BB8FF 120%); }
.mood-button[data-mood="FreeSpirited"]::before   { background: linear-gradient(135deg, #FF9E1B 0%, #E0218A 55%, #7B2FF7 120%); }
.mood-button[data-mood="Elegant"]::before        { background: linear-gradient(135deg, #160A2E 0%, #7B2FF7 60%, #E0218A 130%); }

/* Last card in an odd-count grid spans both columns (no-op for 8 categories). */
.mood-grid .mood-button:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ====== GENERATING SCREEN ====== */

#generating-screen { justify-content: center; padding-top: 100px; }
#generating-screen h2 { margin-bottom: var(--spacing-lg); color: var(--color-accent); }
#generating-screen p { margin-bottom: var(--spacing-xl); }

.spinner {
    width: 96px;
    height: 96px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        rgba(43, 184, 255, 0) 0%,
        rgba(43, 184, 255, 0.15) 25%,
        rgba(123, 47, 247, 0.6) 62%,
        rgba(224, 33, 138, 1) 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ====== SELECT RESULT SCREEN ====== */

#select-result-screen {
    height: 100%;
    justify-content: space-evenly;
    padding-top: var(--spacing-xs);
    padding-bottom: clamp(54px, 10vh, 100px);
}
#select-result-screen h2 { margin-bottom: 2px; }
#select-result-screen p { margin-bottom: 0; }
.result-head { flex: 0 0 auto; width: 100%; }

.result-grid { display: contents; }

.result-image-container {
    position: relative;
    flex: 0 0 auto;
    width: min(62vw, 33vh);
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    background-color: var(--color-surface-2);
    box-shadow: var(--shadow-sm);
}
.result-image-container:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.result-image-container.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(196, 0, 90, 0.22), var(--shadow-md);
}
.result-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border: none;
    border-radius: 0;
}

/* ====== FINAL SCREEN ====== */

#final-screen { height: 100%; justify-content: flex-start; padding-top: 0; }
#final-screen .step-top { height: 511px; }
#final-screen h2 { margin-bottom: 0; }
#final-screen p { margin-bottom: 0; }

#final-image-container {
    margin: 0;
    position: relative;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--color-primary);
    overflow: hidden;
}
#final-image-preview {
    display: block;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

#final-screen .button-group { margin-top: 0; }
#final-screen .button-group .button { height: 52px; }

/* ====== ERROR SCREEN ====== */

#error-screen { justify-content: center; padding-top: 120px; }
#error-screen h2 { color: var(--color-accent); }
#error-screen p { max-width: 28ch; margin: 0 auto; font-size: 15px; line-height: 1.6; }

/* ============================================================
   DESKTOP / LARGER SCREENS  (≥ 760px)
   Phone layout is the source of truth; these widen the column
   and scale elements up proportionally.
   ============================================================ */
@media (min-width: 760px) {
    .header-inner {
        max-width: none;
        height: 110px;
        padding: 0 48px;
        position: relative;
    }
    .brand-logo { top: 14px; height: 124px; width: 124px; }
    .lang-switch button { width: 54px; height: 54px; }

    .app-container {
        max-width: 720px;
        height: calc(100vh - 110px);
        height: calc(100dvh - 110px);
        max-height: none;
        overflow: hidden;
    }

    .screen { padding: 40px 28px; }

    h2 { font-size: 44px; margin-bottom: 22px; }
    p { font-size: 17px; }
    .button { height: 60px; font-size: 24px; }
    .button-group .button { height: 56px; }

    /* Welcome — frameless, headline centred between nav bar and button; Start anchored to
       the desktop "Souhlasím" line (40 padding + 16 + 58vh content + dynamic margin).
       Headline size is governed by the cqw rule (fits the 720px column ≈ 39px). */
    #welcome-screen { padding: 0 24px; justify-content: flex-start; }
    #welcome-screen .welcome-copy { height: calc(56px + 58vh + max(24px, 34vh - 248px)); }
    #welcome-screen p.welcome-sub { font-size: clamp(20px, 2.4vw, 30px); margin-top: 22px; }
    #start-button { height: 70px; font-size: 28px; max-width: 460px; }

    /* GDPR */
    .gdpr-content { max-height: 58vh; }
    #gdpr-screen .button-group { margin-top: max(24px, calc(34vh - 248px)); }
    .gdpr-content h2 { font-size: clamp(16px, 2.2vw, 22px); }
    .gdpr-content p,
    .gdpr-content .gdpr-intro,
    .gdpr-content .gdpr-list li { font-size: 14.5px; line-height: 1.6; }

    /* Camera */
    #camera-screen .step-top { height: min(820px, 73vh); }
    #camera-screen h2 { font-size: 36px; }
    .camera-wrapper { max-width: min(640px, 60vh); }
    .camera-cluster { max-width: min(640px, 60vh); min-height: 92px; }
    #capture-button { width: 92px; height: 92px; z-index: 10; }
    #group-toggle-wrap { gap: 0; }
    #group-toggle-wrap .toggle-btn { font-size: 15px; padding: 12px 8px; }
    #group-toggle-wrap .toggle-btn:first-child { padding-right: 60px; }
    #group-toggle-wrap .toggle-btn:last-child { padding-left: 60px; }
    #group-toggle-wrap .toggle-btn .ico { font-size: 22px; }

    /* Confirm photo */
    #confirm-photo-screen .step-top { height: min(820px, 73vh); }
    #confirm-photo-screen img { max-width: min(640px, 60vh); max-height: min(640px, 60vh); }

    /* Final */
    #final-screen .step-top { height: min(840px, 75vh); }
    #final-image-preview { max-width: min(640px, 60vh); max-height: min(640px, 60vh); }

    /* Mood / categories — 8 tiles, more breathing room */
    #mood-screen h2 { margin-bottom: 40px; }
    .mood-grid { column-gap: 22px; row-gap: 22px; }
    .mood-button { height: 120px; }
    .mood-button .mood-label { font-size: clamp(20px, 2.4vw, 26px); }

    /* Generating */
    .spinner { width: 120px; height: 120px; }

    /* Select result — bigger stacked photos */
    .result-image-container { width: min(40vh, 400px); }

    #error-screen p { max-width: 36ch; font-size: 18px; }
}
