:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #1d1c1a;
  --muted: #8a867f;
  --line: #e6e3de;
  --piece: #f3f1ed;
  --piece-stroke: #c9c4bb;
  --piece-stroke-hover: #1d1c1a;
  --piece-shadow: rgba(29, 28, 26, 0.14);
  --street-1: #77726a;
  --street-2: #aaa59c;
  --street-3: #cdc8bf;
  --accent: #c2410c;
  /* Place icons and indicators */
  --coin: #d99a00;
  --res-green: #2f9e44;
  --res-orange: #f08c00;
  --res-red: #e03131;
  --c-veg: #2f9e44;
  --c-vegan: #087f5b;
  --c-gluten: #e8590c;
  --c-outdoor: #0c8599;
  --c-cards: #3b5bdb;
  --c-lunch: #c2255c;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Mouse pointer: the brand's orange dot. Normally drawn by cursor.js (it can pulse);
     these still images are the fallback if that script doesn't run. */
  --cursor-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='6' cy='6' r='5' fill='%23ea580c'/%3E%3C/svg%3E") 6 6, auto;
  --cursor-hand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='6' cy='6' r='5' fill='%23ea580c'/%3E%3C/svg%3E") 6 6, pointer;
  color-scheme: light;
}

html { cursor: var(--cursor-dot); }
a[href], button, summary, select, label:has(input[type=checkbox], input[type=radio]) { cursor: var(--cursor-hand); }
input[type=text], input[type=url], input[type=number], input[type=password], input[type=search],
input[type=time], textarea { cursor: text; }

/* --- the dot cursor (cursor.js) ------------------------------------------- */

/* The real pointer is hidden while the dot follows the mouse… */
html.has-dot-cursor, html.has-dot-cursor * { cursor: none !important; }
/* …except in text fields, where the text cursor says more. (The draggable zoomed map just
   keeps the dot.) */
html.has-dot-cursor :is(input[type=text], input[type=url], input[type=number], input[type=password],
  input[type=search], input[type=time], textarea) { cursor: text !important; }

.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483647;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px; /* centre the dot on the pointer position */
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  transition: opacity 0.15s ease;
  will-change: transform;
}
.cursor-dot.is-hidden { opacity: 0; }

/* Over something clickable: two soft rings ripple outward, slowly, one after the other. */
.cursor-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
}
.cursor-dot.is-pulsing .cursor-wave { animation: cursor-wave 2.4s cubic-bezier(0.2, 0.6, 0.35, 1) infinite; }
.cursor-dot.is-pulsing .cursor-wave + .cursor-wave { animation-delay: 1.2s; }
@keyframes cursor-wave {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(3.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-dot.is-pulsing .cursor-wave { animation: none; }
}

/* data-theme is set by the script at the top of base.html: the visitor's saved choice,
   otherwise the device's light/dark setting. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #141413;
    --surface: #1c1c1a;
    --ink: #eeece8;
    --muted: #8f8b84;
    --line: #2e2d2a;
    --piece: #232321;
    --piece-stroke: #4d4b46;
    --piece-stroke-hover: #eeece8;
    --piece-shadow: rgba(0, 0, 0, 0.5);
    --street-1: #a9a49b;
    --street-2: #6f6c66;
    --street-3: #4a4844;
    --accent: #f97316;
    --coin: #fcc419;
    --res-green: #51cf66;
    --res-orange: #ffa94d;
    --res-red: #ff6b6b;
    --c-veg: #69db7c;
    --c-vegan: #38d9a9;
    --c-gluten: #ff922b;
    --c-outdoor: #3bc9db;
    --c-cards: #748ffc;
    --c-lunch: #f783ac;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.count { color: var(--muted); font-weight: 400; margin-left: 0.25rem; }

/* --- header / footer ---------------------------------------------------- */

.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem clamp(16px, 4vw, 48px);
}
.site-footer { margin-top: auto; font-size: 0.75rem; color: var(--muted); justify-content: flex-end; }

.wordmark { font-weight: 600; text-decoration: none; letter-spacing: -0.03em; font-size: 1.1rem; }
/* The brand's orange dot (as on the map pins and the tab icon), after the name with its
   top level with the top of the final "t". In Inter the t is 0.6875em tall, so a 0.32em
   dot is lifted 0.3675em off the baseline (0.6875 - 0.32). */
.wordmark-dot {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  margin-left: 0.09em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.3675em;
}

/* Only on staging.eatout.cz (SITE_ENV=staging). */
.env-badge {
  margin-left: 0.6rem;
  padding: 0.15em 0.5em;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.2em;
}

.header-nav { display: flex; gap: 1.25rem; align-items: center; font-size: 0.85rem; }
.header-nav a { text-decoration: none; color: var(--muted); }
.header-nav a:hover, .header-nav a.active { color: var(--ink); }
.lang-switch { display: flex; gap: 0.5rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: var(--cursor-hand);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle svg { width: 15px; height: 15px; }
/* Show the moon in light mode (switch to dark) and the sun in dark mode. */
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1rem clamp(16px, 4vw, 48px) 3rem; }

/* --- area page ---------------------------------------------------------- */

/* Two states, animated by map.js:
   .is-overview — map centred, no places;
   .is-focus    — map slides left and zooms onto one piece, places fade in on the right. */

.area-layout {
  --move: 0.75s cubic-bezier(0.65, 0, 0.35, 1); /* keep in sync with DURATION/ease in map.js */
  display: flex;
  align-items: flex-start;
  position: relative;
}

.area-map {
  /* As wide as possible while the whole map still fits in the window (--aspect = w/h, set inline). */
  --overview-w: min(100%, 860px, calc((100vh - 290px) * var(--aspect, 1.3)));
  flex: 0 0 auto;
  width: var(--overview-w);
  margin-left: calc((100% - var(--overview-w)) / 2);
  transition: width var(--move), margin-left var(--move);
}
.is-focus .area-map { width: 56%; margin-left: 0; }

.area-head { transition: opacity 0.18s ease; }
.area-head.is-swapping { opacity: 0; }
.area-head h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
.area-sub { margin: 0.25rem 0 1.5rem; min-height: 1.5em; }

.breadcrumbs { font-size: 0.85rem; color: var(--muted); display: flex; gap: 0.4rem; flex-wrap: wrap; min-height: 1.3rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }

.area-places {
  flex: 1 1 0;
  min-width: 0;
  margin-left: clamp(1.5rem, 4vw, 4rem);
  padding-top: 4.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: opacity 0.45s ease 0.45s;
}
.is-overview .area-places {
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s 0.2s;
}

/* --- the outline map: districts as puzzle pieces ------------------------- */

.outline-map { width: 100%; height: auto; display: block; overflow: visible; }

.piece { cursor: var(--cursor-hand); outline: none; }
/* Line widths are multiples of --px / --dpx (map units per CSS / device pixel, set by
   map.js), so they look the same at every zoom. District outlines are one device pixel:
   the GPU draws those on a fast path, and anything wider made zooming stutter (see
   setViewBox in map.js). */
.piece path {
  fill: var(--piece);
  stroke: var(--piece-stroke);
  stroke-width: calc(var(--dpx, 1) * 1px);
  stroke-linejoin: round;
  /* Neighbours fade by turning the page's background colour rather than transparent:
     blending large semi-transparent shapes every frame made the zoom stutter, and on a
     plain background the two look the same. (Not `opacity` either — that renders each
     hugely zoomed piece offscreen every frame.) */
  transition: stroke 0.5s ease, fill 0.5s ease, visibility 0s linear 0s;
}

/* Overflow stays visible in the overview so a lifted piece at the edge isn't cut off,
   but while zoomed or zooming, clip to the map box — otherwise neighbouring pieces
   (huge at that zoom) are painted across the whole page. */
.is-focus .outline-map, .is-animating .outline-map { overflow: hidden; }

/* Zooming out: bring the neighbours back once the map has pulled back a little, so they
   don't appear as a hard-edged block at the map box while still hugely zoomed. */
.is-overview .piece path {
  transition: stroke 0.5s ease 0.25s, fill 0.5s ease 0.25s, visibility 0s linear 0.25s;
}

/* --- zoomable district: streets, pins, controls -------------------------- */

.map-stage { position: relative; }
.outline-map { user-select: none; -webkit-user-select: none; }
.is-focus .outline-map { cursor: grab; touch-action: none; }
.is-focus.is-dragging .outline-map { cursor: grabbing; }
.is-focus .piece { cursor: inherit; }

/* Street tiers: map.js sets each tier's stroke-opacity from the zoom level. */
.street-tier {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.street-tier[data-tier="1"] { stroke: var(--street-1); stroke-width: calc(var(--px, 1) * 1.6px); }
/* Ordinary and minor streets are hairlines (one device pixel) for the same reason. */
.street-tier[data-tier="2"] { stroke: var(--street-2); stroke-width: calc(var(--dpx, 1) * 1px); }
.street-tier[data-tier="3"] { stroke: var(--street-3); stroke-width: calc(var(--dpx, 1) * 1px); }

/* Pins keep the same on-screen size at any zoom: --px = map units per screen pixel. */
.pins { transition: opacity 0.4s ease 0.5s; }
.is-overview .pins { opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.pin { cursor: var(--cursor-hand); outline: none; }
.pin-dot {
  r: calc(var(--px, 1) * 5.5px);
  fill: var(--accent);
  stroke: none;
  transition: r 0.15s ease;
}
.pin.is-active .pin-dot, .pin:focus-visible .pin-dot { r: calc(var(--px, 1) * 8px); }
.is-dragging .pin-dot { transition: none; }

.pin-card {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, calc(-100% - 14px));
  width: 250px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px var(--piece-shadow);
  pointer-events: none;
  font-size: 0.85rem;
  line-height: 1.35;
}
.pin-card[hidden] { display: none; }
.pin-card-photo { display: block; width: 100%; height: 120px; object-fit: cover; }
.pin-card-body { padding: 0.65rem 0.85rem 0.75rem; }
.pin-card-name { font-weight: 600; font-size: 0.95rem; margin: 0.1rem 0 0.15rem; }
.pin-card-teaser { color: var(--muted); font-size: 0.8rem; margin-bottom: 0.35rem; }

.map-controls {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.is-focus .map-controls { opacity: 1; pointer-events: auto; transition-delay: 0.6s; }
.map-controls button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: var(--cursor-hand);
}
.map-controls button:hover { border-color: var(--ink); }

/* The hovered piece is shown lifted by an overlay copy on top (set by map.js), so the
   pieces themselves never move in the DOM and clicks/taps always land. */
.hover-overlay {
  fill: var(--piece);
  stroke: var(--piece-stroke-hover); /* white outline in dark mode, ink in light mode */
  stroke-width: calc(var(--px, 1) * 1.75px);
  stroke-linejoin: round;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  /* The shadow stays put and only opacity/scale animate: animating a drop-shadow on
     two overlapping districts at once is costly to draw. */
  filter: drop-shadow(0 6px 14px var(--piece-shadow));
  /* Sinking back (leaving): a touch quicker than rising. */
  transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.28s ease;
}
.hover-overlay.is-on {
  opacity: 1;
  transform: scale(1.045);
  /* Rising (entering): soft ease-out, so the lift settles rather than snaps. */
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}
.is-focus .hover-overlay, .is-zooming .hover-overlay { opacity: 0; transition: opacity 0.15s ease; }

.piece.is-focused path { stroke: var(--piece-stroke-hover); }
.is-focus .piece:not(.is-focused),
.is-zooming .piece:not(.is-focused) { pointer-events: none; }
/* Once faded out, the neighbours are hidden outright so they aren't drawn at all (at a
   district's zoom they are huge, and invisible-but-drawn still costs every frame). */
.is-focus .piece:not(.is-focused) path,
.is-zooming .piece:not(.is-focused) path {
  fill: var(--bg);
  stroke: var(--bg);
  visibility: hidden;
  transition: stroke 0.5s ease, fill 0.5s ease, visibility 0s linear 0.5s;
}

/* --- place cards & detail ------------------------------------------------ */

.place-card {
  display: flex;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.place-card:hover { border-color: var(--ink); }
.place-card-photo { width: 104px; flex: 0 0 104px; object-fit: cover; align-self: stretch; }
.place-card-body { padding: 0.9rem 1.05rem; min-width: 0; flex: 1; }
.place-card p { margin: 0.15rem 0 0; font-size: 0.85rem; }
.place-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.place-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; margin-top: 0.55rem; }
.meta-right { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-left: auto; }
/* Rating on cards: bigger and bolder, it's the owner's verdict. */
.place-card .rating, .pin-card .rating { font-size: 1.05rem; letter-spacing: 0.06em; line-height: 1; flex: none; }
.pin-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
/* Keep "Restaurant · American" on one line next to the rating; trim it if space runs out. */
.place-card-top .place-kind { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-teaser { color: var(--muted); }

.place-kind { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0; }

.rating { font-size: 0.7rem; letter-spacing: 0.15em; color: var(--line); }
.rating .on { color: var(--accent); }

/* Inline icons (Tabler SVGs via the icon() helper) take the text colour. */
svg.i { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }

/* Price level: coloured coins, unused ones faded. */
.coins { display: inline-flex; gap: 1px; color: var(--coin); }
.coin { display: inline-flex; opacity: 0.22; }
.coin.on { opacity: 1; }
.coin svg.i { width: 1.05rem; height: 1.05rem; }

/* Reservation traffic light. */
.res-light { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
/* A clock in the traffic-light colour, so it reads as "how hard is it to get a table". */
.res-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  flex: none;
  color: var(--res-color);
  background: color-mix(in srgb, var(--res-color) 18%, transparent);
}
.res-badge svg.i { width: 0.95rem; height: 0.95rem; }
.res-green { --res-color: var(--res-green); }
.res-orange { --res-color: var(--res-orange); }
.res-red { --res-color: var(--res-red); }

/* Yes/no features as coloured icons. */
.features { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.feature { display: inline-flex; align-items: center; color: var(--feat-color); }
.feature svg.i { width: 1.05rem; height: 1.05rem; }
.features.with-labels { gap: 0.4rem; margin-top: 0.9rem; }
.features.with-labels .feature {
  gap: 0.35rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--feat-color) 13%, transparent);
}
.feat-vegetarian { --feat-color: var(--c-veg); }
.feat-vegan { --feat-color: var(--c-vegan); }
.feat-gluten_free { --feat-color: var(--c-gluten); }
.feat-outdoor_seating { --feat-color: var(--c-outdoor); }
.feat-accepts_cards { --feat-color: var(--c-cards); }
.feat-lunch_menu { --feat-color: var(--c-lunch); }

.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.tag {
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  color: var(--muted);
}

.place-detail { max-width: 760px; }
.place-detail h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.2rem 0 0.5rem; }
.place-detail h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; margin: 0 0 0.75rem; display: flex; gap: 0.4rem; align-items: center; }
.place-hero { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: 0.75rem 0 1.5rem; }
.place-header { margin-bottom: 1.75rem; }
.place-teaser.lead { font-size: 1.15rem; margin: 0 0 0.9rem; }
.place-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; align-items: center; }
.place-meta .rating { font-size: 1.3rem; letter-spacing: 0.06em; line-height: 1; }
.place-meta .coins svg.i { width: 1.25rem; height: 1.25rem; }

/* The owner's go-to order: big photo + itemised list, price at the bottom like a receipt. */
.goto-order {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  padding: 1rem;
  margin: 0 0 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.goto-order img { width: 300px; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 10px; flex: none; }
.goto-body { display: flex; flex-direction: column; gap: 0.75rem; flex: 1; min-width: 0; padding: 0.25rem 0; }
.goto-label { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.goto-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.goto-item { display: flex; gap: 0.7rem; align-items: center; font-size: 1.05rem; font-weight: 500; }
.goto-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  flex: none;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.goto-icon svg.i { width: 1.1rem; height: 1.1rem; }
.goto-note { margin: 0; color: var(--muted); font-size: 0.95rem; white-space: pre-line; }
.goto-price {
  margin: auto 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
  font-size: 1.15rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.place-description { margin: 0 0 2rem; font-size: 1.05rem; white-space: pre-line; }
/* Practical info gets the wider column so the reservation line fits on one line. */
.place-practical { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem; margin-bottom: 2rem; align-items: start; }
.res-light > span:last-child { white-space: nowrap; }
/* Tags: quiet chips, a little tighter than elsewhere. */
.place-facts dd.place-tags { gap: 0.3rem; }
.place-tags .tag { font-size: 0.75rem; padding: 0.05rem 0.55rem; }
.place-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.25rem; margin: 0; }
.place-facts dt { color: var(--muted); display: flex; gap: 0.4rem; align-items: center; }
.place-facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }
.hours-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.hours-table th, .hours-table td { text-align: left; padding: 0.25rem 0; font-weight: 400; }
.hours-table td { text-align: right; font-variant-numeric: tabular-nums; }
.hours-table tr.is-today { font-weight: 600; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.5rem; }
.gallery-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.button.small { padding: 0.3rem 0.8rem; font-size: 0.85rem; display: inline-flex; gap: 0.3rem; align-items: center; }

/* --- error pages ---------------------------------------------------------- */

.error-page { max-width: 560px; margin: clamp(2rem, 10vh, 6rem) auto 4rem; text-align: center; }
.error-code {
  margin: 0 0 0.5rem;
  font-size: clamp(5rem, 20vw, 9rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  /* Faded through the colour (not opacity, which would fade the orange dot too). */
  color: color-mix(in srgb, var(--muted) 45%, transparent);
  font-variant-numeric: tabular-nums;
}
/* The brand dot, raised to the top of the digits (Inter's digits are 0.727em tall). */
.error-dot {
  display: inline-block;
  width: 0.14em;
  height: 0.14em;
  margin-left: 0.06em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.587em;
}
.error-page h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 0.75rem; }
.error-text { color: var(--muted); margin: 0 auto 1.75rem; max-width: 42ch; }
.error-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* --- forms & admin ------------------------------------------------------- */

.flash { padding: 0.6rem 0.9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.flash-error { border-color: var(--accent); color: var(--accent); }

/* Login page (admin, and on staging the gate in front of every page): the logo large in
   the middle, the form under it. */
.auth-page .site-header .wordmark { visibility: hidden; }
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 16px 16vh;
}
/* Messages ("Wrong password.") come after the form here, not above the logo. */
.auth-main > .flash { order: 1; width: min(100%, 320px); }
.auth { width: min(100%, 320px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth-mark { margin: 0; font-size: 3rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.auth-title {
  margin-top: 1.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-title.is-staging { padding: 0.2em 0.75em; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); }
.auth-intro { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.9rem; }
.auth .flash { margin: 1.25rem 0 0; width: 100%; }
.auth-form { width: 100%; margin-top: 2rem; display: flex; flex-direction: column; gap: 0.9rem; text-align: left; }
.auth-form .button { width: 100%; padding: 0.65rem 1.2rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.narrow { max-width: 360px; margin: 3rem auto; display: flex; flex-direction: column; gap: 1rem; }

.button {
  display: inline-block;
  font: inherit;
  font-weight: 500;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  cursor: var(--cursor-hand);
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--ink); }
/* Outlined buttons with a colour: green to save, red to delete. */
.button.outline { background: transparent; color: var(--btn-color); border-color: var(--btn-color); transition: background 0.15s ease; }
.button.outline:hover { background: color-mix(in srgb, var(--btn-color) 12%, transparent); }
.button.success { --btn-color: var(--res-green); }
.button.danger { --btn-color: var(--res-red); background: transparent; color: var(--btn-color); border-color: var(--btn-color); }
/* Armed by the first click (admin.js): asks "Really delete?", second click deletes. */
.button.danger.is-armed { background: var(--res-red); color: #fff; }
button.link.danger-link:hover, button.link.danger-link.is-armed { color: var(--res-red); }
button.link.is-armed { font-weight: 600; }
button.link { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); cursor: var(--cursor-hand); }
button.link:hover { color: var(--ink); }
form.inline { display: inline; }

.admin-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.admin-nav a { text-decoration: none; color: var(--muted); }
.admin-nav a.active, .admin-nav a:hover { color: var(--ink); }
.admin-nav form { margin-left: auto; }

.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.admin h1 { font-size: 1.5rem; margin-bottom: 1rem; }
.admin-head h1 { margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.table th, .table td { padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--line); }
.table td a { text-decoration: none; }
.table .right { text-align: right; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; max-width: 760px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 0.3rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span { font-size: 0.8rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.field .error { color: var(--accent); }
.checkbox { display: flex; gap: 0.5rem; align-items: center; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-option { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.85rem; cursor: var(--cursor-hand); }
.tag-option:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.tag-option input { display: none; }

.locate-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.locate-status { margin: 0.3rem 0 0; font-size: 0.85rem; }
.locate-status a { color: var(--ink); }
.locate-results { list-style: none; padding: 0; margin: 0.3rem 0 0; display: flex; flex-direction: column; gap: 0.35rem; }
.locate-result {
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  width: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: var(--cursor-hand);
}
.locate-result:hover { border-color: var(--ink); }
.locate-result .tag { margin-left: 0.4rem; }

/* --- place form sections --------------------------------------------------- */

.place-form { max-width: 760px; }
.form-section { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; margin-bottom: 1rem; }
.subhead { font-size: 0.8rem; color: var(--muted); font-weight: 500; margin: 1.25rem 0 0.6rem; }
.field-hint { font-size: 0.8rem; color: var(--muted); margin: -0.4rem 0 0; }

/* Feature switches: the icon lights up in its colour when on. */
.switches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feature-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: var(--cursor-hand);
  font-size: 0.9rem;
  user-select: none;
}
.feature-switch, .choice { position: relative; }
/* Visually hidden but focusable; sized to nothing so `.field input { width: 100% }`
   doesn't stretch them past the page edge. */
.feature-switch input, .choice input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; padding: 0; }
.switch-track { width: 30px; height: 18px; border-radius: 999px; background: var(--line); position: relative; transition: background 0.15s ease; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: transform 0.15s ease; }
.feat-icon { display: inline-flex; color: var(--muted); transition: color 0.15s ease; }
.feat-icon svg.i { width: 1.15rem; height: 1.15rem; }
.feature-switch:has(input:checked) { border-color: var(--feat-color); background: color-mix(in srgb, var(--feat-color) 10%, transparent); }
.feature-switch:has(input:checked) .switch-track { background: var(--feat-color); }
.feature-switch:has(input:checked) .switch-track::after { transform: translateX(12px); }
.feature-switch:has(input:checked) .feat-icon { color: var(--feat-color); }
.feature-switch:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Published / draft: a feature switch whose icon and label follow the state. */
.feat-published { --feat-color: var(--res-green); }
.feature-switch:has(input:checked) .when-off,
.feature-switch:not(:has(input:checked)) .when-on { display: none; }

/* Go-to order rows: icon type picker, Czech + English name, remove button. */
.goto-items { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.goto-row { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 0.5rem; align-items: center; }
.goto-row input[type=text] {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  width: 100%;
  min-width: 0;
}
.goto-row input[type=text]:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.kind-picker { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; }
.kind-option { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); cursor: var(--cursor-hand); }
.kind-option:hover { color: var(--ink); }
.kind-option input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.kind-option:has(input:checked) { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.kind-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 1px; }
.kind-option svg.i { width: 1.15rem; height: 1.15rem; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: var(--cursor-hand); }
.icon-button:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.goto-extra { margin-top: 1.25rem; }
.photo-slots.single { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Radio choices drawn as buttons (price coins, rating dots, traffic light). */
.choice-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.choice { cursor: var(--cursor-hand); }
.choice > span {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}
.choice:has(input:checked) > span { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:has(input:focus-visible) > span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Opening hours grid. */
.hours-row { display: grid; grid-template-columns: 6.5rem 7.5rem max-content 7.5rem max-content; justify-content: start; gap: 0.5rem; align-items: center; }
.hours-row input[type=time] { padding: 0.35rem 0.5rem; }
.hours-row input[type=time]:disabled { opacity: 0.35; }
.hours-row .error { grid-column: 1 / -1; }
.hours-day { font-size: 0.9rem; }
.hours-closed { font-size: 0.85rem; color: var(--muted); }
.hours-closed input { width: auto; }

/* Photos. */
.photo-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.75rem; }
.photo-slot { display: flex; flex-direction: column; gap: 0.5rem; }
.photo-slot-label { font-size: 0.8rem; color: var(--muted); }
.photo-slot img, .photo-empty { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.photo-empty { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); color: var(--muted); }
.photo-empty svg.i { width: 2rem; height: 2rem; }
.photo-actions { display: flex; gap: 1rem; font-size: 0.85rem; flex-wrap: wrap; }
.file-button { position: relative; display: inline-flex; align-self: flex-start; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; cursor: var(--cursor-hand); font-size: 0.85rem; }
.file-button:hover { border-color: var(--ink); }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: var(--cursor-hand); width: 100%; }
.gallery-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.gallery-item { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.gallery-add { align-self: start; justify-content: center; aspect-ratio: 4 / 3; width: 100%; border-style: dashed; border-radius: 10px; flex-direction: column; color: var(--muted); }
.card-auto { margin-top: 1rem; font-size: 0.85rem; }

/* Save on the left, Delete pushed to the far right of the same line. */
.form-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
.form-actions .danger { margin-left: auto; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.area-tree { list-style: none; padding-left: 1.1rem; margin: 0.3rem 0; border-left: 1px solid var(--line); }
.two-col > section > .area-tree { border-left: 0; padding-left: 0; }
.area-tree li { margin: 0.3rem 0; }
.area-tree a { text-decoration: none; font-weight: 500; }
.area-tree .muted { font-size: 0.8rem; margin-left: 0.4rem; }
.tag-row { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.tag-link { text-decoration: none; }
.tag-link:hover { color: var(--ink); border-color: var(--ink); }
.missing-translation { font-size: 0.75rem; color: var(--accent); text-decoration: none; }
.missing-translation:hover { text-decoration: underline; }
.tag-title { font-size: 1.25rem; padding: 0.2rem 0.9rem; color: var(--ink); }

/* --- small screens ------------------------------------------------------- */

@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .area-layout { flex-direction: column; }
  .area-map { --overview-w: min(100%, calc((100vh - 240px) * var(--aspect, 1.3))); }
  .is-focus .area-map { width: 100%; margin-left: 0; }
  .is-focus .outline-map { max-height: 45vh; }
  .area-places { width: 100%; margin: 1.5rem 0 0; padding-top: 0; }
  .is-overview .area-places { width: 100%; }
  .place-practical, .photo-slots { grid-template-columns: 1fr; }
  .goto-order { flex-direction: column; }
  .goto-order img { width: 100%; aspect-ratio: 4 / 3; }
  .goto-row { grid-template-columns: 1fr auto; }
  .goto-row .kind-picker { grid-column: 1 / -1; }
  .hours-row { grid-template-columns: 1fr 1fr auto 1fr; }
  .hours-day { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .area-layout { --move: 0s linear; }
  .piece, .area-places { transition: none; }
}
