:root {
  --accent: #2f5d50;
  --bg: #f7f4ef;
  --card: #ffffff;
  --ink: #1c2528;
  --muted: #6a7376;
  --line: #e7e1d8;
  --soft: color-mix(in srgb, var(--accent) 9%, white);
  --soft-strong: color-mix(in srgb, var(--accent) 16%, white);
  --err: #a1302a;
  --err-bg: #fbeceb;
  --ok: #2e7d4f;
  --radius: 16px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
body.is-embed { background: transparent; }
a { color: var(--accent); text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }

.page { max-width: 1000px; margin: 0 auto; padding: 28px 18px 48px; }
.page--narrow { max-width: 620px; }
.is-embed .page { padding: 8px 4px 16px; }

/* Nagłówek */
.masthead { margin-bottom: 22px; }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.masthead__name { margin: 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.masthead__title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.12; margin: 10px 0 6px; letter-spacing: -.01em; }
.masthead__intro { margin: 0; color: var(--muted); max-width: 60ch; font-size: 1.02rem; }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); }
.langs__btn { border: 0; background: none; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); cursor: pointer; }
.langs__btn[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* Karty */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 2px rgba(30, 30, 20, .03), 0 8px 24px -16px rgba(30, 30, 20, .12); }
.step__title { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; margin: 0 0 16px; }
.muted { color: var(--muted); }

/* Krok 1: typy spotkań */
.types { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .types { grid-template-columns: 1fr 1fr; } }
.type-card {
  --type-color: var(--accent);
  position: relative; text-align: left; display: flex; flex-direction: column; gap: 8px;
  padding: 22px 22px 20px 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; overflow: hidden;
}
.type-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--type-color); }
.type-card:hover { border-color: color-mix(in srgb, var(--type-color) 45%, var(--line)); box-shadow: 0 10px 28px -18px rgba(30, 30, 20, .35); transform: translateY(-1px); }
.type-card__name { font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; }
.type-card__desc { color: var(--muted); font-size: .95rem; }
.type-card__cta { margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--accent); font-size: .95rem; }
.type-card__cta .icon { width: 18px; height: 18px; }

.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--muted); font-size: .93rem; }
.meta__item { display: inline-flex; align-items: center; gap: 6px; }
.icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.icon svg { width: 100%; height: 100%; }
.icon--lg { width: 40px; height: 40px; color: var(--accent); }

/* Układ kroków 2–3 */
.layout { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .layout { grid-template-columns: 300px 1fr; } }

.summary-card { --type-color: var(--accent); border-top: 5px solid var(--type-color); }
.back { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 4px 6px 4px 0; margin: -4px 0 12px; color: var(--accent); font-weight: 600; font-size: .92rem; cursor: pointer; }
.back .icon { width: 18px; height: 18px; }
.summary-card__host { margin: 0 0 2px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.summary-card__name { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.2; margin: 0 0 10px; }
.summary-card .meta { flex-direction: column; gap: 6px; }
.summary-card__when, .summary-card__tz { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; font-weight: 600; }
.summary-card__tz { margin-top: 4px; font-weight: 400; color: var(--muted); font-size: .92rem; }
.summary-card__when .icon, .summary-card__tz .icon { margin-top: 3px; }
.summary-card__desc { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; white-space: pre-line; }

/* Kalendarz */
.picker__body { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .picker__body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.cal { position: relative; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal__month { font-weight: 600; font-size: 1.02rem; }
.cal__arrow { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 8px; color: var(--ink); }
.cal__arrow:hover:not([disabled]) { background: var(--soft); }
.cal__arrow[disabled] { opacity: .35; cursor: default; }
.cal__arrow svg { width: 100%; height: 100%; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__wd { text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); padding: 6px 0; text-transform: uppercase; }
.cal__day { aspect-ratio: 1; min-height: 38px; border-radius: 50%; border: 0; background: none; font-size: .95rem; color: #b5b0a8; cursor: default; position: relative; font-variant-numeric: tabular-nums; }
.cal__day.is-available { background: var(--soft); color: var(--accent); font-weight: 700; cursor: pointer; }
.cal__day.is-available:hover { background: var(--soft-strong); }
.cal__day.is-selected { background: var(--accent); color: #fff; }
.cal__day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.cal.is-loading .cal__grid { opacity: .45; }
.cal__status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; margin: 10px 0 0; }

.times { min-height: 120px; }
.times__date { margin: 6px 0 12px; font-size: 1rem; font-weight: 600; }
.times__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; max-height: 360px; overflow-y: auto; padding: 2px; }
.slot { border: 1px solid color-mix(in srgb, var(--accent) 45%, white); color: var(--accent); background: var(--card); border-radius: 10px; padding: 11px 6px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; transition: background .12s, color .12s; }
.slot:hover { background: var(--accent); color: #fff; }

.tz { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.tz__select { font: inherit; font-size: .9rem; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--card); color: var(--ink); max-width: 100%; }

/* Formularz */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .93rem; }
.field input, .field textarea { font: inherit; padding: 12px 13px; border: 1px solid #d5cec3; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent); outline-offset: 0; }
.field__hint { margin: 0; color: var(--muted); font-size: .85rem; }
.field__error { margin: 0; color: var(--err); font-size: .88rem; font-weight: 600; }
.has-error input, .has-error textarea { border-color: var(--err); }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; font-size: .9rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.consent .field__error { grid-column: 2; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 22px; font-weight: 700; border: 1px solid transparent; cursor: pointer; text-decoration: none; font-size: .98rem; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover:not([disabled]) { background: color-mix(in srgb, var(--accent) 86%, black); }
.btn--primary[disabled] { opacity: .75; cursor: progress; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--soft); }
.btn--danger { background: var(--err); color: #fff; }
.btn--block { width: 100%; padding: 15px 22px; }
.btn .icon { width: 18px; height: 18px; }

.alert { background: var(--err-bg); color: var(--err); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-weight: 600; font-size: .93rem; }
.notice { background: var(--soft); border-radius: 10px; padding: 12px 14px; }
.notice--ok { background: #e8f4ec; color: var(--ok); font-weight: 600; }
.notice--warn { background: var(--err-bg); color: var(--err); }
.lead { font-size: 1.05rem; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
.spinner--light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Potwierdzenie */
.done { max-width: 640px; margin: 0 auto; text-align: left; border-top: 5px solid var(--type-color, var(--accent)); }
.done__badge { width: 52px; height: 52px; border-radius: 50%; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.done__badge .icon { width: 28px; height: 28px; }
.done__title { font-family: var(--serif); font-weight: 500; font-size: 1.75rem; margin: 0 0 8px; }
.done__lead { margin: 0 0 18px; }
.done__cancel { font-size: .92rem; margin: 18px 0; }
.summary { margin: 0; display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: var(--soft); }
.summary div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary dd .muted { font-weight: 400; }
@media (max-width: 480px) { .summary div { grid-template-columns: 1fr; gap: 0; } }

.empty { text-align: center; padding: 40px 22px; }
.empty h2 { font-family: var(--serif); font-weight: 500; margin: 10px 0 6px; }

@media (max-width: 520px) {
  .page { padding: 18px 14px 36px; }
  .card { padding: 18px; }
  .type-card { padding: 18px 18px 16px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0s !important; }
}
