/* Dukla Vyščo — design C from the Claude Design canvas "Dukla Vyščo – nový web".
   Dark is the default; [data-theme="light"] on <html> swaps the colour tokens below.
   Every colour is a token: rules use var(--…) only. */

/* ---- Fonts (SIL OFL, self-hosted, made by bin/build-fonts) ---- */
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url("fonts/barlow-condensed-800.woff2") format("woff2"); }
@font-face { font-family: 'Source Sans 3'; font-weight: 400 700; font-display: swap; src: url("fonts/source-sans-3.woff2") format("woff2"); }

/* ---- Tokens: dark (default) ---- */
:root {
	color-scheme: dark;
	--page: #0F110D;
	--card: #1C1F17;
	--line: #2E3228;
	--header-bg: #0F110D;
	--header-line: #2A2E25;
	--menu-bg: #15170F;
	--input-bg: #12140F;
	--input-line: #3A3E32;
	--text: #ECE9E2;
	--heading: #FFFFFF;
	--muted: #B3AEA4;
	--hint: #8F8A80;
	--brand-name: #FFFFFF;
	--accent: #F2C230;
	--accent-hover: #FFD95A;
	--primary-bg: #F2C230;
	--primary-fg: #1B1B1B;
	--secondary-line: #3A3E32;
	--pill-bg: #1C1F17;
	--pill-line: #2E3228;
	--avatar-bg: #F2C230;
	--avatar-fg: #1B1B1B;
	--chip-bg: #0F110D;
	--chip-line: #3A3E32;
	--danger: #FFB3AD;
	--danger-line: #8C3A35;
	--ok: #9BE0AE;
	--dropzone-bg: #15170F;
	--dropzone-line: #4A4E40;
	--photo-frame: #ECE9E2;
	--footer-bg: #0A0B09;
	--footer-line: #2A2E25;
	--footer-text: #C9C5BC;
	--footer-button: #ECE9E2;
	--footer-button-line: #3A3E32;
	--maroon: #7A1F24;
	--on-maroon: #FFFFFF;
	--on-maroon-label: #F2C230;
	--on-maroon-note: #F6E6E7;
	--on-maroon-highlight: #FFE08A;
	--badge-change-bg: #F2C230;
	--badge-change-fg: #1B1B1B;
	--badge-off-bg: #B3261E;
	--badge-off-fg: #FFFFFF;
	--grass: #0B0C0A;
	--on-grass: #FFFFFF;
	--on-grass-muted: #E8E5DD;
	--on-grass-label: #F2C230;
	--shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
	--shadow-strong: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* ---- Tokens: light ---- */
:root[data-theme="light"] {
	color-scheme: light;
	--page: #F3F1EC;
	--card: #FFFFFF;
	--line: #E6E1D8;
	--header-bg: #FFFFFF;
	--header-line: #E2DDD3;
	--menu-bg: #FFFFFF;
	--input-bg: #FFFFFF;
	--input-line: #D6D0C4;
	--text: #1B1B1B;
	--heading: #1B1B1B;
	--muted: #5B5650;
	--hint: #6E6960;
	--brand-name: #7A1F24;
	--accent: #7A1F24;
	--accent-hover: #5E171B;
	--primary-bg: #7A1F24;
	--primary-fg: #FFFFFF;
	--secondary-line: #D6D0C4;
	--pill-bg: #F3F1EC;
	--pill-line: #E2DDD3;
	--avatar-bg: #7A1F24;
	--avatar-fg: #FFFFFF;
	--chip-bg: #FFFFFF;
	--chip-line: #D6D0C4;
	--danger: #A1271F;
	--danger-line: #A1271F;
	--ok: #1E7A3C;
	--dropzone-bg: #FAF8F3;
	--dropzone-line: #C9C2B4;
	--photo-frame: #FFFFFF;
	--footer-bg: #1B1B1B;
	--footer-line: #1B1B1B;
	--shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }   /* anchor jumps clear the sticky header */
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--page);
	color: var(--text);
	font: 400 18px/1.55 'Source Sans 3', system-ui, sans-serif;
}
main { flex: 1 0 auto; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; }
p { margin: 0; }
:where(a) { color: var(--accent); text-underline-offset: 0.15em; }
:where(a):hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--heading); font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 800; line-height: 1.05; }
h1 { font-size: 60px; line-height: 1; text-transform: uppercase; }
h2 { font-size: 34px; }
h3 { font-size: 26px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Page frame and small components ---- */
.page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.page--narrow { max-width: 900px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.back { align-self: flex-start; font-size: 17px; font-weight: 600; }
.page.flashes { padding-bottom: 0; gap: 10px; }
/* Flash cards: opaque, so they read on the page and on the grass band alike; a left accent per type. */
.flash { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-left: 6px solid var(--ok); border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; }
.flash::before { content: "✓"; flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; background: var(--ok); color: var(--card); font-size: 16px; line-height: 26px; text-align: center; }
.flash.error { border-left-color: var(--danger); color: var(--danger); }
.flash.error::before { content: "!"; background: var(--danger); }
.hero__flashes { max-width: 1200px; margin: 0 auto; padding: 24px 24px 0; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 24px 28px; }
.eyebrow { margin: 0; font: 700 22px/1.2 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.meta { color: var(--muted); font-size: 16px; font-weight: 600; }
.meta strong { color: var(--heading); }
.hint { color: var(--hint); font-size: 15px; }

/* ---- Buttons: primary by default; .secondary / .danger are the classes the presenters set ---- */
:where(.button, input[type=submit], button[type=submit]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 18px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: var(--primary-bg);
	color: var(--primary-fg);
	font: 700 18px/1.2 'Source Sans 3', system-ui, sans-serif;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
:where(.button, input[type=submit], button[type=submit]):hover { color: var(--primary-fg); filter: brightness(1.08); }
.secondary { background: transparent; color: var(--text); border-color: var(--secondary-line); font-weight: 600; }
.secondary:hover { color: var(--accent); border-color: var(--accent); filter: none; }
.danger { background: transparent; color: var(--danger); border-color: var(--danger-line); }
.danger:hover { color: var(--danger); border-color: var(--danger); filter: none; }
:disabled { opacity: 0.6; cursor: default; }

/* ---- Forms: App\Presentation\Forms renders div.field > label + control ---- */
.field { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0 0 18px; }
.field:last-of-type { margin-bottom: 0; }
label { font-weight: 600; }
:where(input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], textarea, select) {
	width: 100%;
	max-width: 36rem;
	padding: 12px 14px;
	background: var(--input-bg);
	color: var(--text);
	border: 1px solid var(--input-line);
	border-radius: 8px;
	font: 400 18px/1.4 'Source Sans 3', system-ui, sans-serif;
}
textarea { min-height: 8rem; resize: vertical; }
:where(input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-errors { list-style: none; margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--danger-line); border-left-width: 4px; border-radius: 8px; background: var(--card); color: var(--danger); font-weight: 600; }
.field-error { color: var(--danger); font-size: 16px; font-weight: 600; }

@media (max-width: 760px) {
	h1 { font-size: 42px; }
	h2 { font-size: 30px; }
	.page { padding: 18px 14px 32px; gap: 14px; }
	.card { padding: 18px; }
	.eyebrow { font-size: 20px; }
}

/* ---- Layout: header (boards Hlavicka, HlavickaTelefon) ---- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); border-bottom: 1px solid var(--header-line); }
.site-header__inner { max-width: 1200px; height: 72px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { display: block; width: 44px; height: 52px; }
.brand span { font: 800 28px/1 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: 0.5px; text-transform: uppercase; color: var(--brand-name); }
.main-nav { align-self: stretch; flex-grow: 1; display: flex; gap: 30px; font: 700 21px/1 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: 0.6px; text-transform: uppercase; }
.main-nav a { display: flex; align-items: center; padding-top: 3px; border-bottom: 3px solid transparent; color: var(--text); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--accent); }
.main-nav a[aria-current] { border-bottom-color: var(--accent); }
.sign-in-link { margin-left: auto; padding: 8px 18px; border-radius: 999px; font-size: 17px; }
.user-menu { position: relative; }
.user-menu summary, .phone-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker, .phone-menu summary::-webkit-details-marker { display: none; }
.user-menu summary { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; background: var(--pill-bg); border: 1px solid var(--pill-line); border-radius: 999px; color: var(--text); font-size: 17px; font-weight: 600; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--avatar-bg); color: var(--avatar-fg); font-size: 14px; font-weight: 700; }
.user-menu__panel { position: absolute; top: calc(100% + 8px); right: 0; min-width: 12rem; padding: 8px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.user-menu__panel a { padding: 10px 12px; border-radius: 6px; color: var(--text); font-weight: 600; text-decoration: none; }
.user-menu__panel a:hover { background: var(--page); color: var(--accent); }
.phone-menu { display: none; }

/* ---- Layout: footer with the theme switch (board Paticka) ---- */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--footer-line); color: var(--footer-text); font-size: 16px; }
.site-footer__inner { max-width: 1200px; margin: 0 auto; padding: 28px 24px 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.site-footer img { display: block; width: 34px; height: 40px; }
.site-footer__text { flex-grow: 1; }
.theme-toggle { display: inline-flex; align-items: center; padding: 7px 14px; background: transparent; border: 1px solid var(--footer-button-line); border-radius: 999px; color: var(--footer-button); font: 600 15px/1.2 'Source Sans 3', system-ui, sans-serif; cursor: pointer; }
.theme-toggle span { display: inline-flex; align-items: center; gap: 8px; }
:root[data-theme="light"] .theme-toggle__to-light, :root:not([data-theme="light"]) .theme-toggle__to-dark { display: none; }

@media (max-width: 760px) {
	.site-header__inner { height: 66px; padding: 0 14px; gap: 12px; justify-content: space-between; }
	.brand { gap: 10px; }
	.brand img { width: 40px; height: 48px; }
	.brand span { font-size: 25px; }
	.main-nav, .user-menu { display: none; }
	.phone-menu { display: block; }
	.phone-menu summary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-fg); font: 700 18px/1.2 'Source Sans 3', system-ui, sans-serif; }
	.phone-menu[open] .phone-menu__open, .phone-menu:not([open]) .phone-menu__close { display: none; }
	.phone-menu nav { position: absolute; top: 100%; left: 0; right: 0; padding: 8px 14px 16px; display: flex; flex-direction: column; background: var(--menu-bg); border-bottom: 3px solid var(--accent); box-shadow: var(--shadow); }
	.phone-menu__big a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--heading); font: 700 24px/1.1 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; text-decoration: none; }
	.phone-menu__big a[aria-current] { color: var(--accent); }
	.phone-menu__small { padding-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 17px; font-weight: 600; }
	.phone-menu__small a { color: var(--text); }
	.site-footer { font-size: 15px; }
	.site-footer__inner { padding: 22px 14px 30px; gap: 12px; }
}

/* ---- Grass band and team photo (shared) ---- */
.grass { background: var(--grass) url("img/travnik.jpg") center 40% / cover no-repeat; color: var(--on-grass); }
.grass--fill { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 64px 24px; }
.team-photo { display: block; width: 100%; height: auto; border: 6px solid var(--photo-frame); border-radius: 10px; }   /* own ratio, never cropped */

/* ---- Homepage (boards C-tmavy-pocitac, C-tmavy-telefon, C-pocitac) ---- */
.hero__flashes + .hero__inner { padding-top: 32px; }
.hero__inner { max-width: 1200px; margin: 0 auto; padding: 56px 24px 110px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero__text { flex: 1 1 420px; min-width: 0; }
.hero__eyebrow { margin: 0 0 6px; font: 700 22px/1.2 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--on-grass-label); }
.hero h1 { font-size: 104px; line-height: 0.95; letter-spacing: 1px; color: var(--on-grass); }
.hero__tagline { margin-top: 18px; max-width: 460px; font-size: 22px; color: var(--on-grass-muted); }
.hero .team-photo { flex: 1 1 520px; min-width: 0; max-width: 620px; box-shadow: var(--shadow-strong); }
.home { position: relative; width: 100%; max-width: 1200px; margin: -70px auto 0; padding: 0 24px 64px; display: flex; flex-direction: column; gap: 28px; }
.next-game { padding: 28px 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; background: var(--maroon); color: var(--on-maroon); border-radius: 12px; box-shadow: var(--shadow); }
.next-game h2 { margin: 0 0 4px; font: 700 22px/1.2 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--on-maroon-label); }
.next-game__when { font: 800 58px/1 'Barlow Condensed', 'Arial Narrow', sans-serif; }
.next-game__details { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 21px; font-weight: 600; }
.next-game:not(.next-game--admin):not(.next-game--compact) > .next-game__details { flex: 0 1 auto; margin-left: auto; text-align: right; }   /* without the button: date left, details right, no empty third column */
.next-game__note { font-size: 17px; font-weight: 400; color: var(--on-maroon-note); }
.about { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.about p { max-width: 70ch; }
.about a { font-weight: 700; }

/* ---- Historie klubu (board Historie) ---- */
.history { max-width: 820px; padding-top: 48px; }
.history__head { display: flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.history__head img { display: block; width: 81px; height: 110px; }
.history h1 { font-size: 64px; }
.prose p { margin: 0 0 18px; }
.prose .lead { font-size: 22px; color: var(--heading); }
.prose strong { color: var(--accent); }
.history .team-photo { margin-top: 14px; }

@media (max-width: 760px) {
	.hero__inner { padding: 26px 16px 86px; gap: 18px; }
	.hero__flashes { padding: 14px 14px 0; }
	.hero__flashes + .hero__inner { padding-top: 20px; }
	.hero__eyebrow { font-size: 17px; letter-spacing: 1.5px; }
	.hero h1 { font-size: 60px; }
	.hero__tagline { display: none; }
	.team-photo { border-width: 4px; }
	.home { margin-top: -62px; padding: 0 14px 28px; gap: 18px; }
	.next-game { padding: 20px; flex-direction: column; align-items: stretch; gap: 10px; }
	.next-game h2 { font-size: 20px; }
	.next-game__when { font-size: 44px; }
	.next-game__details { flex: none; font-size: 20px; }
	.next-game:not(.next-game--admin):not(.next-game--compact) > .next-game__details { margin-left: 0; text-align: left; }
	.history { padding-top: 24px; }
	.history__head img { width: 53px; height: 72px; }
	.history h1 { font-size: 42px; }
	.prose .lead { font-size: 19px; }
}

/* ---- Sign-in (board Prihlaseni) and album forms ---- */
.sign-in { width: 100%; max-width: 440px; padding: 36px 34px; display: flex; flex-direction: column; gap: 14px; border-radius: 14px; box-shadow: var(--shadow-strong); }
.sign-in__crest { align-self: center; display: block; width: 70px; height: 96px; }
.sign-in h1 { margin: 4px 0 2px; text-align: center; font-size: 40px; }
.sign-in__intro { margin-bottom: 6px; text-align: center; color: var(--muted); }
.sign-in .field { align-items: stretch; margin: 0; }
.sign-in input[type=email], .sign-in input[type=password] { max-width: none; padding: 13px 14px; font-size: 19px; }
.sign-in input[type=submit] { margin-top: 8px; padding: 14px; font-size: 19px; }
.sign-in .hint { text-align: center; }
.album-form textarea { min-height: 12rem; }
.danger-zone { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.danger-zone h2 { font-size: 28px; text-transform: uppercase; }

@media (max-width: 760px) {
	.grass--fill { padding: 32px 14px; }
	.sign-in { padding: 26px 20px; }
}

/* ---- Error pages (board Chyba-404) ---- */
.error-page { text-align: center; }
.error-page__inner { max-width: 640px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.error-page .error-page__code { font: 800 160px/0.9 'Barlow Condensed', 'Arial Narrow', sans-serif; color: var(--on-grass-label); }
.error-page h1 { font-size: 52px; line-height: 1.05; color: var(--on-grass); }
.error-page p { font-size: 21px; color: var(--on-grass-muted); }
.error-page .button { margin-top: 14px; padding: 13px 24px; }
.error-page .error-page__small { margin-top: 10px; font-size: 15px; color: var(--on-grass-muted); }

@media (max-width: 760px) {
	.error-page .error-page__code { font-size: 110px; }
	.error-page h1 { font-size: 38px; }
}

/* ---- Gallery (boards Fotogalerie, Fotogalerie-telefon, Fotogalerie-svetly) ---- */
.year-bar { display: flex; flex-wrap: wrap; gap: 8px; font-size: 16px; font-weight: 600; }
.chip { padding: 3px 11px; background: var(--chip-bg); border: 1px solid var(--chip-line); border-radius: 999px; color: var(--text); text-decoration: none; }
.chip:hover, .chip--current { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); }
.year { display: flex; flex-direction: column; gap: 18px; }
.year h2 { margin-top: 12px; color: var(--accent); }
.albums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.album-card { height: 100%; display: flex; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; }
.album-card:hover { color: var(--text); }
.album-card:hover h3 { color: var(--accent); }
.album-card__cover { position: relative; flex: 0 0 220px; min-height: 180px; background: var(--input-bg); }
.album-card__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-card__body { min-width: 0; flex: 1 1 auto; padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.album-card h3 { font-size: 26px; line-height: 1.1; text-transform: uppercase; }
.album-card__text { font-size: 17px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }

@media (max-width: 900px) {
	.albums { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.year-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.chip { flex: 0 0 auto; }
	.year { gap: 14px; }
	.year h2 { margin-top: 8px; }
	.albums { gap: 14px; }
	.album-card { flex-direction: column; }
	.album-card__cover { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
	.album-card__body { padding: 12px 14px 16px; gap: 4px; }
	.album-card h3 { font-size: 24px; }
	.album-card__text { font-size: 16px; -webkit-line-clamp: 4; line-clamp: 4; }
}

/* ---- Album (boards Album, Album-telefon) ---- */
.album-head .meta { margin-top: 8px; }
.album-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.album-description { max-width: 780px; font-size: 19px; }
.album-description p + p { margin-top: 12px; }
.thumbs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.thumbs li { display: flex; flex-direction: column; gap: 6px; }
.thumb { display: block; overflow: hidden; border-radius: 8px; background: var(--card); }
.thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.thumbs .caption { color: var(--muted); font-size: 15px; }
.thumbs .edit { align-self: flex-start; font-size: 15px; font-weight: 600; }

/* ---- Photo edit (board Upravit-fotku) ---- */
.photo-edit { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 36px; }
.photo-edit__img { flex: 999 1 560px; min-width: 0; width: 100%; max-width: 700px; height: auto; border-radius: 10px; background: var(--card); }
.photo-edit__side { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.photo-form { display: flex; flex-direction: column; gap: 14px; }
.photo-form .field { align-items: stretch; margin: 4px 0 0; }
.photo-form textarea { max-width: none; min-height: 0; }
.button-row { display: flex; gap: 10px; }
.button-row > * { flex: 1 1 0; padding-left: 8px; padding-right: 8px; }
.photo-edit .danger-zone { padding: 0 4px; }

@media (max-width: 900px) {
	.thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.album-actions { width: 100%; gap: 10px; }
	.album-actions > * { flex: 1 1 0; }
	.album-description { font-size: 17px; }
	.thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.thumbs .edit { font-size: 14px; }
	.photo-edit { gap: 18px; }
}

/* ---- Add photos (board Pridat-fotky) ---- */
.dropzone { padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; background: var(--dropzone-bg); border: 2px dashed var(--dropzone-line); border-radius: 14px; }
.dropzone svg { color: var(--accent); }
.dropzone .form-errors { align-self: stretch; text-align: left; }
.dropzone input[type=file] { max-width: 100%; color: var(--muted); font: inherit; }
.dropzone input[type=file]::file-selector-button { margin-right: 12px; padding: 12px 22px; background: var(--primary-bg); color: var(--primary-fg); border: 0; border-radius: 8px; font: 700 19px/1.2 'Source Sans 3', system-ui, sans-serif; cursor: pointer; }
.upload-status__head { margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.upload-status h2 { font-size: 28px; text-transform: uppercase; }
.progress { height: 10px; margin-bottom: 14px; overflow: hidden; background: var(--line); border-radius: 999px; }
.progress__bar { width: 0; height: 100%; background: var(--accent); transition: width 0.2s; }
#upload-progress { list-style: none; margin: 0; padding: 0; }
#upload-progress li { padding: 8px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
#upload-progress li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
#upload-progress .is-waiting { color: var(--hint); }
#upload-progress .is-busy { color: var(--heading); font-weight: 600; }
#upload-progress .is-busy > :last-child { color: var(--accent); }
#upload-progress .is-done > :last-child { color: var(--ok); font-weight: 600; }
#upload-progress .is-error > :last-child { color: var(--danger); font-weight: 600; }
#upload-progress .note { display: block; color: var(--muted); }

@media (max-width: 760px) {
	.dropzone { padding: 28px 16px; }
}

/* ---- Příště hrajeme: the four states (board Hrajeme-stavy), admin buttons (C-tmavy-pocitac) ---- */
.next-game__main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.next-game__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.next-game__head h2 { margin: 0; }
.next-game .badge { display: inline-block; align-self: flex-start; margin: 0; padding: 2px 12px; border-radius: 999px; font: 700 15px/1.4 'Source Sans 3', system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
.next-game .badge--change { background: var(--badge-change-bg); color: var(--badge-change-fg); }
.next-game .badge--off { padding: 3px 14px; background: var(--badge-off-bg); color: var(--badge-off-fg); font-size: 16px; letter-spacing: 0.5px; }
.next-game--change { outline: 3px solid var(--on-maroon-label); outline-offset: -3px; }
.next-game__changed { font-weight: 700; color: var(--on-maroon-highlight); }
.next-game--cancelled, .next-game--pause, .next-game--none { background: var(--card); color: var(--text); border: 2px solid var(--danger-line); }
.next-game--cancelled .next-game__main, .next-game--pause .next-game__main, .next-game--none .next-game__main { flex: 1 1 400px; }
.next-game--cancelled .next-game__when, .next-game--pause .next-game__when, .next-game--none .next-game__when { margin-top: 4px; color: var(--heading); }
.next-game--none h2 { color: var(--muted); }
.next-game__off { font-size: 21px; font-weight: 600; color: var(--danger); }
.next-game__later { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 19px; }
.next-game__later span { color: var(--muted); }
.next-game__later strong { color: var(--heading); }
.next-game__admin { flex: 0 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.next-game__cta { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 8px; background: var(--on-maroon); color: var(--maroon); font-size: 18px; font-weight: 700; text-align: center; text-decoration: none; }
.next-game__cta:hover { color: var(--maroon); filter: brightness(0.94); }
.next-game--cancelled .next-game__cta, .next-game--pause .next-game__cta, .next-game--none .next-game__cta { background: var(--primary-bg); color: var(--primary-fg); }
.next-game--cancelled .next-game__cta:hover, .next-game--pause .next-game__cta:hover, .next-game--none .next-game__cta:hover { color: var(--primary-fg); }
.next-game--compact { padding: 20px 22px; flex-direction: column; align-items: stretch; gap: 6px; box-shadow: none; }
.next-game--compact h2 { font-size: 17px; }
.next-game--compact .next-game__when { font-size: 38px; }
.next-game--compact .next-game__details { flex: none; font-size: 18px; }
.next-game--compact .next-game__off, .next-game--compact .next-game__later { font-size: 17px; }
.next-game--compact .next-game__note { font-size: 16px; }

@media (max-width: 760px) {
	.next-game .badge--off { font-size: 15px; }
	.next-game__off { font-size: 19px; }
	.next-game__later { font-size: 17px; }
}

/* ---- Kdy hrajeme (boards Kdy-hrajeme, Kdy-hrajeme-telefon) ---- */
.schedule-head__intro { margin-top: 8px; max-width: 720px; font-size: 20px; color: var(--muted); }
.schedule { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }
.schedule__main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.schedule__side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.schedule-card { padding: 26px 30px; display: flex; flex-direction: column; gap: 4px; }
.schedule-card > h2 { font-size: 32px; text-transform: uppercase; }
.schedule-intro { margin-bottom: 12px; color: var(--muted); }
.schedule-label { font: 700 20px/1.2 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.schedule-preview { display: flex; flex-direction: column; gap: 10px; }
.schedule-days { list-style: none; margin: 0; padding: 0; }
.schedule-day { padding: 18px 0; display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; grid-template-areas: "date venue actions" "date status actions" "change change change"; align-items: center; column-gap: 20px; border-top: 1px solid var(--line); }
.schedule-day:last-child { padding-bottom: 4px; }
.schedule-day__date { grid-area: date; font: 800 28px/1 'Barlow Condensed', 'Arial Narrow', sans-serif; color: var(--heading); }
.schedule-day__venue { grid-area: venue; align-self: end; font-weight: 600; color: var(--heading); }
.schedule-day__status { grid-area: status; align-self: start; font-size: 16px; color: var(--muted); }
.schedule-day__status.is-soon, .schedule-day__status.is-changed { color: var(--accent); font-weight: 600; }
.schedule-day__status.is-cancelled { color: var(--danger); font-weight: 600; }
.schedule-day__actions { grid-area: actions; display: flex; align-items: flex-start; gap: 10px; }
.schedule-day__actions > * { flex: none; }
.schedule-day:has(.schedule-day__change[open]) .schedule-day__form { display: none; }   /* "Nebude se hrát" is confusing next to the open form */
.schedule-day__actions input[type=submit], .schedule-day__change > summary { padding: 10px 16px; font-size: 17px; }
.schedule-day__change > summary, .venue__play > summary, .venues__hidden > summary { list-style: none; }
.schedule-day__change > summary::-webkit-details-marker, .venue__play > summary::-webkit-details-marker, .venues__hidden > summary::-webkit-details-marker { display: none; }
.has-chevron::after { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin: 0 2px 0 12px; border: solid currentColor; border-width: 0 3px 3px 0; transform: translateY(-0.2em) rotate(45deg); }
details[open] > .has-chevron::after { transform: translateY(0.12em) rotate(225deg); }
.schedule-change { grid-area: change; display: flex; margin-top: 14px; padding: 16px; flex-wrap: wrap; align-items: flex-end; gap: 14px; background: var(--page); border: 1px solid var(--line); border-radius: 10px; }
.schedule-change .form-errors { flex: 1 1 100%; margin: 0; }
.schedule-change .field { margin: 0; }
.schedule-change input[type=time], .schedule-change select { width: auto; }
.schedule-change__note { flex: 1 1 260px; }
.schedule-change__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.label-narrow { display: none; }
.schedule-more { margin-top: 12px; font-weight: 700; }
.schedule-pause__current { margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.schedule-pause__current strong { color: var(--heading); }
.schedule-pause__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.schedule-pause__form .form-errors { flex: 1 1 100%; margin: 0; }
.schedule-pause__form .field { margin: 0; }
.schedule-pause__form input[type=date] { width: 220px; }
.schedule-email { display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.schedule-email input[type=checkbox] { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.schedule-email__status { margin: 6px 0 0 34px; min-height: 1.5em; font-weight: 600; color: var(--ok); }   /* under the label text */
.schedule-email__status.is-error { color: var(--danger); }
.venues { gap: 16px; }
.venue { padding: 16px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border: 1px solid var(--input-line); border-radius: 10px; }
.venue--current { border: 2px solid var(--accent); }
.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; }
.badge--here { background: var(--badge-change-bg); color: var(--badge-change-fg); }
.venue h3 { font: 700 21px/1.3 'Source Sans 3', system-ui, sans-serif; color: var(--heading); }
.venue--current h3 { margin-top: 4px; }
.venue__when { font-size: 17px; }
.venue__note { font-size: 16px; color: var(--muted); }
.venue__from { padding: 3px 12px; border-radius: 8px; background: var(--badge-change-bg); color: var(--badge-change-fg); font-size: 16px; font-weight: 700; }
.venue__actions { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.venue__actions > a { font-size: 17px; font-weight: 600; }
.venue__play > summary { padding: 10px 16px; font-size: 17px; }
.venue__hide input[type=submit] { padding: 10px 16px; font-size: 17px; }
.venue__hint { font-size: 16px; color: var(--muted); }
.confirm-open { font-size: 17px; }
dialog.confirm { width: min(480px, calc(100vw - 32px)); padding: 0; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
dialog.confirm::backdrop { background: rgb(0 0 0 / 0.6); }
.confirm__body { padding: 24px 26px; }
.confirm__ask { margin: 0 0 20px; font-size: 20px; font-weight: 700; line-height: 1.35; color: var(--heading); }
.confirm__buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.confirm__buttons > * { padding: 11px 22px; font-size: 18px; }
@media (max-width: 760px) { .confirm__buttons > * { flex: 1 1 100%; } }
.venues__hidden { margin-top: 4px; }
.venues__hidden > summary { display: inline-block; padding: 8px 0; cursor: pointer; font-size: 17px; font-weight: 600; color: var(--text); }
.venues__hidden ul { margin: 8px 0 0; padding: 0; list-style: none; }
.venues__hidden li { padding: 10px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; border-top: 1px solid var(--line); font-size: 17px; font-weight: 600; color: var(--muted); }
.venues__hidden li input[type=submit] { padding: 8px 16px; font-size: 17px; }
.venue__cancel-switch input[type=submit] { padding: 10px 16px; font-size: 17px; }
.venue__playform { flex: 0 0 100%; }
.venue__playform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
/* with :has() the forms stay closed until their button is opened; without it they simply stay visible */
@supports selector(:has(*)) {
	.schedule-change, .venue__playform { display: none; }
	.schedule-day:has(.schedule-day__change[open]) .schedule-change, .venue:has(.venue__play[open]) .venue__playform { display: flex; }
	.venue:has(.venue__play[open]) .venue__cancel-switch { display: none; }
}
.venue__playform .field { margin: 0; }
.venue__playform .hint { margin: 6px 0 0; }
.venue__playform-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.venue__playform-buttons > * { padding: 10px 16px; font-size: 17px; }
.venues__add { font-weight: 700; }

@media (max-width: 1100px) and (min-width: 761px) {   /* narrow desktop: the buttons go under the text instead of squeezing the venue name */
	.schedule-day { grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: "date venue" "date status" "date actions" "change change"; }
	.schedule-day__actions { margin-top: 8px; }
}

@media (max-width: 760px) {
	.schedule { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 20px; }
	.schedule__main, .schedule__side { display: contents; }   /* phone order: preview first, as on the board */
	.schedule-preview { order: 1; }
	.schedule-days-card { order: 2; }
	.schedule-pause-card { order: 3; }
	.venues { order: 4; }
	.schedule-email-form { order: 5; }
	.schedule-head__intro { font-size: 17px; }
	.schedule-card { padding: 18px 16px; }
	.schedule-card > h2 { font-size: 28px; }
	.schedule-day { padding: 14px 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date date" "venue venue" "status status" "actions actions" "change change"; align-items: baseline; row-gap: 6px; }
	.schedule-day__actions { margin-top: 6px; }
	.schedule-day__date { font-size: 26px; }
	.schedule-day__venue, .schedule-day__status { align-self: auto; }
	.schedule-day__status { font-size: 15px; }
	.schedule-day__actions > * { flex: 1 1 0; min-width: 0; }
	.schedule-day__actions input[type=submit], .schedule-day__change > summary { width: 100%; padding: 11px 8px; }
	.schedule-day--extra { display: none; }
	.label-wide { display: none; }
	.label-narrow { display: inline; }
	.schedule-change { flex-direction: column; align-items: stretch; }
	.schedule-pause__form { flex-direction: column; align-items: stretch; }
	.schedule-pause__form input[type=date] { width: 100%; max-width: none; }
}

/* ---- Fix round 1: details from the boards ---- */
.next-game--compact .next-game__main { flex: none; }

@media (max-width: 760px) {
	.next-game--cancelled .next-game__main, .next-game--pause .next-game__main, .next-game--none .next-game__main { flex: none; }
	.schedule-day__venue { font-size: 17px; font-weight: 600; color: var(--heading); }
	.next-game.next-game--compact { padding: 16px 18px; gap: 4px; }
	.next-game.next-game--compact h2 { font-size: 16px; }
	.next-game.next-game--compact .next-game__when { font-size: 34px; }
	.next-game.next-game--compact .next-game__details { font-size: 17px; }
	.venue { padding: 14px 16px; gap: 4px; }
	.venue h3 { font-size: 20px; }
	.venue .badge { font-size: 14px; }
	.venue__when, .venue__actions > a { font-size: 16px; }
	.venue__actions { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
	.venue__actions > a { text-align: center; }
	.venue__play > summary, .venue__cancel-switch input[type=submit], .venue__hide input[type=submit] { width: 100%; text-align: center; }
	.venue__play, .venue__cancel-switch, .venue__hide { width: 100%; }
	.venue__playform { flex-direction: column; align-items: stretch; width: 100%; }
	.venue__playform-buttons > * { flex: 1 1 0; }
	.schedule-intro { font-size: 16px; }
	.schedule-change select, .schedule-change input[type=time] { width: 100%; }
	.schedule-change__note { flex: none; }
	.schedule-email { align-items: flex-start; font-size: 17px; }
	.schedule-email input[type=checkbox] { margin-top: 2px; }
}
