/* Chuť ulice / Street Taste 2027 — website styles.
   Mobile-first: base styles are for phones; wider screens are added with min-width media queries. */

/* ---------- Fonts (stored locally, SIL Open Font Licence — see css/fonts/OFL-*.txt) ----------
   Xanh Mono (Yellow Type, Lâm Bảo and Duy Dao) for headings, times and numbers: a typewriter serif with one regular
   weight and an italic. Atkinson Hyperlegible Next (Braille Institute) for text, 400–600 in one variable file.
   The user chose this pairing on 2026-11-21 ("Typewriter", work/seminar-5/design-directions/font-options/):
   lighter than the earlier bold fonts, which read as AI-made. Latin and Latin Extended (Czech) subsets only. */
@font-face {
  font-family: "Xanh Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/xanh-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Xanh Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/xanh-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Xanh Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/xanh-mono-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Xanh Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/xanh-mono-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
/* Neutral white, greys and black, so that the colour comes from the photos. The festival's own colour is herb green
   (--accent); red is kept for errors and the poster's stamp. No cream background, no orange and no yellow accents
   (the user, 2026-11-21: they read as the typical look of AI-made sites).
   The site starts light. The dark theme (below) is the visitor's choice: the moon button in the header, or
   Light / Dark in the menu and the footer (data-theme="dark" on <html>, set by js/head.js before the page is drawn). */
:root {
  color-scheme: light;
  --bg: #FFFFFF;          /* page background */
  --paper: #FFFFFF;       /* cards, dialogs */
  --ink: #141414;         /* text and links; also the background of dark buttons, chips and the toast */
  --muted: #5C5C5C;       /* 6.6:1 on white */
  --line: #DDDDDD;
  --field: #FFFFFF;       /* form fields */
  --error: #B3261E;       /* error messages and time clashes only (6.6:1 on white) */
  --accent: #1D7A4B;      /* herb green: dots, underlines of main buttons, the count, Saved (5.3:1 on white) */
  --on-accent: #FFFFFF;   /* text and icons on --accent (5.3:1) */
  --on-light: #141414;    /* text and icons on light colours (map symbols) — dark in both themes */
  --green: #2E7D6B;
  --tint-ok: #E6F2EE;
  --tint-warning: #FBE9E7;
  --map-ground: #EFEFEF;
  --footer-bg: #141414;   /* the footer stays dark in both themes */
  --footer-text: #F5F5F5;

  --font-head: "Xanh Mono", "Courier New", monospace;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Small, equal corners and no soft shadows: printed posters and tickets rather than app cards and pills */
  --radius: 4px;
  --radius-sm: 4px;
  --max: 72rem;
}
:root[data-theme="dark"] { color-scheme: dark; }
/* Dark theme (trend: a dark theme on request — NN/g: don't force it on everyone, let people switch;
   built as in web.dev "Baseline in Action: Color theme").
   light-dark() picks the first colour in the light scheme and the second in the dark one; browsers without it
   (before 2024) keep the light theme above. Every text colour has at least 4.5:1 on its background in both themes
   (checked by the contrast sweep, real-work/seminar-5-real-work.md). */
@supports (color: light-dark(#fff, #000)) {
  :root {
    --bg: light-dark(#FFFFFF, #121212);
    --paper: light-dark(#FFFFFF, #1B1B1B);
    --ink: light-dark(#141414, #F0F0F0);
    --muted: light-dark(#5C5C5C, #ABABAB);
    --line: light-dark(#DDDDDD, #333333);
    --field: light-dark(#FFFFFF, #0B0B0B);
    --error: light-dark(#B3261E, #FF8A80);
    --accent: light-dark(#1D7A4B, #5BC98E);     /* dark theme: a lighter green, 9.1:1 on the dark page */
    --on-accent: light-dark(#FFFFFF, #0B1F14);  /* dark text on the light green, 8.4:1 */
    --green: light-dark(#2E7D6B, #5BBFA6);
    --tint-ok: light-dark(#E6F2EE, #143029);
    --tint-warning: light-dark(#FBE9E7, #3A1A17);
    --map-ground: light-dark(#EFEFEF, #1E1E1E);
    --footer-bg: light-dark(#141414, #0A0A0A);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
/* Anchor targets and the focused element are not hidden under the sticky header
   (WCAG 2.2, 2.4.11 Focus Not Obscured; technique C43). The bottom bar adds its own padding below. */
html { scroll-padding-top: 5rem; }
h1, h2 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
h3 { font-size: 1.125rem; font-weight: 500; line-height: 1.3; margin: 0 0 0.35em; }
/* Lighter text overall (the user, 2026-11-21: the many bold texts looked AI-made): nothing heavier than 600 */
strong, b { font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; }
input, select, button, textarea { font: inherit; }
[hidden] { display: none !important; }

.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: 1rem; top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
/* Most content is drawn by js/app.js after the page loads. Keeping the main part at least one screen tall puts the
   footer below the screen from the start, so it does not jump down in view (Lighthouse: Cumulative Layout Shift 0.71
   on the programme page, all of it the footer). */
main { min-height: 100vh; }
@media (min-width: 40em) { .container { padding: 0 1.5rem; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
}
.input::placeholder { color: var(--muted); opacity: 1; }
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.4rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.logo {
  display: flex; flex-direction: column;
  margin-right: auto;
  padding: 0.25rem 0;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.logo-name { font-family: var(--font-head); font-weight: 400; font-size: 1.45rem; }
.logo-sub { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.header-quick { display: flex; align-items: center; gap: 0.15rem; }
.icon-link, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 44px; min-height: 44px;
  padding: 0 0.55rem;
  border: 0; border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
}
/* Hover: no grey box (the user, 2026-11-21: filled boxes in the menu look bad); a label, if shown, is underlined */
.icon-link:hover, .nav-toggle:hover { color: var(--ink); }
.icon-link:hover .account-label, .nav-toggle:hover .nav-toggle-label { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
/* Phones: the menu button and My schedule live in the bottom bar instead */
.nav-toggle, .header-quick [data-schedule-link] { display: none; }
@media (min-width: 48em) { .nav-toggle, .header-quick [data-schedule-link] { display: inline-flex; } }
.icon { width: 1.5rem; height: 1.5rem; flex: none; }
/* "My schedule" count: a small circle of the festival green (--accent) */
.count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.3rem; height: 1.3rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.72rem; font-weight: 600;
}
/* On narrow phones the account link and the menu button show only their icons; the labels stay available to screen readers */
.account-label, .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-menu { flex-basis: 100%; padding-bottom: 0.75rem; }
.js .site-menu { display: none; }
.js .site-menu.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.1rem; font-weight: 400;
  text-decoration: none;
}
.main-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.main-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.35em;
}
/* Search in the menu: a field on a ruled line; the magnifier inside it is the submit button (no boxed "Search" button).
   The button keeps its text "Search" for screen readers; only the icon is visible. */
.header-search { position: relative; display: flex; margin: 1rem 0 1.25rem; }
.header-search .input {
  flex: 1; min-width: 0;
  padding-right: 3rem;
  border-width: 0 0 2px; border-radius: 0;
  background: transparent;
}
.header-search .btn, .header-search .btn:hover {
  position: absolute; top: 0; right: 0; bottom: 2px;
  justify-content: center;
  width: 44px; min-height: 0; padding: 0;
  border: 0; border-radius: 0;
  background: none; color: var(--ink);
  text-decoration: none;
}

/* Language (EN / CZ) and colour theme (Light / Dark): plain words, no box. The chosen word is bold and in the text colour,
   with a small dot of the festival green under it (two cues, not colour alone); the other word is grey. */
.switch { display: inline-flex; align-items: center; }
.switch button {
  position: relative;
  min-width: 0; min-height: 44px;
  padding: 0 0.35rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.switch button:hover { color: var(--ink); }
.switch button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.switch button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: 0.3rem;
  width: 0.38rem; height: 0.38rem; border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
/* A slash between the two words; it is decoration, so screen readers skip it (empty alternative text) */
.switch button + button::before { content: "/"; content: "/" / ""; margin-right: 0.5rem; color: var(--muted); opacity: 0.6; font-weight: 400; }
.switch button + button[aria-pressed="true"]::after { left: calc(50% + 0.5rem); }
/* The moon button in the header: the outline moon, and the filled one while the dark theme is on */
.theme-toggle .icon-on, .theme-toggle[aria-pressed="true"] .icon-off { display: none; }
.theme-toggle[aria-pressed="true"] .icon-on { display: inline; }
/* The footer is dark in both themes */
.switch--footer button { color: #A8A8A8; }
.switch--footer button:hover, .switch--footer button[aria-pressed="true"] { color: var(--footer-text); }
.menu-switches { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.75rem; }

@media (min-width: 40em) {
  .account-label, .nav-toggle-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  /* After log-in the label is the visitor's first name: long names end with … */
  .account-label { display: inline-block; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
}
/* Full desktop header from 1280 px: below that, Czech labels don't fit next to each other */
@media (min-width: 80em) {
  .header-inner { flex-wrap: nowrap; gap: 1rem; padding: 0.5rem 1.5rem; }
  .logo { margin-right: 0.5rem; white-space: nowrap; }
  .nav-toggle { display: none; }
  .site-menu, .js .site-menu {
    display: flex; align-items: center; gap: 1rem;
    flex: 1; flex-basis: auto;
    padding: 0;
    order: 2;
  }
  .header-quick { order: 3; }
  .main-nav { margin-right: auto; }
  .main-nav ul { display: flex; gap: 0.25rem; }
  .main-nav a { border: 0; padding: 0.5rem 0.6rem; font-size: 1rem; white-space: nowrap; }
  /* In the full header the search is only the magnifier, which links to the search page */
  .site-menu .header-search { display: none; }
  /* No room for the theme switch in the full header: on desktop it is in the footer */
  .site-menu .theme-switch { display: none; }
  /* The visitor's name must leave room for the full menu (long names end with …) */
  .account-label { max-width: 6rem; }
}

/* ---------- Bottom navigation bar (phones) ---------- */
/* The main sections stay visible and within reach of the thumb: Material 3 navigation bar
   (3–5 destinations, icon + label that never disappears) and NN/g (visible navigation is found
   more often than a hidden menu). From 48em the header menu takes over. */
.tab-bar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg);
  border-top: 1px solid var(--ink);
}
/* Items share the width but never wrap or cut their label (Material 3), even at 320 px in Czech */
.tab-bar ul {
  display: flex;
  max-width: 32rem; margin: 0 auto; padding: 0;
  list-style: none;
}
.tab-bar li { flex: 1 1 auto; }
.tab-bar a, .tab-bar button {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  width: 100%; min-height: 3.75rem;
  padding: 0.4rem 0.1rem;
  border: 0; background: none;
  color: var(--ink);
  font-size: 0.75rem; font-weight: 400; line-height: 1.15;
  text-align: center; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  position: relative;
}
.tab-bar :focus-visible { outline-offset: -3px; }
/* Below 360 px the five labels are a little smaller, so they keep some air between them (checked at 320 px in EN and CS) */
@media (max-width: 22.49em) { .tab-bar a, .tab-bar button { font-size: 0.72rem; } }
/* The current page: a bar along the top edge of its item and a bold label, not only a colour change;
   the open menu gets a quieter bar */
.tab-icon { position: relative; display: flex; justify-content: center; width: 3.25rem; padding: 0.1rem 0; }
.tab-bar [aria-current="page"]::before, .tab-bar [aria-expanded="true"]::before {
  content: ""; position: absolute; top: 0; left: 18%; right: 18%;
  height: 3px;
  background: var(--ink);
}
.tab-bar [aria-expanded="true"]::before { background: var(--muted); }
.tab-bar [aria-current="page"] { font-weight: 600; }
.tab-bar .count {
  position: absolute; top: -0.35rem; right: 0.2rem;
  min-width: 1.2rem; height: 1.2rem;
  font-size: 0.7rem;
}
.tab-bar .count[data-count="0"] { display: none; }
html:not(.js) .tab-bar button { display: none; }
/* The bar never covers the end of the page or the focused element */
body { padding-bottom: calc(3.75rem + env(safe-area-inset-bottom)); }
html { scroll-padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
/* On phones the menu opens as a sheet just above the bar */
@media (max-width: 47.99em) {
  .js .site-menu.is-open {
    position: fixed; z-index: 39; left: 0; right: 0;
    bottom: calc(3.75rem + env(safe-area-inset-bottom));
    max-height: calc(100vh - 8.5rem); max-height: calc(100dvh - 8.5rem);
    overflow-y: auto;
    padding: 0.5rem 1.25rem 1.25rem;
    background: var(--bg);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 30px rgb(0 0 0 / 0.2);
  }
  .main-nav a { padding: 0.85rem 0.1rem; font-size: 1.2rem; }
}
@media (min-width: 48em) {
  .tab-bar { display: none; }
  body { padding-bottom: 0; }
  html { scroll-padding-bottom: 0; }
}

/* ---------- Page transitions ---------- */
/* Purposeful motion: moving to another page of the site cross-fades the content while the header and the
   bottom bar stay in place, and the heading changes in place. When a card leads to its own page, the card's
   title grows into that page's heading (js/app.js, "pageswap"). Cross-document view transitions work in
   Chrome and Edge 126+ and Safari 18.2+, on the live site only (pages opened from a file are not one origin);
   elsewhere the page simply changes. Nothing moves for people who ask their device for less motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
.tab-bar { view-transition-name: tab-bar; }
main h1 { view-transition-name: page-title; }
::view-transition-group(*) { animation-duration: 0.3s; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { max-width: var(--max); margin: 0 auto; padding: 0.75rem 1rem 0; font-size: 0.9rem; }
/* One line: the last crumb (the current page) ends with … when it is long; the page's h1 right below shows the whole
   name, and screen readers still hear it all. A long programme title used to make the breadcrumb two lines tall after
   the page loaded and push the whole page down (layout shift 0.14 measured on a phone on slow 4G). */
.breadcrumbs ol { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.breadcrumbs li { flex: none; white-space: nowrap; }
.breadcrumbs li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.25rem; color: var(--muted); }
.breadcrumbs [aria-current="page"] { color: var(--muted); }
@media (min-width: 40em) { .breadcrumbs { padding: 0.75rem 1.5rem 0; } }

/* ---------- Page layout ---------- */
main { display: block; padding-bottom: 3rem; }
.page-head { padding: 1.25rem 0 0.5rem; }
.lead { max-width: 42rem; font-size: 1.15rem; color: var(--muted); }
.section { margin: 2.25rem 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  list-style: none; padding: 0; margin: 0;
}
.stack { display: grid; gap: 0.75rem; list-style: none; padding: 0; margin: 0; }
.two-col { display: grid; gap: 1.5rem; }
@media (min-width: 56em) { .two-col { grid-template-columns: 2fr 1fr; align-items: start; } }

/* ---------- Cards ---------- */
/* Cards (log-in forms, My account, stages and zones on the map, facilities): a printed section opened by a rule
   in the text colour, not a box (the user, 2026-11-21) */
.card {
  padding: 0.9rem 0 0;
  border-top: 2px solid var(--ink);
}
.card h4 { margin: 0 0 0.35em; font-size: 1.125rem; font-weight: 500; line-height: 1.3; }
.card h4 a, .card h3 a, .card h2 a { color: var(--ink); text-decoration: none; }
.card h4 a:hover, .card h3 a:hover, .card h2 a:hover { text-decoration: underline; }
.card > :last-child { margin-bottom: 0; }
.card--zone { border-top: 4px solid var(--zone, var(--ink)); }
.meta { margin: 0 0 0.5em; color: var(--muted); font-size: 0.95rem; }
/* Nothing here yet: muted text over a dashed rule, with the way forward (a link) under it */
.empty-state { padding: 1rem 0 0; border-top: 2px dashed var(--line); color: var(--muted); }

/* Programme items: rows of a printed timetable, divided by thin rules (no boxes, the user 2026-11-21);
   the time in the typewriter face on the left */
.stack:has(> .item) { gap: 0; }
.item {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.item-time { font-family: var(--font-head); font-weight: 400; line-height: 1.3; }
.item-time time { display: block; }
.item-time time:first-child { font-size: 1.2rem; }
.item-time .end { color: var(--muted); font-weight: 400; }
.item h2, .item h3, .item h4 { margin: 0 0 0.2em; font-size: 1.15rem; line-height: 1.3; }
/* an item right under a page's h1 has an h2 (My workshop registrations), which looks like the others */
.item h2 { font-family: var(--font-body); font-weight: 500; letter-spacing: 0; }
.item h2 a, .item h3 a, .item h4 a { color: var(--ink); text-decoration: none; }
.item h2 a:hover, .item h3 a:hover, .item h4 a:hover { text-decoration: underline; }
/* The day over a list of items: the heading of a timetable page, closed by a rule in the text colour */
.day-heading { position: sticky; top: 3.75rem; z-index: 5; margin-bottom: 0; padding: 0.4rem 0 0.5rem; background: var(--bg); border-bottom: 2px solid var(--ink); }
.day-label { margin: 1.75rem 0 0; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink); font-family: var(--font-head); font-weight: 400; font-size: 1.35rem; }
@media (min-width: 80em) { .day-heading { top: 4.5rem; } }

/* Buttons of a programme item (Save, Register, Remove, Cancel registration): under the text on phones,
   on the right from 40em, one under the other */
.item-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
@media (min-width: 40em) {
  .item { grid-template-columns: 4.75rem minmax(0, 1fr) auto; }
  .item-actions { grid-column: 3; grid-row: 1; flex-direction: column; align-items: flex-start; }
}
.registration-form .input { max-width: 8rem; }
/* Items that overlap in My schedule: a red bar on the left of the row, and the warning inside as red text with a
   red bar on its left */
.item--clash { padding-left: 0.85rem; border-left: 3px solid var(--error); }
.clash {
  margin: 0.6rem 0 0;
  padding: 0.1rem 0 0.1rem 0.7rem;
  border-left: 3px solid var(--error);
  color: var(--error);
  font-size: 0.95rem; font-weight: 500;
}

/* Badges (type, cuisine, diet): small bold words separated by a dot, no frames (the user, 2026-11-21: no boxes).
   A zone keeps its colour as a small square in front of its name. */
.badges { display: flex; flex-wrap: wrap; gap: 0.15rem 0; list-style: none; margin: 0.5rem 0 0; padding: 0; }
.badge {
  display: inline-block;
  color: var(--muted);
  font-size: 0.85rem; font-weight: 400;
  line-height: 1.5;
}
/* the dot between two badges is decoration: screen readers skip it (empty alternative text) */
.badge + .badge::before { content: "·"; content: "·" / ""; margin: 0 0.45rem; font-weight: 400; }
/* without frames the badges need a little room before the text that follows them (stall and programme item pages) */
.badges + .lead { margin-top: 0.9rem; }
.badge--zone { color: var(--ink); }
.badge--zone::before {
  content: ""; display: inline-block;
  width: 0.62em; height: 0.62em; margin-right: 0.4em;
  background: var(--zone, var(--ink));
}

/* People */
.person { display: flex; gap: 0.85rem; align-items: center; }
/* Initials in the typewriter face: the zone colour for cooks (set in app.js), ink for musicians and hosts */
.avatar {
  flex: none;
  display: grid; place-items: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-head);
  font-size: 1.15rem;
}
.avatar--large { width: 6rem; height: 6rem; font-size: 2rem; }
/* The line-up as a printed list: rows divided by thin rules, two or three columns on wide screens; the name's link
   covers the whole row, and the first appearance (day, time, stage) is under the name */
.grid:has(> .person-row) { gap: 0 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.person-row { position: relative; align-items: flex-start; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.person-row h3 { margin: 0 0 0.1rem; font-size: 1.1rem; }
.person-row h3 a { color: var(--ink); text-decoration: none; }
.person-row h3 a::after { content: ""; position: absolute; inset: 0; }
.person-row:hover h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.person-row:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.person-row a:focus-visible { outline: 0; }
.person-row .meta { margin: 0; font-size: 0.9rem; }
.person-when { margin: 0.15rem 0 0; font-family: var(--font-head); font-size: 0.95rem; }
.detail-info .person { margin-bottom: 0.5rem; }
.detail-info .person .facts { margin: 0; }
/* On phones a smaller circle and narrower labels, so each fact stays on one line next to its label */
@media (max-width: 40em) {
  .detail-info .avatar--large { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; }
  .detail-info .person .facts dt { min-width: 6.5rem; }
}

/* Facts (label + value) as a description list */
.facts { display: grid; gap: 0.5rem; margin: 1rem 0; }
.facts div { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.facts dt { min-width: 8rem; font-weight: 500; }
.facts dd { margin: 0; }

/* ---------- Buttons and forms ---------- */
/* No boxes and no fills (the user, 2026-11-21: boxed and filled buttons look bad). A button is a word:
   - main actions (.btn, .btn--accent: Register, Log in, Show on map …): semibold, with a thick green underline;
   - other actions (.btn--secondary: Clear filters, Remove, Cancel …): medium weight, with a thin underline in the text colour;
   - Save (data-save): the bookmark and the word; once saved, the filled bookmark sits on a green circle.
   The two buttons on the home poster keep their filled shapes (liked by the user): see "Home: the festival poster".
   Every button stays at least 44 px tall, so it is as easy to hit as before. */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.1rem;
  border: 0; border-radius: 0;
  background: none;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.22em;
  text-underline-offset: 0.28em;
  text-decoration-skip-ink: none;
  cursor: pointer;
}
.btn:hover { text-decoration-color: var(--ink); }
.btn--secondary { font-weight: 500; text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.btn--secondary:hover { text-decoration-color: var(--accent); text-decoration-thickness: 0.22em; }
.btn--small { font-size: 0.95rem; }
/* Save: the bookmark and the word, no underline; the word is underlined on hover */
.btn[data-save] { text-decoration: none; }
.btn[data-save]:hover > span:not(.visually-hidden) { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.28em; }
.btn[data-save] .icon {
  box-sizing: content-box;
  width: 1.15rem; height: 1.15rem;
  margin-left: -0.32rem; padding: 0.32rem;
  border-radius: 50%;
}
.btn[data-save].is-saved .icon { background: var(--accent); color: var(--on-accent); }
.actions { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 1.25rem 0; }

/* Fields: a ruled line to write on, as in the menu search */
.input {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.1rem;
  border: 0; border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
.form { display: grid; gap: 1rem; }
.field label { display: block; margin-bottom: 0.3rem; font-weight: 500; }
.hint { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; }
.field .hint { margin: -0.1rem 0 0.4rem; }
.forms { display: grid; gap: 1.5rem; }
@media (min-width: 48em) { .forms { grid-template-columns: 1fr 1fr; align-items: start; } }
.field-error { margin: 0.35rem 0 0; color: var(--error); font-size: 0.95rem; font-weight: 500; }
.input[aria-invalid="true"] { border-bottom-color: var(--error); box-shadow: 0 1px 0 var(--error); }

/* Programme filter: day chips (radio buttons) and two selects; on phones the selects sit side by side.
   No panel around them and no boxes: the chips are words like EN / CZ in the menu — the chosen one is semibold
   with a small green dot under it, the others are grey. */
.filters {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 1.25rem;
  margin: 0.5rem 0 1.5rem;
}
.filters fieldset { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.filters legend { margin-bottom: 0.1rem; padding: 0; font-weight: 500; }
.filters .input { min-width: 0; }
.filters .btn { grid-column: 1 / -1; justify-self: start; }
/* On phones an odd last select (programme: Cuisine; food: Price) takes the whole row instead of half of it */
.filters > div.field:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 0.1rem;
  color: var(--muted);
  font-weight: 400;
}
.chip:hover span { color: var(--ink); }
.chip input:checked + span { color: var(--ink); font-weight: 600; }
.chip input:checked + span::after {
  content: ""; position: absolute; left: 50%; bottom: 0.3rem;
  width: 0.38rem; height: 0.38rem; border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (min-width: 48em) {
  .filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.25rem; }
  .filters fieldset { flex: 0 1 auto; }
  .filters .field { flex: 1 1 11rem; min-width: 0; }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; background: var(--paper); }
.table caption { padding: 0 0 0.5rem; text-align: left; font-weight: 500; }
.table th { font-weight: 500; }
.table th, .table td { padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
/* Column headers: small text over a rule, not a black bar */
.table thead th { border-bottom: 2px solid var(--ink); color: var(--muted); font-size: 0.9rem; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* ---------- Food: stall cards, zone headings, the stall page and its menu ---------- */
/* Stall cards (food list, zone pages, search results): the photo of the stall's dish on top and the text under it,
   no frame, like the "Don't miss" cards on the home page. Two columns already on phones, so the 25 stalls are not
   one very long column of photos. */
.grid--stalls { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); gap: 1.5rem 1rem; }
@media (min-width: 40em) { .grid--stalls { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 2rem 1.25rem; } }
@media (min-width: 64em) { .grid--stalls { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); } }
.stall-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.stall-card > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--line); }
.stall-card-text { min-width: 0; padding-top: 0.6rem; }
.stall-card h3, .stall-card h4 { margin: 0 0 0.15rem; font-size: 1.1rem; line-height: 1.25; }
.stall-card h3 a, .stall-card h4 a { color: var(--ink); text-decoration: none; }
/* The name's link covers the whole card: one link per stall, and the photo can be clicked too */
.stall-card h3 a::after, .stall-card h4 a::after { content: ""; position: absolute; inset: 0; }
.stall-card:hover h3 a, .stall-card:hover h4 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.stall-card:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.stall-card a:focus-visible { outline: 0; }
.stall-card .meta { margin: 0; font-size: 0.9rem; }
.stall-card .badges { margin-top: 0.3rem; }
.stall-card .matching { margin: 0.4rem 0 0; }
/* The stall looked for on the map */
.stall-card.is-target { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
/* In the panel of the map: a small square photo beside the text */
.stall-card--row { flex-direction: row; align-items: flex-start; gap: 0.85rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.stall-card--row > img { flex: none; width: 4.5rem; aspect-ratio: 1; }
.stall-card--row .stall-card-text { padding-top: 0; }

/* Zone headings on the food page: the zone's colour as a small square in front of the name */
.zone-heading::before {
  content: ""; display: inline-block;
  width: 0.5em; height: 0.5em; margin-right: 0.4em;
  background: var(--zone);
  vertical-align: 0.08em;
}

/* Detail pages (stall, programme item, stage): a large photo with a sticker on it (as the dates on the poster) —
   the stall number, the day and time, the number of programme items — and the text and facts beside it on desktop */
.detail-hero { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 56em) { .detail-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem; } }
.detail-photo { position: relative; margin: 0; }
.detail-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
/* The sticker sits on the photo in both themes, so its colours are fixed (white on green, 5.3:1) */
.photo-sticker {
  position: absolute; left: 0.9rem; bottom: 0.9rem;
  margin: 0; padding: 0.35rem 0.8rem 0.4rem;
  border-radius: 4px;
  background: #1D7A4B; color: #FFFFFF;
  font-family: var(--font-head); font-size: 1.5rem; line-height: 1;
  transform: rotate(-3deg);
  box-shadow: 0 8px 18px rgb(0 0 0 / 0.3);
}
.photo-sticker span { font-family: var(--font-body); font-size: 0.8rem; font-weight: 500; vertical-align: 0.2em; }
/* the day over the time (programme item) */
.photo-sticker--stack span { display: block; margin-bottom: 0.2rem; vertical-align: 0; }

/* Cuisines: the photo of one of the cuisine's stalls, then the name, the text and the links; no frame */
.cuisine-card > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 0.7rem; background: var(--line); }
.cuisine-card h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.cuisine-card p { margin: 0 0 0.5rem; }
.cuisine-card > :last-child { margin-bottom: 0; }
.detail-info .badges { margin-top: 0; }
.detail-info .facts { margin: 1rem 0 0.5rem; }

/* The menu as a printed price board: dish, a dotted line, the price; its diets and allergens under it in small type.
   It stays a table for screen readers: the column headers are only hidden visually. */
.menu-board { max-width: 46rem; background: none; }
.menu-board thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.menu-board tr {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.menu-board th, .menu-board td { padding: 0; border: 0; }
.menu-board th[scope="row"] { grid-column: 1; display: flex; align-items: baseline; gap: 0.5rem; font-size: 1.08rem; }
.menu-board th[scope="row"]::after { content: ""; flex: 1 1 1.5rem; min-width: 1.5rem; border-bottom: 2px dotted var(--muted); }
.menu-board .price { grid-column: 2; grid-row: 1; font-family: var(--font-head); font-size: 1.15rem; }
.menu-board .diet, .menu-board .allergens { grid-column: 1 / -1; color: var(--muted); font-size: 0.9rem; }
.menu-board .diet::before, .menu-board .allergens::before { content: attr(data-label) ": "; }
.menu-board .is-empty { display: none; }

/* ---------- Home: the festival poster ---------- */
/* The first screen works like a street poster: the photo across the whole width, the name huge,
   the dates on a green sticker, a round "free entry" stamp. The photo is darkened from the bottom
   and the left, so the light text stays readable on it in both themes. */
.poster {
  position: relative; isolation: isolate;
  display: grid; align-items: end;
  min-height: 78vh; min-height: 78svh;
  overflow: hidden;
  background: #1F1B18;
  color: #FFF7EC;
}
.poster-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 55% 35%; }
.poster::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgb(20 16 13 / 0.94) 0%, rgb(20 16 13 / 0.78) 40%, rgb(20 16 13 / 0.2) 78%, rgb(20 16 13 / 0) 100%),
    linear-gradient(to right, rgb(20 16 13 / 0.5), rgb(20 16 13 / 0) 70%);
}
.poster-inner { width: 100%; max-width: var(--max); margin: 0 auto; padding: 7rem 1rem 2.25rem; }
.poster :focus-visible { outline-color: #FFF7EC; }
.poster-kicker { max-width: 32rem; margin: 0 0 0.75rem; font-size: clamp(1rem, 2.6vw, 1.2rem); font-weight: 400; line-height: 1.35; color: #FFF7EC; }
.poster-title { margin: 0; font-size: clamp(2.6rem, 12.5vw, 8.6rem); line-height: 0.92; letter-spacing: -0.04em; color: #FFF7EC; text-shadow: 0 4px 30px rgb(0 0 0 / 0.35); }
.poster-sub { margin: 0.3rem 0 1.25rem; font-family: var(--font-head); font-weight: 400; font-size: clamp(1.4rem, 5.5vw, 2.6rem); font-style: italic; line-height: 1.1; color: #FFF7EC; }
.poster-sticker {
  display: inline-flex; flex-direction: column; gap: 0.1rem;
  margin: 0 0 1.5rem; padding: 0.6rem 1rem 0.65rem;
  border-radius: 6px;
  background: #1D7A4B; color: #FFFFFF;
  font-weight: 500;
  transform: rotate(-2.5deg);
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.35);
}
.poster-dates { font-family: var(--font-head); font-weight: 400; font-size: 1.35rem; line-height: 1.1; }
.poster-stamp {
  position: absolute; top: 1.25rem; right: 1rem;
  display: grid; place-items: center;
  width: 6.5rem; height: 6.5rem; margin: 0; padding: 0.6rem;
  border: 3px dashed #FFF7EC; border-radius: 50%;
  background: #B8401C; color: #FFF7EC;
  font-family: var(--font-head); font-weight: 400; font-size: 1.2rem; line-height: 1; text-align: center;
  transform: rotate(10deg);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.3);
}
.poster .actions { margin: 0; gap: 0.75rem; }
/* The two poster buttons keep their filled shapes: they belong to the poster (liked by the user, 2026-11-21) */
.poster .btn {
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border: 2px solid; border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
}
.btn--light { background: #FFF7EC; border-color: #FFF7EC; color: #1F1B18; }
.btn--light:hover { background: #FFFFFF; border-color: #FFFFFF; color: #1F1B18; }
/* The poster is dark in both themes, so its green is fixed (white text 5.3:1; hover 7.2:1) */
.poster .btn--accent { background: #1D7A4B; border-color: #1D7A4B; color: #FFFFFF; }
.poster .btn--accent:hover { background: #17643D; border-color: #17643D; color: #FFFFFF; }
@media (min-width: 48em) {
  .poster { min-height: min(86vh, 52rem); }
  .poster-inner { padding: 9rem 1.5rem 3.5rem; }
  .poster-stamp { top: 2rem; right: 2.5rem; width: 9rem; height: 9rem; font-size: 1.55rem; }
}

/* The festival in numbers: a dark band under the poster, read like the small print at the bottom of a festival
   poster (two columns on phones, one line on wide screens), not as a row of statistics tiles */
.numbers { background: var(--footer-bg); color: var(--footer-text); }
.numbers-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 1rem;
  max-width: var(--max); margin: 0 auto; padding: 1.25rem 1rem;
  list-style: none;
}
.numbers-list li { display: flex; align-items: baseline; gap: 0.45rem; min-width: 0; }
.numbers-list strong { flex: none; font-family: var(--font-head); font-weight: 400; font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1; color: #FFF7EC; }
.numbers-list span { font-weight: 400; line-height: 1.2; }
@media (min-width: 40em) { .numbers-list { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1.5rem; } }
@media (min-width: 64em) {
  .numbers-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 0; }
  .numbers-list li + li::before {
    content: ""; flex: none; align-self: center;
    width: 0.5rem; height: 0.5rem; margin: 0 1.1rem;
    background: rgb(255 255 255 / 0.4); transform: rotate(45deg);
  }
}

.intro { max-width: 48rem; margin: 2.5rem 0 0; font-size: clamp(1.15rem, 2.8vw, 1.5rem); line-height: 1.5; }
.section-head, .story, .visit { padding-top: 0.75rem; border-top: 3px solid var(--ink); }
.section-head { margin-bottom: 0.5rem; }

/* Don't miss: photo cards, side by side to swipe on phones, a grid on desktop */
.highlights {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 19rem); gap: 1rem;
  margin: 0 -1rem; padding: 0.25rem 1rem 1rem;
  list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 1rem;
}
/* position: relative keeps the visually hidden button texts inside the scrolling row (otherwise they
   are positioned against the page and make the whole page scroll sideways) */
.highlight {
  position: relative;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
}
.highlight > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.highlight-body { display: flex; flex: 1; flex-direction: column; gap: 0.35rem; padding: 0.8rem 0 0; }
.highlight-when { margin: 0; }
.highlight-when time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; }
.highlight-time { font-family: var(--font-head); font-weight: 400; font-size: 1.7rem; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.highlight-day { color: var(--muted); font-weight: 400; }
.highlight h3 { margin: 0; font-size: 1.2rem; }
.highlight h3 a { color: var(--ink); text-decoration: none; }
.highlight h3 a:hover { text-decoration: underline; }
.highlight .meta, .highlight .badges { margin: 0; }
.highlight-actions { margin-top: auto; padding-top: 0.5rem; }
@media (min-width: 40em) { .highlights { margin: 0 -1.5rem; padding-inline: 1.5rem; scroll-padding-inline: 1.5rem; } }
@media (min-width: 64em) {
  .highlights { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; overflow: visible; }
}

/* Food zones: photos of the zone's stalls above, the zone colour as a top band */
.zone-tiles { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.zone-tile { display: flex; flex-direction: column; }
/* The photos take whatever height the row gives the tile, so tiles next to a wider one have no empty space */
.zone-photos { display: grid; flex: 1 0 auto; gap: 3px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); }
.zone-photos img { width: 100%; height: 100%; object-fit: cover; }
.zone-photos--2 { grid-template-columns: 1fr 1fr; }
.zone-photos--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.zone-photos--3 img:first-child { grid-row: span 2; }
.zone-text { padding: 0.8rem 0 0; }
.zone-text h3 { margin: 0 0 0.3rem; font-family: var(--font-head); font-weight: 400; font-size: 1.45rem; }
.zone-text h3 a {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--zone);
  text-decoration-thickness: 0.2em; text-underline-offset: 0.12em; text-decoration-skip-ink: none;
}
.zone-text h3 a:hover { text-decoration-thickness: 0.3em; }
.zone-text .meta { margin: 0; }
.zone-count { margin: 0.5rem 0 0; font-weight: 500; }
@media (min-width: 40em) { .zone-tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64em) {
  .zone-tiles { grid-template-columns: repeat(3, 1fr); }
  .zone-tile:first-child { grid-column: span 2; }
}

/* Stages: the photo fills the tile, the text sits on its darkened lower part; the whole tile is the link */
.stage-tiles { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.stage-tile {
  position: relative; isolation: isolate;
  display: grid; align-items: end;
  min-height: 16rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: #1F1B18; color: #FFF7EC;
}
.stage-tile > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.stage-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(20 16 13 / 0.92), rgb(20 16 13 / 0.55) 55%, rgb(20 16 13 / 0.05)); }
.stage-tile:hover > img { transform: scale(1.04); }
.stage-tile-text { padding: 1rem 1.1rem 1.1rem; }
.stage-tile h3 { margin: 0 0 0.3rem; font-family: var(--font-head); font-weight: 400; font-size: 1.5rem; }
.stage-tile h3 a { color: #FFF7EC; text-decoration: none; }
.stage-tile h3 a::after { content: ""; position: absolute; inset: 0; }
.stage-tile :focus-visible { outline-color: #FFF7EC; }
.stage-tile p { margin: 0 0 0.35rem; font-size: 0.95rem; }
.stage-tile-count { color: #FFF7EC; font-weight: 500; }
@media (min-width: 40em) { .stage-tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64em) {
  .stage-tiles { grid-template-columns: repeat(4, 1fr); }
  .stage-tile { min-height: 24rem; }
}

/* The story: text and three "photos pinned to the wall" */
.story { display: grid; gap: 1.5rem; align-items: center; }
.story-text h2 { font-size: clamp(1.9rem, 6vw, 3rem); }
.story-text p { font-size: 1.1rem; }
.story-photos { display: flex; justify-content: center; margin: 0.5rem 0 1rem; padding: 0 1.25rem; list-style: none; }
.story-photos li { flex: 0 1 12.5rem; min-width: 0; margin: 0 -0.35rem; }
.story-photos figure {
  margin: 0; padding: 0.5rem 0.5rem 0.7rem;
  border-radius: 4px;
  background: #FFFFFF;
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.2);
  transform: rotate(-5deg);
}
.story-photos li:nth-child(2) { position: relative; z-index: 1; }
.story-photos li:nth-child(2) figure { transform: rotate(3deg) translateY(-0.9rem); }
.story-photos li:nth-child(3) figure { transform: rotate(-1.5deg) translateY(0.6rem); }
.story-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.story-photos figcaption { padding-top: 0.45rem; color: #141414; font-size: 0.8rem; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.story-photos figcaption strong { display: block; }
.story-photos figcaption span { display: block; color: #5C5C5C; }
@media (min-width: 40em) { .story-photos li { margin: 0 -0.9rem; } }
@media (min-width: 56em) { .story { grid-template-columns: 1fr 1.15fr; } }

/* Plan your visit: the three days as tickets, the address beside them */
.visit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.visit h2 { margin-bottom: 0; }
.visit-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.visit-days li {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.2rem 0.4rem 0.2rem 0.75rem;
  border-left: 1px solid var(--line);
}
.visit-days li:first-child { padding-left: 0; border-left: 0; }
.visit-days strong { font-family: var(--font-head); font-weight: 400; font-size: clamp(1.2rem, 4.5vw, 1.7rem); line-height: 1.1; }
.visit-days span { color: var(--muted); }
.visit-days .visit-time { color: var(--ink); font-size: 0.95rem; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (min-width: 22.5em) { .visit-time { white-space: nowrap; } }
.visit-where { min-width: 0; }
.visit-where h3 { margin-top: 0; }
.visit-where address { margin-bottom: 0.75rem; }
.visit-where p { margin: 0; }
@media (min-width: 56em) {
  .visit { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); column-gap: 2rem; align-items: start; }
  .visit h2 { grid-column: 1 / -1; }
  .visit-where { padding-left: 1.5rem; border-left: 1px solid var(--line); }
}

/* ---------- Notices, map placeholder, FAQ ---------- */
/* Messages: a coloured bar on the left of the text, not a box (black for information, green for OK, red for a warning) */
.notice { padding: 0.3rem 0 0.3rem 1rem; border-left: 4px solid var(--ink); }
.notice--ok { border-left-color: var(--green); }
.notice--warning { border-left-color: var(--error); }
/* FAQ: questions as rows of a list divided by rules, with + / − at the end instead of boxes */
details { border-bottom: 1px solid var(--line); }
.page-head + details, details:first-of-type { border-top: 2px solid var(--ink); }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 44px; padding: 0.85rem 0;
  font-size: 1.08rem; font-weight: 500;
  list-style: none; cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-family: var(--font-head); font-size: 1.5rem; line-height: 1; color: var(--accent); }
details[open] summary::after { content: "\2212"; }
summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
details > :not(summary) { max-width: 42rem; margin: 0 0 1rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 2rem; padding: 2rem 0 1rem; background: var(--footer-bg); color: var(--footer-text); }
/* Light links on the dark footer */
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { text-decoration-thickness: 2px; }
.site-footer .switch-row { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-brand { font-family: var(--font-head); font-weight: 400; font-size: 1.6rem; margin-bottom: 0.25rem; }
.footer-brand span { display: block; font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-links a { display: inline-block; padding: 0.2rem 0; }
address { font-style: normal; margin-bottom: 1rem; }
.footer-note { font-size: 0.95rem; }
.footer-fine { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / 0.2); font-size: 0.85rem; }

/* ---------- Map of the festival grounds (SVG drawn by app.js) ---------- */
.map-status { font-weight: 500; }
.map-status:empty { margin: 0; }
.map-layout { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 56em) { .map-layout { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); } }
.festival-map { display: block; width: 100%; max-width: 26rem; height: auto; margin: 0 auto; font-family: var(--font-body); }
/* The plan is drawn by js/app.js after loading: its space (viewBox 360 × 620) is kept from the start,
   so the sections under it do not jump down (Cumulative Layout Shift) */
#map { width: 100%; max-width: 26rem; margin: 0 auto; aspect-ratio: 360 / 620; }
.map-ground { fill: var(--map-ground); stroke: var(--line); stroke-width: 2; }
.map-street { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 5; }
.map-street-label, .map-compass text { fill: var(--muted); font-size: 11px; font-weight: 600; }
.map-compass path { fill: var(--muted); }
.map-label { fill: var(--ink); font-size: 12px; font-weight: 600; }
.festival-map a { outline: none; cursor: pointer; }
.map-zone-bg { fill: var(--zone); fill-opacity: 0.16; stroke: var(--zone); stroke-width: 2; }
.map-zone:hover .map-zone-bg { fill-opacity: 0.28; }
.map-zone.is-selected .map-zone-bg { fill-opacity: 0.32; stroke-width: 4; }
/* Other zones fade, but only their shapes: the text keeps full contrast (the whole group at 45 % opacity gave 2.5:1) */
.has-selection .map-zone:not(.is-selected) .map-zone-bg { fill-opacity: 0.05; stroke-opacity: 0.35; }
.map-stall.is-dimmed .map-stall-bg { stroke-opacity: 0.3; }
.map-stage-bg { fill: var(--ink); }
.map-stage .map-label { fill: var(--bg); }
.map-stage:hover .map-stage-bg { fill: var(--muted); }
.map-stall-bg { fill: var(--paper); stroke: var(--zone); stroke-width: 3; }
.map-stall:hover .map-stall-bg { fill: var(--line); }
.map-stall.is-target .map-stall-bg { fill: var(--ink); stroke: var(--accent); stroke-width: 4; }
.map-stall.is-target .map-label { fill: var(--bg); }
.map-pulse { display: none; fill: none; stroke: var(--ink); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: map-pulse 1.6s ease-out infinite; }
.map-stall.is-target .map-pulse { display: inline; }
@keyframes map-pulse { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2.2); } }
/* Keyboard focus: a thick outline around the zone, stage or stall */
.festival-map a:focus-visible .map-zone-bg, .festival-map a:focus-visible .map-stage-bg, .festival-map a:focus-visible .map-stall-bg { stroke: var(--ink); stroke-width: 5; }
/* Facilities: a white symbol in a dark circle (in both themes), on the plan and in the list under it */
.facility-bg { fill: var(--on-light); stroke: #fff; stroke-width: 2; }
.facility-icon { fill: #fff; color: #fff; font-family: var(--font-body); }
.facility { display: flex; gap: 0.75rem; align-items: flex-start; }
.facility-badge { width: 2rem; height: 2rem; flex: none; }
.facility div > :last-child { margin-bottom: 0; }

/* ---------- Dialog (time clash) and short messages ---------- */
.dialog {
  width: min(34rem, calc(100% - 2rem)); max-height: calc(100% - 2rem);
  padding: 1.25rem 1.25rem 0.25rem;
  border: 0; border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.35);
}
.dialog::backdrop { background: rgb(0 0 0 / 0.55); }
.dialog h2 { font-size: 1.6rem; }
.dialog ul { padding-left: 1.1rem; }
/* The three answers one under the other: their labels can be long ("Choose …" with a programme title) */
.dialog .actions { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.toast {
  position: fixed; z-index: 30; left: 1rem; right: 1rem; bottom: calc(4.75rem + env(safe-area-inset-bottom));
  max-width: 32rem; margin: 0 auto; padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--ink); color: var(--bg);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.3);
  font-weight: 500;
}
.toast:empty { display: none; }
@media (min-width: 48em) { .toast { bottom: 1rem; } }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
