/* Podit – styly webu
   Papír #F1F1EC, inkoust #1F2235, karmín #A3312C (jen ilustrace, upozornění, hover)
   Písma: Newsreader (nadpisy), Hanken Grotesk (text) */

:root {
  --paper: #F1F1EC;
  --card: #FFFFFF;
  --ink: #1F2235;
  --ink-2: #4F525F;
  --line: #D3D3CB;
  --card-line: #DCDCD4;
  --field-line: #8C8E99;
  --red: #A3312C;
  --serif: Newsreader, 'Iowan Old Style', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.15; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px; z-index: 10; }
.skip:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Upozornění: testovací web (výslovné přání, záměrně mimo barvy webu) ---------- */
.test-banner { margin: 0; padding: 10px 24px; background: var(--ink); color: #FFE14D; text-align: center; font-weight: 600; font-size: 16px; line-height: 1.4; }
.test-banner a { color: #FFE14D; }
.test-banner a:hover { color: #fff; }
.test-banner span { animation: test-blink 1.6s steps(1, end) infinite; }
@keyframes test-blink { 50% { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) { .test-banner span { animation: none; } }

/* ---------- Hlavička ---------- */
.site-header { max-width: var(--wrap); margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 40px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand img { width: 38px; }
.brand span { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -0.01em; }
.brand small { font-size: 15px; color: var(--ink-2); margin-left: 4px; }
.header-right { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.nav { display: flex; flex-wrap: wrap; column-gap: 28px; font-size: 16px; }
.nav a { text-decoration: none; padding: 11px 0; }
.nav a[aria-current="page"] { text-decoration: underline; }
.who { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--ink-2); }

/* ---------- Typografie ---------- */
.h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1.04; letter-spacing: -0.015em; }
.h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.1; letter-spacing: -0.01em; }
.h3 { font-size: 30px; }
.h4 { font-size: 22px; font-weight: 500; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; }
.tiny { font-size: 14px; }
.measure { max-width: 60ch; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.red { color: var(--red); }
.strong { font-weight: 500; }

/* ---------- Tlačítka ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { color: #fff; background: #2D3150; }
.btn-lg { min-height: 52px; padding: 0 28px; }
.btn-ghost { background: transparent; color: var(--ink); font-weight: 400; }
.btn-ghost:hover { background: rgba(31, 34, 53, 0.06); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 16px; }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.linkbtn { min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; cursor: pointer; }
.linkbtn:hover { color: var(--red); }
.pill { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 16px; cursor: pointer; }
.pill[aria-pressed="true"], .pill[aria-selected="true"] { background: var(--ink); color: #fff; }

/* ---------- Rozvržení ---------- */
.section { max-width: var(--wrap); margin: 0 auto; padding: 128px 24px 0; }
.section > .ruled { border-top: 1px solid var(--line); padding-top: 48px; }
.split { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.split > .side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 20px; }
.split > .main { flex: 2 1 560px; min-width: 0; }
.cols { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.cols > * { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

.card { background: var(--card); border: 1px solid var(--card-line); border-radius: 6px; padding: 28px 32px; }
.plate { background: var(--card); border: 1px solid var(--card-line); border-radius: 6px; display: flex; justify-content: center; }

/* Hero */
.hero { max-width: var(--wrap); margin: 0 auto; padding: 72px 24px 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero .h1 { max-width: 15ch; }
.hero .lead { margin-top: 28px; }
.hero .actions { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; }
.hero figure { margin: 80px 0 0; width: 100%; max-width: 820px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero .plate { width: 100%; padding: clamp(28px, 6vw, 64px) clamp(20px, 6vw, 80px); }
.hero .plate img { width: 100%; max-width: 640px; }
.hero figcaption { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink-2); }

/* Definiční seznam (služby, semináře) */
.deflist { margin: 0; }
.deflist > div { display: flex; flex-wrap: wrap; gap: 6px 40px; padding: 28px 0; border-top: 1px solid var(--line); }
.deflist > div:first-child { border-top: 0; padding-top: 0; }
.deflist > div:last-child { border-bottom: 1px solid var(--line); }
.deflist dt { flex: 1 1 220px; font-family: var(--serif); font-size: 24px; line-height: 1.28; }
.deflist dd { flex: 2 1 320px; margin: 0; }

/* Kroky objednání */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 40px; }
.steps li { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.steps .n { font-family: var(--serif); font-size: 56px; line-height: 1; }
.steps h3 { font-size: 24px; font-weight: 500; }
.steps p { max-width: 38ch; }

/* ---------- Formuláře ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fields > .field { flex: 1 1 260px; }
.field label, .legend { font-size: 15px; font-weight: 500; }
.input, .select, .textarea { min-height: 48px; width: 100%; padding: 0 14px; border: 1px solid var(--field-line); border-radius: 4px; background: #fff; }
.select { padding: 0 12px; }
.textarea { padding: 12px 14px; line-height: 1.6; resize: vertical; min-height: 160px; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.input-sm { min-height: 44px; width: 76px; padding: 0 10px; }
.input-time { width: 120px; min-height: 44px; padding: 0 10px; }
.input::placeholder, .textarea::placeholder { color: #6E7080; }
.fields { display: flex; flex-wrap: wrap; gap: 20px 24px; }
.check { display: inline-flex; align-items: flex-start; gap: 12px; min-height: 44px; cursor: pointer; padding-top: 10px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--ink); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }
.error { font-size: 15px; color: var(--red); }
.notice { padding: 14px 18px; border-radius: 4px; background: #fff; border: 1px solid var(--card-line); }
.notice.err { border-color: var(--red); color: var(--red); }

/* ---------- Psychologové ---------- */
.filters { margin-top: 56px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.filters .group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.filters .label { flex: 0 0 120px; font-size: 15px; color: var(--ink-2); }
.filters .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 40px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.person .who-col { flex: 3 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.person h2 { font-size: 26px; line-height: 1.2; }
.person .where { flex: 1 1 150px; font-size: 16px; }
.person .contact { flex: 1 1 280px; display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.person .contact a { overflow-wrap: anywhere; }
.person details { margin-top: 6px; }
.person summary { cursor: pointer; font-size: 15px; text-decoration: underline; text-underline-offset: 0.18em; width: max-content; padding: 8px 0; }
.person .bio { margin-top: 8px; max-width: 62ch; white-space: pre-line; }

/* ---------- Semináře ---------- */
.events { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.event { border-bottom: 1px solid var(--line); }
.event .line { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 28px 0; align-items: flex-start; }
.event .when { flex: 0 0 150px; display: flex; flex-direction: column; }
.event .when b { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.event .what { flex: 3 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.event .what h3 { font-size: 24px; line-height: 1.25; }
.event .act { flex: 2 1 260px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dots { display: flex; flex-wrap: wrap; gap: 5px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--ink); }
.dots i.on { background: var(--ink); }
.event .panel { margin: 0 0 28px; }
.confirm { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
.confirm .qr { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.confirm .qr img { width: 176px; height: 176px; image-rendering: pixelated; }
.confirm .txt { flex: 1 1 360px; display: flex; flex-direction: column; gap: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Pro tým ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 860px; }
.admin-table th { text-align: left; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 14px 16px; }
.admin-table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; background: #fff; border: 1px solid var(--card-line); border-radius: 6px; }
.preview { position: relative; }
.badge { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--ink-2); color: var(--ink-2); }
/* Záložky (odkazy s vlastní adresou) a části uvnitř záložky */
.tabbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.tabbar .pill { display: inline-flex; align-items: center; text-decoration: none; }
.tabbar .pill[aria-current="page"] { background: var(--ink); color: #fff; }
.tabbar .pill[aria-current="page"]:hover { color: #fff; }
.tabbar-aside { margin-left: auto; padding: 10px 0; }
.subnav { display: flex; flex-wrap: wrap; gap: 4px 28px; border-bottom: 1px solid var(--line); }
.subnav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 500; }
.wl-ok { font-weight: 500; }
/* Pořadník: rozepsaný řádek a řádek přesunutý po uložení */
.wl-table { min-width: 1080px; }
.wl-table .wl-pos { font-family: var(--serif); font-size: 22px; }
.wl-table .wl-who { min-width: 200px; }
.wl-table .wl-contact { min-width: 220px; }
.wl-table .wl-edit { min-width: 300px; }
.wl-table tr.wl-dirty td { background: rgba(31, 34, 53, 0.04); }
.wl-table tr.wl-dirty td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
.wl-table tr.wl-moved td { background: var(--paper); }

/* Místnosti */
.rooms-table { min-width: 980px; font-size: 15px; }
.rooms-table th[scope="row"] { padding-top: 16px; vertical-align: top; position: sticky; left: 0; z-index: 1; background: #fff; border-top: 1px solid var(--line); }
.rooms-table td, .rooms-table th { width: 18%; }
.rooms-table th:first-child { width: 96px; }
.rooms-table .today { background: rgba(31, 34, 53, 0.035); }
.slots { display: flex; flex-direction: column; gap: 6px; }
.slot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--card-line); background: #fff; line-height: 1.35; }
/* legenda nad přehledem: stejné barvy jako termíny (stavy níže ji přebarví) */
.slot-key { display: inline-block; padding: 2px 10px; border-radius: 6px; border: 1px solid var(--card-line); background: #fff; line-height: 1.5; }
.slot-busy { background: var(--paper); border-color: transparent; color: var(--ink-2); }
.slot-mine { border-left: 3px solid var(--ink); color: var(--ink); }
.slot-free { border-color: var(--ink); }
.slot-gap { border-style: dashed; border-color: var(--field-line); }
.slot .linkbtn.tiny { min-height: 36px; font-size: 13px; }
.slot-row { gap: 4px 16px; padding: 10px 14px; }
.slot-row .pill-sm, .slot-row .linkbtn { margin-left: auto; }
.pill-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.slot-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.room-dlg { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--card-line); border-radius: 8px; padding: 28px; background: #fff; color: var(--ink); }
.room-dlg::backdrop { background: rgba(31, 34, 53, 0.35); }
/* Denní pohled místností (na mobilu místo týdenní tabulky) */
.rooms-day { display: none; }
.day-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.day-pick .pill { min-height: 56px; padding: 4px; border-radius: 10px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.25; }
.day-room { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .rooms-week { display: none; }
  .rooms-day { display: flex; flex-direction: column; gap: 16px; }
  .card { padding: 22px 18px; }
  .room-dlg { padding: 22px 18px; }
  .tabbar .pill { padding: 0 16px; }
  .tabbar-aside { margin-left: 0; }
  /* Pořadník: řádky jako karty pod sebou, bez posouvání do stran */
  .wl-table { min-width: 0; }
  .wl-table thead { display: none; }
  .wl-table, .wl-table tbody, .wl-table tr, .wl-table td { display: block; width: 100%; }
  .wl-table tr { border-top: 1px solid var(--line); padding: 12px 0; }
  .wl-table tr:first-child { border-top: 0; }
  .wl-table td { border-top: 0; padding: 4px 16px; min-width: 0; white-space: normal; }
  .wl-table .wl-who, .wl-table .wl-contact, .wl-table .wl-edit { min-width: 0; }
  .wl-table .wl-pos:empty { display: none; }
  .wl-table td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; color: var(--ink-2); }
  .wl-table .wl-edit { padding-top: 10px; }
}

/* ---------- Patička ---------- */
.site-footer { margin-top: 144px; background: var(--ink); color: #E9E9E3; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #F2C9C6; }
.site-footer .top { max-width: var(--wrap); margin: 0 auto; padding: 64px 24px 48px; display: flex; flex-wrap: wrap; gap: 40px 64px; font-size: 15px; }
.site-footer .top > div { flex: 1 1 200px; }
.site-footer .label { color: #C4C5CC; margin-bottom: 6px; }
.site-footer .brandline { font-family: var(--serif); font-size: 30px; line-height: 1; }
.site-footer .bottom { max-width: var(--wrap); margin: 0 auto; padding: 20px 24px 32px; border-top: 1px solid #3A3D52; font-size: 14px; color: #C4C5CC; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
.site-footer .bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
