:root {
  --paper: #f3eee6;
  --paper-deep: #e7e0d4;
  --card: #fffdf8;
  --ink: #1c1915;
  --muted: #5e584e;
  --line: #e0d5c6;
  --pine: #1a3c34;
  --pine-2: #24574c;
  --moss: #3d7a62;
  --copper: #c4622d;
  --copper-soft: #f6e4d8;
  --danger: #8d342c;
  --ok: #e7f2eb;
  --err: #f8e6e1;
  --shadow: 0 20px 50px rgba(48, 32, 14, 0.08);
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, #efe2cf 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, #e4eee8 0%, transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}
body.app-page { background: #efeae1; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: white;
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px 22px;
  padding: 22px 0 8px;
}
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}
.mark {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-28deg);
}
.btn, .side-link, .day-tab, .week-nav a, .week-links a {
  text-decoration: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pine);
  color: #f6f1e7;
  border: 1px solid var(--pine);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
}
.btn.secondary { background: transparent; color: var(--pine); }
.btn.copper { background: var(--copper); border-color: var(--copper); color: white; }
.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: #e3b2ac;
}
button.btn, .biz-actions button, .inline-actions button, .demo button, .logout button, .danger-zone button {
  border-radius: 999px;
}
.eyebrow {
  color: var(--copper);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
h1 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }
.lead, .summary { color: var(--muted); max-width: 42rem; }
.lead { margin-top: 18px; font-size: 1.12rem; }
.muted { color: var(--muted); }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
  padding: 34px 0 10px;
}
.hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 210px;
  right: 4%;
  top: 8px;
  background: url("/static/img/obluh.svg") center / contain no-repeat;
  pointer-events: none;
}
.hero-copy, .hero-stage { position: relative; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-stage { display: grid; gap: 0; }
.call-card, .result-card, .panel, .biz-card, .login-card, .preview, .slot, .editor {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.call-card {
  background: var(--pine);
  color: #f4efe6;
  border: 0;
  border-radius: 22px;
  padding: 20px 22px 8px;
}
.call-card header {
  display: flex;
  justify-content: space-between;
  color: #d7c4ae;
  font-size: 0.86rem;
  margin-bottom: 8px;
}
.live {
  color: #f0c2a4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}
.call-card p { padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.call-card b { display: inline-block; min-width: 58px; color: #f0c2a4; font-weight: 600; }
.result-card {
  margin: -18px 28px 0 48px;
  border-radius: 18px;
  padding: 18px 20px;
}
.result-when { font-family: var(--serif); font-size: 1.7rem; margin: 4px 0; }
.result-who { font-weight: 600; }
.result-what { color: var(--muted); }
.facts, .trade-grid, .steps {
  display: grid;
  gap: 14px;
}
.facts { grid-template-columns: repeat(3, 1fr); margin: 34px auto; }
.facts article, .trade {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.facts img { width: 56px; height: 56px; margin-bottom: 8px; }
.scene img, .trade img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin-bottom: 14px;
}
.facts h2, .trade h3, .steps h3 { font-size: 1.45rem; margin-bottom: 6px; }
.section { padding: 26px 0; }
.section-head { max-width: 640px; margin-bottom: 18px; }
.section-head h2, .zone h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.trade-grid { grid-template-columns: repeat(3, 1fr); }
.trade-index { color: var(--copper); font-family: var(--serif); font-size: 1.3rem; }
.trade-note { margin-top: 14px; color: var(--muted); }
.scenes, .split-jobs { display: grid; gap: 14px; }
.scenes { grid-template-columns: repeat(3, 1fr); }
.split-jobs { grid-template-columns: 1fr 1fr; }
.scene, .job-col, .faq-item {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.scene time {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.job-col h3 { font-size: 1.45rem; margin-bottom: 10px; }
.job-col ul, .faq-list { margin: 0; padding-left: 1.1rem; }
.job-col li, .faq-list li { margin: 8px 0; }
.job-col.keeps { background: var(--pine); color: #f6f1e7; border-color: var(--pine); }
.job-col.keeps li::marker { color: #f0c2a4; }
.faq-list { display: grid; gap: 10px; list-style: none; padding: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin-top: 10px; color: var(--muted); }
.steps { grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; }
.steps li {
  padding: 8px 8px 0 0;
}
.steps span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--copper-soft);
  color: var(--copper);
  font-weight: 600;
  margin-bottom: 10px;
}
.preview { border-radius: 22px; padding: 18px; display: grid; gap: 10px; }
.preview-top { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.zone { background: var(--pine); color: #f6f1e7; margin-top: 20px; }
.zone .eyebrow { color: #f0c2a4; }
.zone-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 54px 0;
}
.zone p { color: #d9d0c3; margin-top: 10px; max-width: 38rem; }
.zone-art { width: min(220px, 100%); height: auto; flex: none; }
.login-art {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin-top: 22px;
  border-radius: 18px;
}
.site-footer { padding: 28px 0 36px; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.site-footer a { color: var(--pine); }
.domains { margin-top: 8px; }
.domains a + a::before { content: "·"; margin: 0 0.45em; color: var(--muted); }

.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
  padding: 28px 0 50px;
}
.login-pitch { padding-top: 28px; }
.login-pitch h1 { font-size: clamp(2.4rem, 4vw, 3.8rem); }
.login-pitch p { margin-top: 14px; color: var(--muted); max-width: 28rem; }
.login-card { border-radius: 24px; padding: 22px; }
.login-card h2 { font-size: 2rem; margin-bottom: 8px; }
.demo { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.demo p { color: var(--muted); font-size: 0.95rem; }
.demo-actions, .inline-actions, .biz-actions, .cal-actions, .week-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.demo-actions { margin-top: 10px; }
.demo button, .biz-actions button, .inline-actions button, .logout button, .danger-zone button, .week-links a, .week-nav a {
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 12px;
  color: var(--ink);
}
.demo-inline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.missing { padding: 64px 0; }
.missing h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); margin-bottom: 10px; }
.missing .btn { margin-top: 18px; }

.app { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.app > * { min-width: 0; }
input, select, textarea { min-width: 0; }
.sidebar {
  background: var(--pine);
  color: #f4efe6;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar .logo { color: inherit; }
.side-kicker {
  color: #f0c2a4;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.side-name { font-family: var(--serif); font-size: 1.55rem; line-height: 1.15; }
.side-meta { color: #d9d0c3; }
.side-nav { display: grid; gap: 6px; }
.side-link { padding: 10px 12px; border-radius: 12px; color: inherit; }
.side-link.is-on, .side-link:hover { background: rgba(255, 255, 255, 0.08); }
.side-fold { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 10px; }
.side-fold summary { cursor: pointer; }
.side-fold label span, .sidebar .stack span { color: #d9d0c3; }
.logout { margin-top: auto; }
.logout button { color: #f4efe6; border-color: rgba(255, 255, 255, 0.2); width: 100%; }
.app-main { padding: 28px 28px 60px; }
.app-main.narrow { max-width: 860px; }
.page-head, .preview-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}
.page-head { margin-bottom: 18px; }
.page-head h1, .app-main h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
.summary { margin-top: 8px; }
.banner {
  background: var(--copper-soft);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(239, 234, 225, 0.94);
  padding: 8px 0 12px;
}
.week-nav { display: flex; align-items: center; gap: 10px; }
.week-nav strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 560; }
.week-nav a, .week-links a {
  border-radius: 999px;
  padding: 6px 10px;
}
.search input { min-width: min(280px, 70vw); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.day-tab {
  min-width: 74px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 8px 6px;
  text-align: center;
  color: inherit;
}
.day-tab span, .day-tab small { display: block; color: var(--muted); font-size: 0.78rem; }
.day-tab strong { font-family: var(--serif); font-size: 1.3rem; }
.day-tab.is-today { box-shadow: inset 0 -3px 0 var(--copper); }
.day-tab.is-on { background: var(--pine); color: #f6f1e7; border-color: var(--pine); }
.day-tab.is-on span, .day-tab.is-on small { color: #d9d0c3; }
.day-block { margin-top: 16px; }
.day-block h2 { font-size: 1.6rem; margin-bottom: 10px; }
.slot {
  display: grid;
  grid-template-columns: 104px minmax(0, 1.5fr) minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-left: 4px solid var(--copper);
}
.slot.is-potvrdeny { border-left-color: var(--moss); }
.slot.is-zruseny { border-left-color: #cabbB0; opacity: 0.68; }
.slot.is-neprisiel { border-left-color: var(--danger); }
.slot-time strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
}
.slot-time span, .src, .slot-note, .warn { display: block; color: var(--muted); font-size: 0.92rem; }
.slot-who strong, .slot-what { font-size: 1.05rem; }
.slot-who span { display: block; color: var(--muted); font-size: 0.92rem; }
.slot-who a { color: var(--pine-2); }
.warn { color: var(--danger); }
.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--paper-deep);
  font-size: 0.82rem;
}
.pill.is-potvrdeny { background: var(--ok); }
.pill.is-zruseny, .pill.is-neprisiel { background: var(--err); }
.slot-meta { text-align: right; }
.edit { grid-column: 1 / -1; }
.edit summary, .editor summary, .side-fold summary { font-weight: 600; cursor: pointer; }
.editor {
  border-radius: 18px;
  padding: 6px 16px 16px;
  margin: 8px 0 16px;
}
.editor summary, .edit summary { padding: 12px 0; }
.rest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rest a {
  text-decoration: none;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
}
.empty { color: var(--muted); padding: 8px 0 16px; }
.biz-list, .admin-grid { display: grid; gap: 12px; }
.admin-grid { grid-template-columns: 1fr 1fr; margin-top: 22px; align-items: start; }
.biz-card {
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.biz-card.is-off { opacity: 0.66; }
.biz-card h2 { font-size: 1.6rem; }
.biz-kind, .biz-counts, .biz-id { color: var(--muted); }
.biz-id code {
  font-family: ui-monospace, monospace;
  background: var(--paper);
  padding: 1px 6px;
  border-radius: 6px;
}
.panel { border-radius: 18px; padding: 16px 18px; }
.panel h2, .danger-zone h2 { font-size: 1.5rem; margin-bottom: 6px; }
.stack, .form-grid { display: grid; gap: 12px; }
.form-grid { grid-template-columns: 1fr 1fr; }
.span-2, .check { grid-column: 1 / -1; }
label { display: grid; gap: 6px; }
label[hidden] { display: none; }
label span { color: var(--muted); font-size: 0.92rem; }
input, select, textarea {
  width: 100%;
  background: white;
  border: 1px solid #d9cdb8;
  border-radius: 12px;
  padding: 11px 12px;
}
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.upcoming { margin: 10px 0 0; padding-left: 18px; }
.upcoming li { margin: 6px 0; }
.danger-zone {
  margin-top: 16px;
  border: 1px solid #e3b2ac;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.danger-zone button { color: var(--danger); border-color: #e3b2ac; background: transparent; }
.codeblock {
  margin: 12px 0 0;
  padding: 12px;
  background: #221e1a;
  color: #f4efe6;
  border-radius: 12px;
  overflow: auto;
  font-size: 0.86rem;
  line-height: 1.45;
}
.flash {
  padding: 12px 18px;
  text-align: center;
}
.flash p { margin: 0; }
.flash-ok { background: var(--ok); }
.flash-err { background: var(--err); }
.print-only { display: none; }

:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
::selection { background: #f0c7b0; }

@media (max-width: 860px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header .logo { grid-column: 1; grid-row: 1; }
  .site-header > .btn { grid-column: 2; grid-row: 1; justify-self: end; width: auto; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}
@media (max-width: 980px) {
  .hero::before { display: none; }
  .hero, .login-split, .trade-grid, .steps, .facts, .admin-grid, .app, .scenes, .split-jobs {
    grid-template-columns: 1fr;
  }
  .sidebar { min-height: auto; padding: 16px; gap: 10px; }
  .side-nav { display: flex; flex-wrap: wrap; gap: 8px; }
  .side-name { font-size: 1.35rem; }
  .logout { margin-top: 0; }
  .logout button { width: auto; }
  .result-card { margin: 12px 0 0; }
  .zone-inner, .biz-card, .page-head, .footer-row, .danger-zone, .demo-inline {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 720px) {
  .slot { grid-template-columns: 78px 1fr; }
  .slot-what, .slot-meta, .edit { grid-column: 2; text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .app-main { padding: 18px 14px 48px; }
}
@media print {
  .sidebar, .no-print, .site-header, .site-footer, .flash, .editor, .edit { display: none !important; }
  .print-only { display: block; margin-bottom: 8px; }
  body, body.app-page { background: white; }
  .app { display: block; }
  .slot { break-inside: avoid; box-shadow: none; }
}
