/* Strona klienta: ciemne tło, bursztynowy akcent, projektowana najpierw pod telefon. */
:root {
  --ground: #14161b;
  --surface: #1e2129;
  --surface-2: #282c36;
  --line: #343945;
  --line-strong: #5a6070;
  --ink: #f4f5f7;
  --muted: #aeb4c0;
  --accent: #f5b841;
  --accent-ink: #14161b;
  --mint: #86dcc6;
  --error: #ffb4a8;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; background: var(--ground) center / cover fixed no-repeat; color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
#app { max-width: 640px; min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
/* na tle lokalu treść leży na własnym, prawie pełnym podkładzie */
body.has-background #app { background: rgba(20, 22, 27, 0.9); box-shadow: 0 0 0 1px var(--line); }
h1 { margin: 0; font-size: 24px; line-height: 1.2; }
/* nagłówki łamią się w równe linie, akapity bez samotnych słów na końcu */
h1, h2, .invitation-title, .event-card-body strong, .upcoming-body strong { text-wrap: balance; }
p { text-wrap: pretty; }
/* elementy przeglądarki w barwach strony */
::selection { background: var(--accent); color: var(--accent-ink); }
input, textarea { caret-color: var(--accent); }
h2 { margin: 0; font-size: 18px; }
h2.big { font-size: 22px; }
h2.label { font-size: 14px; font-weight: 600; color: var(--muted); }
p { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.splash { padding: 48px 16px; text-align: center; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.tight { gap: 4px; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Nagłówek dostaje fokus po zmianie widoku (dla czytnika ekranu), ale nie jest kontrolką. */
h1[tabindex='-1']:focus { outline: none; }

/* Ładowanie widoku: bez kliknięć od razu, przygaszenie dopiero gdy trwa dłużej niż chwilę. */
body.busy { cursor: progress; }
body.busy #app { pointer-events: none; }
body.busy #app > * { opacity: 0.55; transition: opacity 0.2s ease-out 0.25s; }
@media (prefers-reduced-motion: reduce) { body.busy #app > * { transition: none; } }

.top { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-bottom: 1px solid var(--line); min-height: 57px; }
.top-title { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-left: 8px; }
.top-title strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* podtytuł w jednej linii: pasek ma stałą wysokość na każdym kroku */
.top-title span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-button {
  width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: transparent; color: var(--ink); border-radius: 10px; font: inherit; cursor: pointer;
}
.lang { display: flex; gap: 4px; background: var(--surface); border-radius: 10px; padding: 3px; }
.lang button { min-width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lang button.on { background: var(--ink); color: var(--ground); }

.page { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 16px; }
/* miejsce pod arkuszem stolika tylko wtedy, gdy arkusz jest otwarty, i tylko na jego wysokość */
.page.with-sheet.sheet-open { padding-bottom: calc(var(--sheet-h, 200px) + 24px); }
.page.with-sheet .table-row { scroll-margin-bottom: calc(var(--sheet-h, 200px) + 16px); }
/* kolejne sekcje kroku oddzielone wyraźniej niż elementy w sekcji */
.page > section + section { margin-top: 10px; }

.button {
  min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center;
}
.button.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
/* działanie nieodwracalne (anulowanie): wyraźne, ale nie jako zalecane */
.button.danger { border-color: var(--error); color: var(--error); }
.text-link, .ghost { border: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; text-align: left; }
.ghost { min-height: 44px; padding: 0 8px; }
button.text-link { min-height: 24px; }

.note { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; color: var(--muted); }
.error { color: var(--error); font-size: 14px; }
.error:empty { display: none; }
.prose { white-space: pre-line; color: var(--muted); font-size: 15px; }
.prose.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Kalendarz */
.month-head { display: flex; align-items: center; justify-content: space-between; }
.weekdays, .month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekdays { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.day {
  height: 48px; border-radius: 10px; border: 1px solid transparent; color: var(--muted); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.day.has-event { border-color: var(--line); background: var(--surface); color: var(--ink); }
/* minione dni: nieaktywne, ale czytelne (bez przezroczystości) */
.day.past { color: #878d99; }
.day.past.has-event { color: #878d99; }
/* dzisiejszy dzień: numer w kolorze lokalu, cienka ramka gdy nie jest wybrany */
.day.today .day-number { color: var(--accent); font-weight: 800; }
.day.today:not(.selected) { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.day.selected { border: 2px solid var(--ink); background: var(--surface-2); color: var(--ink); opacity: 1; }
.day-number { font-size: 15px; font-weight: 600; line-height: 1; }
.day-marks { display: flex; gap: 3px; height: 6px; }
.day-events { display: none; }
.mark { display: inline-block; width: 6px; height: 6px; }
.mark.event { border-radius: 50%; background: var(--mint); }
.mark.tickets { border-radius: 1px; background: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .mark { width: 8px; height: 8px; }

.event-card { display: flex; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.event-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.event-card-body strong { font-size: 18px; line-height: 1.2; }
.poster { width: 76px; height: 100px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.poster.large { width: 110px; height: 146px; border-radius: 10px; }
/* plakat zastępczy w barwie lokalu: logo albo pierwsza litera tytułu */
.poster.placeholder {
  display: flex; align-items: center; justify-content: center; padding: 10px;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--accent);
  font-size: 32px; font-weight: 700;
}
.poster-logo { width: 100%; height: 100%; object-fit: contain; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.tickets { background: var(--accent); color: var(--accent-ink); }
.tag.tables { color: var(--mint); }
.event-head { display: flex; gap: 14px; }

/* Najbliższe wydarzenia pod panelem dnia: zwarta lista, data jak kartka z kalendarza */
.upcoming { margin-top: 8px; }
.upcoming-row {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 10px 8px 8px;
  border-radius: 12px; color: var(--ink); text-decoration: none;
}
.upcoming-row + .upcoming-row { border-top: 1px solid var(--line); border-radius: 0; }
.upcoming-row:hover { background: var(--surface); }
.upcoming-row > svg { flex-shrink: 0; color: var(--muted); }
.upcoming-date {
  width: 48px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding: 6px 0;
  border-radius: 10px; background: var(--surface-2); line-height: 1.1;
}
.upcoming-date strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.upcoming-date span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.upcoming-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upcoming-body strong { font-size: 16px; line-height: 1.25; }

/* Wiersze z licznikiem */
.row-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.row-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stepper button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 20px; cursor: pointer; }
.stepper-value { min-width: 32px; text-align: center; font-size: 18px; font-weight: 700; }

/* 4 kolumny: w każdym wierszu dwie pełne godziny, pełne i połówki w stałych kolumnach */
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.slot[aria-pressed='true'] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
/* godzina rozpoczęcia wydarzenia: podpis pod godziną (bez wyboru za klienta) */
.slot.event-start { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-color: var(--mint); line-height: 1.1; }
.slot-note { font-size: 11px; font-weight: 600; color: var(--mint); }
.slot.event-start[aria-pressed='true'] .slot-note { color: var(--accent-ink); }

/* Plan sali: grafika w pełnej szerokości, znaczniki pozycjonowane procentowo. */
/* Plan w skali 1 leży swobodnie (na telefonie od krawędzi do krawędzi); po powiększeniu przewija się w ramce. */
.plan-scroll { overflow: hidden; border-radius: 14px; background: var(--surface); }
.plan-scroll.zoomed { max-height: 70vh; overflow: auto; border: 1px solid var(--line); overscroll-behavior: contain; }
@media (max-width: 600px) { .plan-scroll { margin: 0 -16px; border-radius: 0; } .plan-scroll.zoomed { border-inline: 0; } }
.plan { position: relative; width: 100%; container-type: inline-size; --marker-size: 4.5; }
.zoom { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.zoom span { flex: 1; }
.zoom button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 22px; cursor: pointer; }
.zoom button:disabled { opacity: 0.4; cursor: not-allowed; }
.plan img { display: block; width: 100%; height: auto; }
.marker {
  position: absolute; transform: translate(-50%, -50%);
  /* średnica w procentach szerokości planu (ustawiana w panelu), nie mniej niż 18 px */
  width: max(18px, calc(var(--marker-size) * 1cqw)); height: max(18px, calc(var(--marker-size) * 1cqw));
  padding: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: max(8px, calc(var(--marker-size) * 0.34cqw)); font-weight: 700; line-height: 1; cursor: pointer;
  background: var(--mint); color: #14161b; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.marker svg { width: 60%; height: 60%; }
.marker.paid { background: var(--accent); border-radius: 22%; }
.marker.taken, .marker.unavailable { background: #2b2f39; color: #9aa1af; border: 1px dashed #9aa1af; cursor: not-allowed; box-shadow: none; }
.marker.view { background: var(--ink); color: var(--ground); }
/* Kształt wybrany dla stolika (po .paid, żeby go nadpisać); prostokąt ma bok 1,8 × rozmiar. */
.marker.shape-circle { border-radius: 50%; }
.marker.shape-square, .marker.shape-rect_h, .marker.shape-rect_v { border-radius: 16%; }
.marker.shape-rect_h { width: max(32px, calc(var(--marker-size) * 1.8cqw)); }
.marker.shape-rect_v { height: max(32px, calc(var(--marker-size) * 1.8cqw)); }
.marker[aria-pressed='true'], .table-row[aria-pressed='true'] { outline: 3px solid var(--ink); outline-offset: 2px; z-index: 2; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.swatch.free { background: var(--mint); }
.swatch.paid { background: var(--accent); border-radius: 4px; width: 18px; }
.swatch.taken { background: #2b2f39; border: 1px dashed #9aa1af; }

.table-list { display: flex; flex-direction: column; gap: 8px; }
.table-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.table-row .state { font-weight: 700; white-space: nowrap; color: var(--mint); }
.table-row.paid .state { color: var(--accent); }
.table-row:disabled { cursor: not-allowed; border-style: dashed; }
.table-row:disabled strong, .table-row:disabled .state { color: #9aa1af; font-weight: 600; }

.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 640px);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5); z-index: 5;
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-head > .stack { flex: 1; min-width: 0; }
/* cena zaraz po strefie i liczbie miejsc, nie zawieszona w połowie wiersza */
.sheet-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.sheet-close { margin: -10px -10px 0 0; font-size: 26px; line-height: 1; background: transparent; border: 0; cursor: pointer; }
.sheet-title { font-size: 20px; }
.price { font-size: 20px; color: var(--accent); white-space: nowrap; }
.price.free { color: var(--mint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Zamówienie */
/* licznik czasu koszyka zostaje widoczny przy przewijaniu formularza */
.hold { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface-2); font-size: 14px; color: var(--ink); }
.hold svg { color: var(--accent); flex-shrink: 0; }
/* ostatnie 2 minuty: licznik i ikona w kolorze ostrzeżenia */
.hold.ending, .hold.ending svg { color: var(--error); }
.hold strong { font-variant-numeric: tabular-nums; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line > strong { white-space: nowrap; }
.line.total { align-items: baseline; }
.line.total strong { font-size: 22px; }
.kind { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input {
  height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit;
}
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
/* Pole przewinięte do widoku (fokus po błędzie) nie chowa się pod przyklejonym dolnym paskiem. */
.field input, .check input { scroll-margin: 96px 0 220px; }
.field input[aria-invalid='true'] { border-color: var(--error); }
/* przykład w polu: ciszej niż wpisany tekst, ale czytelny (5,3:1 na tle pola) */
.field input::placeholder { color: #8f95a1; opacity: 1; }
.field-error { margin: 0; color: var(--error); font-size: 14px; }
.check-field { display: flex; flex-direction: column; }
.pay-note { margin: 0; }

.status { display: flex; align-items: flex-start; gap: 12px; }
.status-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--mint); color: #14161b; display: flex; align-items: center; justify-content: center; }

.bottom {
  position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface);
}
.bottom:empty { display: none; }
.bottom-sum { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); }
.bottom-sum strong { color: var(--ink); font-size: 18px; }
.bottom-sum:has(strong:empty) { display: none; }

.dialog { width: min(92vw, 560px); max-height: 86vh; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px 12px 16px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
/* przyciski obok siebie, a na wąskim ekranie jeden pod drugim (bez łamania etykiet) */
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-actions .button { flex: 1 1 170px; }
.view-photo { display: block; width: 100%; height: auto; border-radius: 10px; }

/* Plan sali: na telefonie jedna kolumna (plan, potem lista), arkusz przy dolnej krawędzi */
.plan-layout { display: flex; flex-direction: column; gap: 18px; }
.plan-col { display: flex; flex-direction: column; gap: 12px; }
.plan-side { display: flex; flex-direction: column; gap: 16px; }

/* Kalendarz na szerokim ekranie: większa siatka z tytułami wydarzeń, obok panel dnia. */
@media (min-width: 900px) {
  #app[data-view='calendar'] { max-width: 1280px; }
  /* plan sali na komputerze: plan po lewej, lista i wybrany stolik w kolumnie obok */
  #app[data-view='plan'] { max-width: 1280px; }
  #app[data-view='plan'] .page { padding: 24px; }
  .plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  /* lokal bez obrazu planu: sama lista w jednej kolumnie */
  .plan-layout:not(:has(> .plan-col)) { grid-template-columns: minmax(0, 1fr); }
  .plan-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .plan-col .plan-scroll, .plan-col .plan-scroll.zoomed { max-height: calc(100vh - 170px); overflow: auto; }
  /* margines wewnątrz przewijanej kolumny: ramka wybranego wiersza nie jest ucinana */
  .plan-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 6px; margin: -6px; }
  .plan-side .sheet { position: static; transform: none; width: auto; border: 1px solid var(--accent); border-radius: 14px; box-shadow: none; padding: 16px; }
  .page.with-sheet.sheet-open { padding-bottom: 24px; }
  #app[data-view='calendar'] .top { padding: 10px 24px; }
  .page.calendar { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr); gap: 28px; padding: 24px; align-items: start; }
  .calendar-main { display: flex; flex-direction: column; gap: 14px; }
  .page.calendar > .stack { position: sticky; top: 24px; }
  .page.calendar h1 { font-size: 30px; }
  .page.calendar .weekdays { font-size: 13px; margin-bottom: 0; text-align: left; padding: 0 8px; }
  .page.calendar .weekdays, .page.calendar .month { gap: 8px; }
  .page.calendar .day { height: 120px; padding: 8px; align-items: stretch; justify-content: flex-start; gap: 6px; overflow: hidden; border-color: var(--line); }
  .page.calendar .day.selected { border-color: var(--ink); }
  .page.calendar .day-number { font-size: 16px; }
  .page.calendar .day-marks { display: none; }
  .page.calendar .day-events { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .day-event { padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--mint); font-size: 12px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .day-event.tickets { background: var(--accent); color: var(--accent-ink); }
  .day-event.more { background: transparent; color: var(--muted); padding: 0 6px; }
  .page.calendar .event-card-body strong { font-size: 17px; }
}

@media (min-width: 900px) {
  .page.calendar .day.blank { border-color: transparent; }
  /* minione dni bez wydarzeń: bez ramki, pusty miesiąc nie jest siatką jednakowych pól */
  .page.calendar .day.past:not(.has-event) { border-color: transparent; }
}

/* Zamówienie testowe i weryfikacja Turnstile */
.note.test { background: #ffd046; border-color: #ffd046; color: #16181d; font-weight: 600; }
.turnstile { min-height: 65px; }

/* Pole dotyku znacznika: co najmniej 44 × 44 px, także gdy znacznik jest mały. */
.marker::before {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max(100%, 44px); height: max(100%, 44px);
}

/* Logo lokalu w górnym pasku */
.top-logo { height: 36px; width: auto; max-width: 96px; object-fit: contain; flex-shrink: 0; }

/* Adres i telefon lokalu pod kalendarzem */
.venue-info { display: flex; flex-direction: column; gap: 6px; font-style: normal; font-size: 14px; color: var(--muted); padding-top: 4px; border-top: 1px solid var(--line); }
.venue-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.contact-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; }

/* Potwierdzenie jako zaproszenie do lokalu: kiedy, gdzie, przy którym stoliku */
.invitation {
  display: flex; flex-direction: column; gap: 10px; padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}
.invitation-venue { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.invitation-venue strong { color: var(--ink); font-size: 15px; }
.invitation-logo { height: 28px; width: auto; max-width: 96px; object-fit: contain; }
.invitation-title { font-size: 20px; line-height: 1.2; }
.invitation-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 20px; font-weight: 700; line-height: 1.25; }
.invitation-when span { color: var(--accent); font-size: 28px; font-variant-numeric: tabular-nums; }
.invitation-line { font-size: 16px; font-weight: 600; }
.invitation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.invitation-actions .button { min-height: 44px; }
.invitation-number { padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
button.cancel-link { align-self: flex-start; min-height: 44px; color: var(--muted); font-weight: 600; }


/* Wybór lokalu (wspólny adres dla gości): kafelki z tłem i logo lokalu */
.venue-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 560px) { .venue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  #app[data-view='venues'] { max-width: 1080px; }
  #app[data-view='venues'] .page { padding: 28px 24px; }
  .venue-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}
.venue-tile {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  color: var(--ink); text-decoration: none;
}
.venue-tile:hover { border-color: var(--tile-accent, var(--accent)); }
.venue-tile-media {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden;
}
.venue-tile-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* przyciemnienie zdjęcia, żeby logo było czytelne */
.venue-tile-bg + .venue-tile-logo, .venue-tile-bg + .venue-tile-wordmark { position: relative; }
.venue-tile-media:has(.venue-tile-bg)::after { content: ''; position: absolute; inset: 0; background: rgba(20, 22, 27, 0.55); }
.venue-tile-media > .venue-tile-logo, .venue-tile-media > .venue-tile-wordmark { z-index: 1; }
.venue-tile-logo { max-width: 62%; max-height: 52%; object-fit: contain; }
.venue-tile-wordmark {
  padding: 0 16px; text-align: center; font-size: 26px; font-weight: 800; line-height: 1.1;
  color: var(--tile-accent, var(--ink)); text-wrap: balance;
}
.venue-tile-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.venue-tile-body strong { font-size: 18px; line-height: 1.25; }

/* Widget: strona w ramce na stronie WWW lokalu – wysokość według treści */
html.embedded #app { min-height: 0; }
.top-payment { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
