/* ==========================================================================
   Sportovní areál – hlavní styly
   Mobile-first: základní styly platí pro mobil, větší obrazovky přes min-width.
   Breakpointy: 640px (tablet), 900px (desktop menu, víc sloupců), 1100px.
   ========================================================================== */

/* ---------- Design tokeny ---------- */
:root {
    --c-primary: #14603f;        /* zeleň kurtu */
    --c-primary-dark: #0d4a30;
    --c-primary-soft: #e3f1e9;
    --c-accent: #c85a26;         /* antuka */
    --c-accent-dark: #a94716;
    --c-sand: #e8c77a;
    --c-gold: #e8a33d;

    --c-bg: #f6f7f3;
    --c-surface: #ffffff;
    --c-surface-2: #eef1ec;
    --c-text: #18231d;
    --c-muted: #56635b;
    --c-border: #d7ddd5;
    --c-border-strong: #a9b4ab;

    --c-ok: #1d7a46;
    --c-ok-soft: #e1f3e8;
    --c-danger: #b42318;
    --c-danger-soft: #fdecea;
    --c-info-soft: #eaf1fb;
    --c-taken: #e7e9e5;

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 32, 24, .06), 0 4px 16px rgba(16, 32, 24, .06);
    --shadow-lg: 0 10px 40px rgba(16, 32, 24, .18);
    --gutter: 16px;
    --container: 1200px;
    --header-h: 64px;
}

/* ---------- Základ ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--c-text);
    background: var(--c-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; outline: none; }

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 1.15rem + .9vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

a { color: var(--c-primary); text-underline-offset: .15em; }
a:hover { color: var(--c-primary-dark); }

:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }

code { font-size: .92em; background: var(--c-surface-2); padding: .1em .35em; border-radius: 4px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 8px; top: -100px; z-index: 100;
    background: var(--c-primary); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; color: #fff; }

.text-muted { color: var(--c-muted); }

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.page { padding-block: 28px 56px; }
.page--narrow { max-width: calc(560px + 2 * var(--gutter)); }

.lead { font-size: 1.1rem; color: var(--c-muted); max-width: 70ch; }

.section { margin-top: 48px; }
.section--tight { margin-top: 28px; }

@media (min-width: 640px) {
    :root { --gutter: 24px; }
    .page { padding-block: 40px 72px; }
}

/* ---------- Tlačítka ---------- */
.btn {
    --btn-bg: transparent; --btn-fg: var(--c-text); --btn-bd: var(--c-border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    min-height: 44px; padding: .55em 1.15em;
    font: inherit; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none;
    color: var(--btn-fg); background: var(--btn-bg);
    border: 1.5px solid var(--btn-bd); border-radius: var(--radius-sm);
    cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { --btn-bg: var(--c-primary); --btn-fg: #fff; --btn-bd: var(--c-primary); }
.btn-primary:hover:not([disabled]) { --btn-bg: var(--c-primary-dark); --btn-bd: var(--c-primary-dark); }

.btn-accent { --btn-bg: var(--c-accent); --btn-fg: #fff; --btn-bd: var(--c-accent); }
.btn-accent:hover:not([disabled]) { --btn-bg: var(--c-accent-dark); --btn-bd: var(--c-accent-dark); }

.btn-outline { --btn-bg: var(--c-surface); }
.btn-outline:hover:not([disabled]) { --btn-bd: var(--c-primary); --btn-fg: var(--c-primary); }

.btn-danger { --btn-bg: var(--c-danger); --btn-fg: #fff; --btn-bd: var(--c-danger); }
.btn-danger:hover { --btn-bg: #8f1b12; }

.btn-ghost { --btn-bd: transparent; --btn-fg: var(--c-muted); text-decoration: underline; }

.btn-lg { min-height: 52px; font-size: 1.05rem; padding-inline: 1.6em; }
.btn-sm { min-height: 38px; padding: .35em .9em; font-size: .92rem; }
.btn-block { width: 100%; }

/* ---------- Hlavička a navigace ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--c-border);
}
.site-header__inner { display: flex; align-items: center; min-height: var(--header-h); gap: 16px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-text); margin-right: auto; }
.logo:hover { color: var(--c-text); }
.logo__mark { width: 40px; height: 40px; flex: none; }
.logo__text { font-weight: 800; font-size: .82rem; line-height: 1.15; letter-spacing: .06em; text-transform: uppercase; }

.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-sm);
    background: var(--c-surface); cursor: pointer;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    display: block; width: 22px; height: 2px; background: var(--c-text); border-radius: 2px;
    position: relative; transition: transform .2s, background .2s;
}
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobil: menu jako rozbalovací panel pod hlavičkou */
.site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--c-surface); border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
    padding: 8px var(--gutter) 20px;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.site-nav.is-open { display: block; }
/* Bez JavaScriptu zůstane menu dostupné */
.no-js .site-nav { display: block; position: static; box-shadow: none; }

.site-nav__list { list-style: none; margin: 0; padding: 0; }
.site-nav__list a {
    display: block; padding: 14px 4px; font-weight: 600; font-size: 1.05rem;
    color: var(--c-text); text-decoration: none; border-bottom: 1px solid var(--c-border);
}
.site-nav__list a[aria-current="page"] { color: var(--c-primary); box-shadow: inset 4px 0 0 var(--c-primary); padding-left: 14px; }

.site-nav__auth { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 16px; }
.site-nav__auth form { display: contents; }
.site-nav__auth .btn { flex: 1 1 140px; }
.site-nav__user { width: 100%; color: var(--c-muted); font-size: .95rem; }
.site-nav__user::before { content: "● "; color: var(--c-ok); }

@media (min-width: 900px) {
    :root { --header-h: 76px; }
    .nav-toggle { display: none; }
    .site-nav, .no-js .site-nav {
        display: flex; align-items: center; flex: 1; gap: 24px;
        position: static; padding: 0; background: none; border: 0; box-shadow: none; max-height: none; overflow: visible;
    }
    .site-nav nav { flex: 1; display: flex; justify-content: center; }
    .site-nav__list { display: flex; gap: clamp(12px, 2.4vw, 40px); }
    .site-nav__list a { border: 0; padding: 8px 2px; font-size: 1rem; font-weight: 550; position: relative; }
    .site-nav__list a::after {
        content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
        background: var(--c-primary); transform: scaleX(0); transition: transform .2s;
    }
    .site-nav__list a:hover::after, .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
    .site-nav__list a[aria-current="page"] { box-shadow: none; padding-left: 2px; font-weight: 750; }
    .site-nav__auth { padding: 0; flex-wrap: nowrap; }
    .site-nav__auth .btn { flex: none; }
    .site-nav__user { width: auto; white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(232, 199, 122, .35), transparent 60%),
        linear-gradient(180deg, var(--c-primary-soft), var(--c-bg));
    border-bottom: 1px solid var(--c-border);
}
.hero__grid { display: grid; gap: 24px; padding-block: 28px 32px; align-items: center; }
.hero__title { font-size: clamp(2.2rem, 1.5rem + 3.5vw, 3.6rem); margin-bottom: .35em; }
.hero__lead { font-size: 1.15rem; color: var(--c-muted); max-width: 30ch; margin-bottom: 1.4em; }
.hero__text .btn { width: 100%; }
.hero__img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; object-fit: cover; }

@media (min-width: 640px) {
    .hero__text .btn { width: auto; }
}
@media (min-width: 900px) {
    .hero__grid { grid-template-columns: 1fr 1fr; gap: 56px; padding-block: 56px 64px; }
}

/* ---------- Dlaždice sportů ---------- */
.sport-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.sport-tile {
    display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
    padding: 12px; box-shadow: var(--shadow); position: relative; transition: transform .15s, box-shadow .15s;
}
.sport-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.sport-tile__img { width: 112px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); }
.sport-tile__title { margin-bottom: .35em; font-size: 1.25rem; }
.sport-tile__link {
    border: 0; padding: 0; min-height: 0; background: none; color: var(--c-primary); font-weight: 600;
}
.sport-tile__link::after { content: ""; position: absolute; inset: 0; } /* celá dlaždice je klikací */

@media (min-width: 640px) {
    .sport-tiles { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .sport-tile { grid-template-columns: 1fr; padding: 14px; align-items: start; }
    .sport-tile__img { width: 100%; height: auto; aspect-ratio: 16 / 10; }
    .sport-tile__link {
        width: 100%; min-height: 44px; border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-sm);
        padding: .55em 1em; color: var(--c-text);
    }
    .sport-tile:hover .sport-tile__link { border-color: var(--c-primary); color: var(--c-primary); }
}

/* ---------- Výhody ---------- */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feature { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; }
.feature__icon {
    flex: none; width: 28px; height: 28px; display: grid; place-items: center;
    background: var(--c-primary); color: #fff; border-radius: 6px; font-weight: 800; font-size: .9rem;
}
@media (min-width: 640px) {
    .features { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .feature {
        background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
        padding: 20px; align-items: flex-start;
    }
}

.info-grid { display: grid; gap: 32px; }
.info-grid__big { font-size: 1.3rem; font-weight: 650; margin-bottom: .3em; }
@media (min-width: 640px) { .info-grid { grid-template-columns: 1fr 1fr; gap: 48px; } }

.availability-list { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 8px; }
.availability-list li {
    display: flex; justify-content: space-between; gap: 12px; align-items: center;
    padding: 10px 14px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
}
.availability-list a { font-weight: 650; }

/* ---------- Karty a odznaky ---------- */
.card {
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
}
.card > h2 { font-size: 1.25rem; }
.card-grid-2 { display: grid; gap: 20px; }
@media (min-width: 640px) { .card-grid-2 { grid-template-columns: 1fr 1fr; } }

.badge {
    display: inline-block; padding: .2em .65em; border-radius: 999px;
    font-size: .82rem; font-weight: 650; margin-bottom: .6em;
}
.badge-ok { background: var(--c-ok-soft); color: var(--c-ok); }
.badge-muted { background: var(--c-taken); color: var(--c-muted); }

.check-list { margin: 0; padding-left: 1.2em; }
.check-list li { margin-bottom: .4em; }

/* ---------- Filtr ---------- */
.filter-panel {
    display: grid; gap: 14px; margin-top: 8px;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow);
}
@media (min-width: 640px) {
    .filter-panel { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
    .filter-panel { grid-template-columns: 1.2fr 1fr 1fr auto; align-items: end; padding: 22px 24px; }
}

/* ---------- Formulářová pole ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.form .field { margin-bottom: 16px; }
.field label { font-weight: 650; font-size: .95rem; }
.field small { display: block; font-weight: 400; color: var(--c-muted); }
.field__hint { margin: 0; font-size: .87rem; color: var(--c-muted); }
.field__error { margin: 0; font-size: .87rem; color: var(--c-danger); font-weight: 600; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"],
select, textarea {
    width: 100%; min-height: 46px; padding: .55em .8em;
    font: inherit; color: var(--c-text); background: var(--c-surface);
    border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(20, 96, 63, .18); outline: none; }
[aria-invalid="true"] { border-color: var(--c-danger) !important; }

.field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--c-primary); flex: none; }
.field--check label { font-weight: 550; }
.field--check .field__error { flex-basis: 100%; }
.field--check { flex-wrap: wrap; }
.filter-panel .field--check { align-self: center; }
@media (min-width: 900px) { .filter-panel .field--check { align-self: end; padding-bottom: 6px; } }

.form-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form__alt { margin: 16px 0 0; text-align: center; }
.form__status { margin: 12px 0 0; font-weight: 600; }
.form__status.is-ok { color: var(--c-ok); }
.form__status.is-error { color: var(--c-danger); }

/* ---------- Upozornění ---------- */
.alert { border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 20px; border: 1px solid transparent; }
.alert-error { background: var(--c-danger-soft); border-color: #f5c2bd; color: #7a1a12; }
.alert-info { background: var(--c-info-soft); border-color: #c8d9f1; margin-top: 24px; }
.alert-ok { background: var(--c-ok-soft); border-color: #b9e1c9; color: #135c33; }
.alert__title { font-size: 1rem; margin-bottom: .4em; }
.alert p:last-child { margin-bottom: 0; }

/* ---------- Karty kurtů ---------- */
.results-count { font-size: 1.15rem; margin-bottom: 16px; }
.court-grid { display: grid; gap: 20px; transition: opacity .2s; }
.court-grid[aria-busy="true"], [aria-busy="true"] { opacity: .5; pointer-events: none; }
@media (min-width: 640px) { .court-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .court-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.court-card {
    display: flex; flex-direction: column;
    background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.court-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.court-card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--c-surface-2); }
.court-card__body { display: flex; flex-direction: column; padding: 16px 18px 18px; flex: 1; }
.court-card__title { font-size: 1.3rem; margin-bottom: .35em; }
.court-card__title a { color: inherit; text-decoration: none; }
.court-card__title a:hover { color: var(--c-primary); }
.court-card__meta { margin: 0 0 .2em; color: var(--c-muted); }
.court-card .badge { align-self: flex-start; margin-top: .6em; }
.court-card__price { font-size: 1.25rem; font-weight: 800; margin: auto 0 14px; padding-top: 8px; }

.empty-state {
    grid-column: 1 / -1; text-align: center; padding: 32px 16px; color: var(--c-muted);
    background: var(--c-surface); border: 1.5px dashed var(--c-border-strong); border-radius: var(--radius);
}
.empty-state .btn { margin-top: 4px; }

/* ---------- Detail kurtu ---------- */
.back-link { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 550; }
.back-link:hover { text-decoration: underline; }

/* Pořadí na mobilu odpovídá wireframu: galerie, o kurtu, termín, počasí, souhrn */
.detail-layout {
    display: grid; gap: 28px; margin-top: 20px;
    grid-template-areas: "gallery" "about" "calendar" "weather" "summary";
}
.detail-gallery { grid-area: gallery; min-width: 0; }
.detail-about { grid-area: about; }
.detail-weather { grid-area: weather; }
.detail-calendar { grid-area: calendar; min-width: 0; }
.detail-summary { grid-area: summary; }

@media (min-width: 900px) {
    .detail-layout {
        grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 32px 48px;
        grid-template-areas: "gallery about" "gallery weather" "calendar summary";
        grid-template-rows: auto 1fr auto;
    }
    .detail-layout--indoor { grid-template-areas: "gallery about" "gallery about" "calendar summary"; }
    .detail-weather { align-self: end; }
    .detail-summary { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
}

.gallery { margin: 0; }
.gallery__main { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--c-border); background: var(--c-surface-2); }
.gallery__thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery__thumb {
    display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm);
    overflow: hidden; cursor: pointer; background: none;
}
.gallery__thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery__thumb[aria-pressed="true"] { border-color: var(--c-accent); }
.gallery__thumb:hover { border-color: var(--c-border-strong); }

.facts { margin: 0; display: grid; gap: 6px; }
.facts div { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px; }
.facts dt { font-weight: 650; }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; }

.weather {
    background: linear-gradient(160deg, #eef6ff, #f7fbff); border: 1px solid #cfe0f3; border-radius: var(--radius);
    padding: 18px 20px;
}
.weather__title { font-size: 1.2rem; margin-bottom: .5em; }
.weather__main { display: flex; align-items: center; gap: 14px; margin-bottom: .4em; }
.weather__icon { font-size: 2.2rem; line-height: 1; }
.weather__temp { font-size: 1.35rem; font-weight: 700; margin: 0; }
.weather__desc { margin: 0; color: var(--c-muted); }
.weather__details { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 .5em; font-size: .93rem; }
.weather__note { margin: 0; font-size: .85rem; color: var(--c-muted); }

.calendar-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; margin-bottom: 14px; }
.calendar-head .field { flex: 1 1 200px; max-width: 280px; }
.calendar-head__month { font-weight: 750; font-size: 1.2rem; margin: 0 0 10px; text-transform: capitalize; }

.day-strip-wrap { display: grid; grid-template-columns: 32px 1fr 32px; gap: 6px; align-items: stretch; }
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day-strip__nav {
    border: 1.5px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface);
    font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--c-text); padding: 0;
}
.day-strip__nav:disabled { opacity: .35; cursor: not-allowed; }
.day {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 62px; padding: 6px 2px;
    background: var(--c-surface); border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-sm);
    font: inherit; color: var(--c-text); cursor: pointer;
}
.day__name { font-size: .78rem; color: var(--c-muted); }
.day__num { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.day:hover { border-color: var(--c-primary); }
.day[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.day[aria-pressed="true"] .day__name { color: rgba(255, 255, 255, .85); }
.day:disabled { opacity: .4; cursor: not-allowed; }

.slots-title { margin: 22px 0 12px; font-size: 1.1rem; }
.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; min-height: 120px; }
@media (min-width: 640px) { .slots { grid-template-columns: repeat(3, 1fr); gap: 12px; } }

.slot {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 64px; padding: 8px;
    background: var(--c-surface); border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-sm);
    font: inherit; color: var(--c-text); cursor: pointer; transition: border-color .15s, background .15s;
}
.slot__time { font-weight: 750; }
.slot__state { font-size: .84rem; color: var(--c-muted); }
.slot:hover:not(:disabled) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.slot[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.slot[aria-pressed="true"] .slot__state { color: rgba(255, 255, 255, .9); }
.slot:disabled { background: var(--c-taken); border-color: var(--c-border); cursor: not-allowed; }
.slot:disabled .slot__time { color: var(--c-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.slots .empty-state { padding: 20px; }

.slot-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .88rem; color: var(--c-muted); }
.slot-legend li { display: flex; align-items: center; gap: 6px; }
.slot-legend__dot { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--c-border-strong); background: var(--c-surface); }
.slot-legend__dot--selected { background: var(--c-primary); border-color: var(--c-primary); }
.slot-legend__dot--taken { background: var(--c-taken); border-color: var(--c-border); }

.summary__heading { margin-bottom: .5em; }
.summary { padding: 22px; border-width: 1.5px; border-color: var(--c-border-strong); }
.summary__court { font-weight: 750; font-size: 1.15rem; margin-bottom: .5em; }
.summary__list { margin: 0; display: grid; gap: 6px; }
.summary__list div { display: flex; gap: 6px; }
.summary__list dd { margin: 0; }
.summary__total {
    display: flex; justify-content: space-between; align-items: baseline;
    border-top: 1px solid var(--c-border); margin: 16px 0; padding-top: 14px; font-weight: 700; font-size: 1.1rem;
}
.summary__total strong { font-size: 1.7rem; font-weight: 800; }
.summary__note { margin: 12px 0 0; font-size: .9rem; color: var(--c-muted); }
.summary .alert { margin: 0 0 12px; }

/* ---------- Tabulky (na mobilu jako karty) ---------- */
.table-wrap { width: 100%; }
.table { width: 100%; border-collapse: collapse; background: var(--c-surface); }
.table th, .table td { text-align: left; padding: 12px 14px; vertical-align: middle; }
.table thead th { background: var(--c-surface-2); font-size: .9rem; font-weight: 700; }
.table tbody th { font-weight: 700; }
.table__actions { white-space: nowrap; }
.table__actions .btn + .btn { margin-left: 8px; }

/* Mobil: každý řádek je karta, popisky sloupců z data-label */
@media (max-width: 759.98px) {
    .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .table--stack, .table--stack tbody { display: block; background: none; }
    .table--stack tr {
        display: block; margin-bottom: 14px; padding: 14px 16px;
        background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--radius); box-shadow: var(--shadow);
    }
    .table--stack th, .table--stack td { display: flex; gap: 10px; padding: 4px 0; }
    .table--stack td::before, .table--stack tbody th::before {
        content: attr(data-label) ":"; flex: 0 0 7.5em; font-weight: 600; color: var(--c-muted); font-size: .92rem;
    }
    .table--stack tbody th { font-size: 1.15rem; display: block; margin-bottom: 4px; }
    .table--stack tbody th::before { display: none; }
    .table--stack td.table__actions { display: flex; gap: 10px; padding-top: 12px; white-space: normal; }
    .table--stack td.table__actions::before { display: none; }
    .table--stack td.table__actions .btn { flex: 1; margin: 0; }
    .table--stack td.table__actions > span[aria-label] { display: none; }
}
@media (min-width: 760px) {
    .table-wrap { border: 1px solid var(--c-border-strong); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
    .table th, .table td { border-bottom: 1px solid var(--c-border); }
    .table tbody tr:nth-child(even) { background: #fafbf9; }
    .table tbody tr:last-child > * { border-bottom: 0; }
    .table tbody tr:hover { background: var(--c-primary-soft); }
}

.status { display: inline-block; padding: .15em .6em; border-radius: 999px; font-size: .86rem; font-weight: 650; background: var(--c-surface-2); }
.status--potvrzena { background: var(--c-ok-soft); color: var(--c-ok); }
.status--zrusena { background: var(--c-danger-soft); color: var(--c-danger); }
.status--probehla { background: var(--c-surface-2); color: var(--c-muted); }
.status--aktivni { background: var(--c-ok-soft); color: var(--c-ok); }
.status--neaktivni { background: var(--c-taken); color: var(--c-muted); }

/* ---------- Administrace ---------- */
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .95rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--c-muted); }
.breadcrumb [aria-current] { color: var(--c-muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 20px; }
.tabs .btn { flex: 1 1 160px; }
@media (min-width: 640px) { .tabs .btn { flex: none; min-width: 200px; } }

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

/* ---------- Ceník, kontakt ---------- */
.hours { border-collapse: collapse; margin-bottom: .8em; }
.hours th, .hours td { padding: 4px 16px 4px 0; text-align: left; }
.hours th { font-weight: 550; }

.contact-layout { display: grid; gap: 20px; margin-top: 20px; }
.contact-info { display: grid; gap: 20px; align-content: start; }
.contact-info address { font-style: normal; line-height: 1.8; }
.map {
    width: 100%; height: 340px; border-radius: var(--radius); border: 1px solid var(--c-border-strong);
    background: var(--c-surface-2); overflow: hidden; display: grid; place-items: center; z-index: 0;
}
.map__fallback { padding: 20px; text-align: center; color: var(--c-muted); }
@media (min-width: 900px) {
    .contact-layout { grid-template-columns: 1fr 1.4fr; gap: 32px; }
    .map { height: 100%; min-height: 420px; }
}
.contact-form-wrap { max-width: 760px; }

/* ---------- Dialog ---------- */
.dialog {
    width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
    padding: 0; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); color: var(--c-text);
}
.dialog::backdrop { background: rgba(14, 26, 20, .55); }
.dialog__body { padding: 24px; }
.dialog__title { font-size: 1.4rem; }
.dialog__content { margin-bottom: 20px; }
.dialog__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.dialog__actions .btn { flex: 1 1 140px; }
@media (min-width: 640px) { .dialog__actions .btn { flex: none; min-width: 130px; } }

/* ---------- Oznámení (toast) ---------- */
.toast-region {
    position: fixed; z-index: 200; left: 50%; bottom: 16px; transform: translateX(-50%);
    display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
    padding: 12px 16px; border-radius: var(--radius-sm); color: #fff; background: var(--c-text);
    box-shadow: var(--shadow-lg); font-weight: 550; pointer-events: auto;
    animation: toast-in .25s ease-out;
}
.toast--ok { background: var(--c-ok); }
.toast--error { background: var(--c-danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Načítání ---------- */
.spinner {
    display: inline-block; width: 22px; height: 22px; border: 3px solid var(--c-border);
    border-top-color: var(--c-primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle;
}
.loading { display: flex; align-items: center; gap: 10px; color: var(--c-muted); padding: 16px 0; grid-column: 1 / -1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Patička ---------- */
.site-footer { background: #10291d; color: #d5e2da; margin-top: auto; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; gap: 24px; padding-block: 36px 24px; }
.site-footer__title { font-size: 1.1rem; color: #fff; margin-bottom: .6em; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-footer p { margin-bottom: .3em; }
.site-footer .text-muted { color: #9fb5a8; }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.site-footer__links a { text-decoration: none; display: inline-block; padding: 4px 0; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding-block: 16px 24px; font-size: .88rem; color: #9fb5a8; }
.site-footer__bottom p { margin: 0; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 48px; } }

/* ---------- Omezení animací ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Tisk ---------- */
@media print {
    .site-header, .site-footer, .btn, .filter-panel, .toast-region { display: none !important; }
    body { background: #fff; }
}
