/* Hedoni – arkusz stylów. Bez zależności, mobile-first. */

:root {
  --bg: #f7f2ea;
  --surface: #fffdf9;
  --surface-2: #f1e9dd;
  --ink: #2b211b;
  --ink-2: #6b5d52;
  --line: #e4d9ca;
  --wood: #9a5b2e;
  --ember: #d9772b;
  --ember-ink: #ffffff;
  --ember-soft: #fbe6d3;
  --sage: #4f6b57;
  --sage-soft: #e3ece4;
  --danger: #b3412e;
  --danger-soft: #f7e0db;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(43, 33, 27, .06), 0 4px 16px rgba(43, 33, 27, .06);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1613;
    --surface: #241d19;
    --surface-2: #2e2520;
    --ink: #f3ebe1;
    --ink-2: #bcae9f;
    --line: #3b312a;
    --wood: #d79a68;
    --ember: #e8893f;
    --ember-ink: #1b1613;
    --ember-soft: #3d2a1c;
    --sage: #9cc0a5;
    --sage-soft: #23302a;
    --danger: #f08a77;
    --danger-soft: #3b211c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--wood); }
a:hover { color: var(--ember); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }

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

/* Nagłówek */
.topbar { background: var(--ink); color: #f7f2ea; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--font-display); font-size: 1.45rem; letter-spacing: .02em; }
.brand:hover { color: inherit; }
.brand svg { width: 28px; height: 28px; }
.topnav { display: flex; gap: 14px; align-items: center; font-size: .9rem; }
.topnav a, .topnav button { color: #e9dccb; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.topnav a:hover, .topnav button:hover { color: #fff; }
@media (prefers-color-scheme: dark) { .topbar { background: #120e0c; } }

.testbar { background: var(--ember-soft); color: var(--ink); font-size: .8rem; text-align: center; padding: 4px 16px; }

/* Bohater */
.hero { padding: 28px 0 8px; }
.hero p.lead { font-size: 1.05rem; color: var(--ink-2); max-width: 36rem; }

/* Wyszukiwarka */
.search { display: grid; gap: 10px; margin: 16px 0 8px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.search-options { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Formularze */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=password],
input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  min-height: 46px;
}
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, .slot:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ember) 45%, transparent);
  outline-offset: 1px;
  border-color: var(--ember);
}
.field { margin-bottom: 14px; }
.field .help { font-size: .8rem; color: var(--ink-2); margin-top: 3px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--ember); }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--danger); font-size: .85rem; }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px; }
.grid-2 { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--surface-2); color: var(--ink);
}
.btn:hover { filter: brightness(.97); color: var(--ink); }
.btn-primary { background: var(--ember); color: var(--ember-ink); }
.btn-primary:hover { color: var(--ember-ink); filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.inline { display: inline; }

/* Komunikaty */
.messages { list-style: none; padding: 0; margin: 16px 0 0; }
.msg { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; background: var(--sage-soft); color: var(--ink); }
.msg.error { background: var(--danger-soft); color: var(--danger); }
.notice { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; }

/* Karty */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.results { display: grid; gap: 14px; margin: 18px 0 32px; }
@media (min-width: 720px) { .results { grid-template-columns: 1fr 1fr; } }
.sauna-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; text-decoration: none; color: inherit; }
.sauna-card:hover { color: inherit; border-color: var(--ember); }
.sauna-card h3 { margin-bottom: 2px; }
.thumb { width: 96px; height: 96px; border-radius: var(--radius-sm); background: linear-gradient(160deg, #e9c9a5, #b26d3c); display: grid; place-items: center; overflow: hidden; }
.thumb svg { width: 70%; height: 70%; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .85rem; color: var(--ink-2); margin: 4px 0 6px; }
.next { font-size: .9rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.badge-today { background: var(--sage-soft); color: var(--sage); }
.badge-public { background: var(--sage-soft); color: var(--sage); }
.badge-private { background: var(--surface-2); color: var(--ink-2); }
.badge-pending { background: var(--ember-soft); color: var(--wood); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

#map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); margin: 8px 0 4px; z-index: 0; }
#map:empty { display: none; }

/* Strona sauny */
.sauna-hero { display: grid; gap: 18px; padding: 22px 0 6px; }
@media (min-width: 820px) { .sauna-hero { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.sauna-visual { aspect-ratio: 16 / 10; border-radius: var(--radius); background: linear-gradient(160deg, #edd2b2 0%, #c4834f 55%, #7a4322 100%); display: grid; place-items: center; }
.sauna-visual svg { width: 46%; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; padding: 0; list-style: none; }
.facts li { background: var(--surface-2); border-radius: 999px; padding: 5px 12px; font-size: .85rem; }
.price { font-family: var(--font-display); font-size: 1.6rem; }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.chip { flex: none; scroll-snap-align: start; display: grid; justify-items: center; min-width: 64px; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .8rem; line-height: 1.25; }
.chip strong { font-size: 1.15rem; font-family: var(--font-display); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:hover { border-color: var(--ember); color: inherit; }
.chip.active:hover { color: var(--bg); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0 18px; }
.slot { display: grid; justify-items: center; padding: 10px 6px; border-radius: var(--radius-sm); background: var(--ember-soft); color: var(--ink); text-decoration: none; font-weight: 700; border: 1px solid transparent; }
.slot span { font-weight: 400; font-size: .75rem; color: var(--ink-2); }
.slot:hover { border-color: var(--ember); color: var(--ink); }

.summary { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 16px; }
.summary strong { font-family: var(--font-display); font-size: 1.15rem; }
.rows { display: grid; gap: 8px; margin: 0 0 16px; }
.row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.row:last-child { border-bottom: 0; }
.total { font-weight: 700; font-size: 1.1rem; }

.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 2rem; letter-spacing: .25em; font-weight: 700; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 16px; display: inline-block; }
.status-hero { text-align: center; padding: 24px 18px; }
.status-hero .icon { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--sage-soft); color: var(--sage); font-size: 1.8rem; margin-bottom: 10px; }
.status-hero.warn .icon { background: var(--ember-soft); color: var(--wood); }
.status-hero.bad .icon { background: var(--danger-soft); color: var(--danger); }

.timer { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Panel właściciela */
.owner-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .num { font-family: var(--font-display); font-size: 1.7rem; }
.stat .lbl { font-size: .8rem; color: var(--ink-2); }
.banner { border-radius: var(--radius); padding: 14px 16px; background: var(--sage-soft); margin: 14px 0; }
.banner.warn { background: var(--ember-soft); }
.sauna-panel { margin-bottom: 18px; }
.sauna-panel header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.hours-table td { padding: 6px 6px; }
.hours-table input[type=time] { min-height: 40px; padding: 6px 8px; }
.toggle-form { display: flex; align-items: center; gap: 10px; }

/* Stopka */
.footer { margin-top: 40px; padding: 24px 0 32px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.footer a { color: var(--ink-2); }

.prose { max-width: 42rem; }
.prose h2 { margin-top: 1.5rem; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--ember-soft); color: var(--wood); display: grid; place-items: center; font-weight: 700; }

.section { margin: 26px 0; }
.empty { text-align: center; padding: 30px 16px; color: var(--ink-2); }
