:root {
  color-scheme: light;
  --tile: #f4f6f8;
  --paper: #ffffff;
  --cobalt: #1d3c8c;
  --cobalt-deep: #14296a;
  --ink: #111a33;
  --muted: #54607a;
  --line: #d6dce7;
  --broth: #e8b53c;
  --open: #1d7a4b;
  --closed: #a03c2e;
  --radius: 10px;
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--tile);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
}

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

a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { color: var(--cobalt-deep); }

:focus-visible {
  outline: 3px solid var(--broth);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 2px solid var(--cobalt);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--cobalt);
  text-decoration: none;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 8px; }
.nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}
.nav a:hover { background: var(--tile); }
.nav a[aria-current="page"] { color: var(--cobalt); box-shadow: inset 0 -3px 0 var(--broth); border-radius: 0; }

/* Przełącznik języka: obie flagi widać cały czas, aktywny język jest podświetlony */
.lang-switch {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 132px;
  border: 2px solid var(--cobalt);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}
.lang-seg {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-height: 40px;
  padding: 4px 12px;
  border: 0;
  background: transparent;
  color: var(--cobalt);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-seg:hover { background: var(--tile); }
.lang-seg.is-active { background: var(--cobalt); color: #fff; cursor: default; }
.lang-seg.is-active:hover { background: var(--cobalt); }
.lang-seg:focus-visible { outline-offset: -5px; }
.flag { width: 24px; height: 16px; border-radius: 2px; flex: 0 0 auto; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 28px; }
.hero .wrap {
  display: grid;
  gap: 32px;
  align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 4.8rem);
  line-height: 0.98;
  margin: 0 0 16px;
  color: var(--cobalt);
  letter-spacing: -0.01em;
}
.hero .lead { font-size: 1.2rem; max-width: 30ch; margin: 0 0 22px; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 12px 22px;
  min-height: 48px;
  border-radius: var(--radius);
  border: 2px solid var(--cobalt);
  background: var(--cobalt);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--cobalt-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--cobalt); }
.btn.ghost:hover { background: var(--cobalt); color: #fff; }
.btn.danger { background: transparent; border-color: var(--closed); color: var(--closed); }
.btn.danger:hover { background: var(--closed); color: #fff; }
.btn.small { padding: 6px 12px; min-height: 40px; font-size: 0.95rem; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-weight: 700;
  font-size: 1rem;
}
.status::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.status.is-open { color: var(--open); }
.status.is-closed { color: var(--closed); }

/* Tablica dnia: element, który zapamiętasz */
.board {
  background: var(--paper);
  border: 3px solid var(--cobalt);
  border-radius: 14px;
  padding: 0;
  position: relative;
  box-shadow: 8px 8px 0 var(--cobalt);
}
.board::before {
  content: "";
  display: block;
  height: 22px;
  border-radius: 11px 11px 0 0;
  background:
    radial-gradient(circle at 11px 11px, var(--paper) 0 3.5px, transparent 4px) 0 0 / 22px 22px repeat-x,
    var(--cobalt);
}
.board-inner { padding: 22px 24px 26px; }
.board h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0 0 14px;
  color: var(--cobalt);
}
.board-row {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
}
.board-label { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.board-dish { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.board-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 3px double var(--cobalt);
}
.board-price span { font-weight: 600; }
.board-price strong { font-family: var(--font-display); font-weight: 400; font-size: 2rem; color: var(--cobalt); }
.board-empty { margin: 0; color: var(--muted); }

/* ---------- Sekcje ---------- */
.section { padding: 44px 0; }
.section h2.title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin: 0 0 14px;
  color: var(--cobalt);
  line-height: 1.1;
}
.featured-grid { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.featured-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 16px 18px;
  background: var(--paper);
  border: 2px solid var(--cobalt);
  border-radius: var(--radius);
}
.featured-name { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.featured-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.featured-amount { color: var(--muted); font-size: 0.95rem; }
.featured-price { font-weight: 700; font-size: 1.25rem; color: var(--cobalt); white-space: nowrap; }
.featured-link { font-weight: 700; }
.about p { max-width: 62ch; margin: 0 0 16px; }

.visit { background: var(--paper); border-top: 2px solid var(--cobalt); border-bottom: 2px solid var(--cobalt); }
.visit-grid { display: grid; gap: 28px; }
.visit h3 { font-size: 1rem; margin: 0 0 6px; color: var(--muted); font-weight: 700; }
.visit p, .visit dl { margin: 0; }
.visit dl div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed var(--line); max-width: 380px; }
.visit dt { font-weight: 500; }
.visit dd { margin: 0; font-weight: 700; }
.visit address { font-style: normal; font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }

.footer { padding: 28px 0 40px; color: var(--muted); font-size: 0.95rem; }
.footer a { color: var(--muted); }

/* ---------- Menu ---------- */
.menu-head { padding: 40px 0 10px; }
.menu-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 4rem);
  margin: 0 0 8px;
  color: var(--cobalt);
  line-height: 1;
}
.menu-head p { margin: 0; color: var(--muted); max-width: 52ch; }
.menu-sheet {
  background: var(--paper);
  border: 3px solid var(--cobalt);
  border-radius: 14px;
  padding: 8px 20px 20px;
  margin: 24px 0 48px;
  box-shadow: 8px 8px 0 var(--cobalt);
}
.cat h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--cobalt);
  margin: 26px 0 8px;
  padding-bottom: 6px;
  border-bottom: 3px double var(--cobalt);
}
.dishes { list-style: none; margin: 0; padding: 0; }
.dishes li { padding: 11px 0; }
.dish-row { display: flex; align-items: baseline; gap: 8px; }
.dish-name { font-weight: 600; font-size: 1.1rem; }
.dish-dots { flex: 1 1 auto; min-width: 16px; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.dish-price { font-weight: 700; white-space: nowrap; color: var(--cobalt); }
.dish-amount { color: var(--muted); font-weight: 500; font-size: 0.9rem; white-space: nowrap; margin-left: 4px; }
.dish-desc { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.menu-empty { padding: 24px 0; color: var(--muted); }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 28px 16px 64px; }
.admin-wrap h1 { font-family: var(--font-display); font-weight: 400; color: var(--cobalt); font-size: 2.2rem; margin: 0 0 6px; }
.panel { background: var(--paper); border: 2px solid var(--cobalt); border-radius: 12px; padding: 18px 18px 20px; margin: 0 0 22px; }
.panel h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; color: var(--cobalt); margin: 0 0 12px; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input[type="text"], .field input[type="password"], .field input[type="number"], .field select {
  font: inherit; width: 100%; padding: 10px 12px; min-height: 44px;
  border: 2px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--cobalt); outline: none; box-shadow: 0 0 0 3px rgba(29, 60, 140, 0.2); }
.grid2 { display: grid; gap: 0 14px; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0 0 12px; background: var(--tile); }
.item.off { opacity: 0.6; }
.item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--cobalt); }
.bar { position: sticky; bottom: 0; z-index: 10; background: var(--paper); border-top: 2px solid var(--cobalt); padding: 12px 16px; }
.bar .inner { max-width: 900px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.msg { margin: 0; font-weight: 600; flex: 1 1 200px; min-height: 1.4em; }
.msg.ok { color: var(--open); }
.msg.err { color: var(--closed); }
.note { color: var(--muted); font-size: 0.95rem; margin: 0 0 14px; }
.login { max-width: 420px; margin: 8vh auto 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 720px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
  .visit-grid { grid-template-columns: 1fr 1fr 1fr; }
  .board-row { grid-template-columns: 130px 1fr; align-items: baseline; gap: 12px; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-sheet { padding: 8px 32px 28px; }
}

@media (min-width: 1000px) {
  .featured-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .brand { font-size: 1.25rem; }
  .nav a { padding: 8px 8px; }
  .lang-switch { min-width: 120px; }
  .lang-seg { padding: 4px 8px; gap: 5px; }
  .nav a[href="index.html"] { display: none; }
  .board { box-shadow: 5px 5px 0 var(--cobalt); }
  .menu-sheet { box-shadow: 5px 5px 0 var(--cobalt); }
}

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