:root {
  --paper: #EDF0EE;
  --card: #FFFFFF;
  --ink: #17302A;
  --ink-soft: #55675F;
  --line: #D3DBD7;
  --line-strong: #B5C2BC;
  --forest: #1E5A47;
  --forest-hover: #174A3A;
  --tag: #F4C542;
  --tag-soft: #FCF1CC;
  --alert: #B42318;
  --alert-soft: #FDECEA;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

/* Header */
.top {
  position: relative; z-index: 6;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 0 32px;
  min-height: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.025em;
}
.logo svg { flex: none; }
.app-nav { display: flex; gap: 4px; align-self: stretch; }
.app-nav a {
  display: flex; align-items: center;
  padding: 0 14px;
  color: var(--ink-soft); text-decoration: none; font-weight: 500;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.app-nav a:hover { color: var(--ink); }
.app-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--forest); }
.link-btn {
  background: none; border: 0; padding: 4px 0;
  font: inherit; font-size: 0.9375rem; color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 660px) minmax(300px, 380px);
  gap: 36px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px;
  align-items: start;
}

/* Steps */
.steps { position: sticky; top: 32px; }
.steps ol { list-style: none; margin: 0 0 20px; padding: 0; }
.steps a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; margin: 0 -10px;
  border-radius: 8px;
  color: var(--ink-soft); text-decoration: none; font-weight: 500;
}
.steps a:hover { color: var(--ink); background: #E2E7E4; }
.steps a.current { color: var(--ink); background: var(--card); }
.num {
  flex: none;
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border: 1.5px solid var(--line-strong); border-radius: 50%;
  font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink-soft); background: var(--card);
}
.done > h2 .num,
.steps a.done .num {
  border-color: var(--tag); background: var(--tag); color: var(--ink);
  font-size: 0;
}
.done > h2 .num::before,
.steps a.done .num::before { content: "✓"; font-size: 0.9375rem; }
.steps-hint { margin: 0 0 10px; font-size: 0.8125rem; color: var(--ink-soft); }

/* Form blocks */
.block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px 30px;
  margin-bottom: 20px;
}
.block h2 {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 22px;
  font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em;
}

.field { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; position: relative; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > legend, .label {
  display: block; padding: 0;
  margin: 0 0 7px;
  font-weight: 600; font-size: 0.9375rem;
}
.opt { font-weight: 400; color: var(--ink-soft); margin-left: 4px; }
.hint { margin: 7px 0 0; font-size: 0.875rem; color: var(--ink-soft); }
.hint:empty { display: none; }
#typ-hint { margin: -6px 0 20px; }

input[type="text"], input:not([type]), input[type="tel"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 11px 13px;
  min-height: 48px;
}
textarea { resize: vertical; line-height: 1.55; }
select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317302A' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--forest); outline-offset: -1px; border-color: var(--forest); }
::placeholder { color: #8A9A93; }

.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 16px; }
.row > .field:last-child { margin-bottom: 20px; }
.block > .row:last-child > .field { margin-bottom: 0; }

.affix { display: flex; align-items: stretch; }
.affix input { border-radius: 8px 0 0 8px; font-variant-numeric: tabular-nums; }
.affix span {
  display: grid; place-items: center;
  padding: 0 14px;
  border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 8px 8px 0;
  background: var(--paper); color: var(--ink-soft); white-space: nowrap;
}
.affix-big input { font-size: 1.375rem; font-weight: 600; min-height: 58px; }

/* Segmented choices */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center;
  min-height: 46px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  font-weight: 500; cursor: pointer; user-select: none;
}
.seg label:hover span { border-color: var(--forest); }
.seg input:checked + span { background: var(--forest); border-color: var(--forest); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 2px; }
.seg-penb span { min-width: 46px; justify-content: center; padding: 0; font-weight: 600; }

/* Checkboxes */
.check, .portal { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input, .portal input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--forest); flex: none; }
.check small, .portal small { display: block; color: var(--ink-soft); font-size: 0.875rem; }
.portals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.portal { padding: 16px; border: 1px solid var(--line-strong); border-radius: 10px; }
.portal:has(input:checked) { border-color: var(--forest); background: #F2F7F5; }
.block > .label { margin-top: 26px; }

/* Errors */
.field.invalid input, .field.invalid select, .field.invalid textarea,
.field.invalid .seg span, .field.invalid .dropzone, .field.invalid .portal { border-color: var(--alert); }
.field.invalid::after {
  content: attr(data-error);
  display: block; margin-top: 8px;
  color: var(--alert); font-size: 0.875rem; font-weight: 500;
}

/* Photos */
.field > .dropzone {
  display: grid; justify-items: center; gap: 2px;
  margin: 0; font-weight: 400; font-size: 1rem;
  padding: 34px 20px;
  border: 2px dashed var(--line-strong); border-radius: 12px;
  text-align: center; cursor: pointer;
  color: var(--ink-soft);
}
.dropzone strong { color: var(--ink); font-size: 1.0625rem; }
.dropzone:hover, .dropzone.over { border-color: var(--forest); background: #F2F7F5; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 2px solid var(--forest); outline-offset: 2px; }

.thumbs {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
}
.thumbs:empty { display: none; }
.thumb {
  position: relative; border-radius: 8px; overflow: hidden;
  background: var(--paper); cursor: grab;
  aspect-ratio: 4 / 3;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.dragging { opacity: 0.4; }
.thumb.drop-target { outline: 3px solid var(--tag); outline-offset: -3px; }
.thumb .tag { position: absolute; left: 8px; bottom: 8px; }
.thumb-btn {
  position: absolute; left: 8px; bottom: 8px;
  font: inherit; font-size: 0.8125rem; font-weight: 500;
  padding: 4px 9px; border: 0; border-radius: 6px;
  background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer;
}
.thumb-del {
  position: absolute; right: 6px; top: 6px;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(23,48,42,.75); color: #fff; font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.thumb-btn:hover, .thumb-del:hover { filter: brightness(1.1); }

/* Key-tag label: the yellow tag realtors hang on keys */
.tag {
  display: inline-block;
  padding: 3px 10px 3px 20px;
  background:
    radial-gradient(circle at 10px 50%, var(--card) 3px, transparent 3.5px),
    var(--tag);
  clip-path: polygon(7px 0, 100% 0, 100% 100%, 7px 100%, 0 50%);
  border-radius: 0 4px 4px 0;
  color: var(--ink); font-size: 0.8125rem; font-weight: 600;
}
.tag-big { font-size: 1rem; padding: 6px 16px 6px 28px;
  background: radial-gradient(circle at 14px 50%, var(--paper) 4px, transparent 4.5px), var(--tag);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); }

/* Submit bar */
.bar {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: 20px;
  margin-top: 4px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line); border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 24px -12px rgba(23, 48, 42, 0.25);
}
.bar p { margin: 0; flex: 1; font-size: 0.9375rem; color: var(--ink-soft); }
.bar p.ready { color: var(--forest); font-weight: 600; }
.bar p.error { color: var(--alert); font-weight: 500; }
.primary {
  font: inherit; font-weight: 600; font-size: 1rem;
  min-height: 50px; padding: 0 26px;
  border: 0; border-radius: 10px;
  background: var(--forest); color: #fff; cursor: pointer; white-space: nowrap;
}
.primary:hover { background: var(--forest-hover); }
.primary:disabled { opacity: 0.6; cursor: progress; }

/* Preview */
.preview { position: sticky; top: 32px; }
.pv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.pv-head .label { margin: 0; }
.pv-tabs { display: flex; background: #E0E6E3; border-radius: 8px; padding: 3px; }
.pv-tabs button {
  font: inherit; font-size: 0.8125rem; font-weight: 500;
  border: 0; background: none; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--ink-soft);
}
.pv-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); }

.pv-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pv-img { aspect-ratio: 4 / 3; background: #DCE3DF; position: relative; }
.pv-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); font-size: 0.875rem; }
.pv-count { position: absolute; right: 10px; bottom: 10px; background: rgba(23,48,42,.8); color: #fff; font-size: 0.75rem; padding: 3px 8px; border-radius: 5px; }
.pv-body { padding: 16px 18px 18px; }
.pv-title { margin: 0 0 4px; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.pv-addr { margin: 0 0 12px; color: var(--ink-soft); font-size: 0.875rem; }
.pv-price { margin: 0 0 14px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pv-price small { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }
.pv-params { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 14px; font-size: 0.875rem; }
.pv-params dt { color: var(--ink-soft); }
.pv-params dd { margin: 0; font-weight: 500; }
.pv-text { margin: 0; font-size: 0.875rem; color: var(--ink); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pv-empty { color: var(--ink-soft); font-style: italic; }

.fb-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px 10px; }
.fb-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.875rem; }
.fb-head strong { display: block; font-size: 0.9375rem; }
.fb-head small { color: var(--ink-soft); font-size: 0.8125rem; }
.fb-text { padding: 0 16px 12px; font-size: 0.9375rem; white-space: pre-line; margin: 0; }
.fb-more { color: var(--ink-soft); font-weight: 600; }
.fb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.fb-grid > :first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.fb-grid > div { position: relative; aspect-ratio: 1; background: #DCE3DF; }
.fb-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-grid .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 1.5rem; font-weight: 600; }

/* Potvrzení po odeslání */
.sent-view { max-width: 640px; margin: 64px auto; padding: 0 16px; }
.sent-view h2 { font-size: 1.75rem; letter-spacing: -0.02em; margin: 18px 0 20px; line-height: 1.25; }
.done-list { list-style: none; padding: 0; margin: 0 0 28px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.done-list li, .h-portals li { padding: 14px 20px; display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.done-list li + li, .h-portals li + li { border-top: 1px solid var(--line); }
.done-list strong, .h-portals strong { font-weight: 600; padding-top: 3px; }
.done-list small, .h-portals small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 0.8125rem; }
.done-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
a.primary { display: inline-flex; align-items: center; text-decoration: none; }

/* Stavové štítky */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 500; white-space: nowrap;
  color: var(--ink-soft); background: var(--paper);
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.st-aktivni { color: var(--forest); background: #E3EFEA; }
.chip.st-castecne { color: var(--forest); background: #EEF4E3; }
.chip.st-ceka { color: #7A5E00; background: var(--tag-soft); }
.chip.st-chyba { color: var(--alert); background: var(--alert-soft); }

/* Moje inzeráty */
.history { max-width: 920px; margin: 0 auto; padding: 36px 32px 64px; }
.h-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.h-head h1 { font-size: 1.75rem; letter-spacing: -0.02em; margin: 0; }
.h-notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; background: #E3EFEA; color: var(--forest); font-weight: 500; }
.h-notice.error { background: var(--alert-soft); color: var(--alert); }
.h-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.h-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.h-item[open] { border-color: var(--line-strong); }
.h-item summary {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) auto 20px; gap: 20px; align-items: center;
  padding: 12px 20px 12px 12px; cursor: pointer; list-style: none;
}
.h-item summary::-webkit-details-marker { display: none; }
.h-item summary:hover { background: #F7F9F8; }
.h-item summary:focus-visible { outline-offset: -2px; }
.h-chev { width: 10px; height: 10px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg) translate(-2px, -2px); justify-self: center; }
.h-item[open] .h-chev { transform: rotate(-135deg) translate(-2px, -2px); }
.h-img { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #DCE3DF; }
.h-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h-title { margin: 0 0 2px; font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.h-meta { margin: 0; color: var(--ink-soft); font-size: 0.875rem; }
.h-price { margin: 6px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.h-price:empty { display: none; }

.h-detail { border-top: 1px solid var(--line); padding: 20px; display: grid; gap: 20px; }
.h-photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.h-photos img { height: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; flex: none; }
.h-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
.h-cols h3 { margin: 0 0 10px; font-size: 0.9375rem; font-weight: 600; }
.h-portals { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.h-portals li { padding: 12px 14px; grid-template-columns: 84px 1fr; }
.h-cols .pv-params { margin-bottom: 8px; }
.h-addr { margin: 0; font-size: 0.875rem; color: var(--ink-soft); }
.h-desc { margin: 0; font-size: 0.9375rem; white-space: pre-line; max-width: 70ch;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.h-actions { display: flex; gap: 12px; align-items: center; }
.h-actions .primary { min-height: 44px; padding: 0 22px; }
.danger-btn {
  font: inherit; font-weight: 600; font-size: 0.9375rem;
  min-height: 44px; padding: 0 20px; border-radius: 10px; cursor: pointer;
  background: var(--card); color: var(--alert); border: 1px solid #E8B4AE;
}
.danger-btn:hover { background: var(--alert-soft); }
.danger-btn:disabled { opacity: 0.6; cursor: progress; }
.h-empty { background: var(--card); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 40px 32px; text-align: center; }
.h-empty p { margin: 0 auto 20px; max-width: 46ch; color: var(--ink-soft); }

/* Nástroje v hlavičce seznamu */
.h-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.h-filter select { min-height: 50px; min-width: 220px; }
.h-sub { margin: 4px 0 0; color: var(--ink-soft); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.secondary-btn {
  font: inherit; font-weight: 600; font-size: 0.9375rem;
  min-height: 44px; padding: 0 20px; border-radius: 10px; cursor: pointer;
  background: var(--card); color: var(--forest); border: 1px solid var(--line-strong);
}
.secondary-btn:hover { border-color: var(--forest); background: #F2F7F5; }
.secondary-btn:disabled, .danger-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Účty */
.acc-item summary { grid-template-columns: 48px minmax(0, 1fr) auto 20px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: #DDE8E3; color: var(--forest); font-weight: 700; font-size: 1rem;
}
.acc-item.is-blocked .avatar { background: var(--alert-soft); color: var(--alert); }
.acc-item.is-blocked .h-title { color: var(--ink-soft); }
.acc-item .h-meta + .h-meta { margin-top: 2px; font-size: 0.8125rem; }
.you { font-weight: 400; color: var(--ink-soft); }
.acc-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.acc-count { font-size: 0.875rem; color: var(--ink-soft); white-space: nowrap; }
.acc-item h3 { margin: 0 0 10px; font-size: 0.9375rem; font-weight: 600; }
.acc-form label input { margin-top: 7px; font-weight: 400; }
.acc-form .row { margin-bottom: 4px; }
.acc-section { border-top: 1px solid var(--line); padding-top: 18px; }
.acc-section .hint { margin: -4px 0 10px; }
.acc-inline { display: flex; gap: 10px; max-width: 460px; }
.acc-inline input { flex: 1; }
.acc-item .h-actions { border-top: 1px solid var(--line); padding-top: 18px; }

/* Přihlášení přes Facebook */
.fb-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; border-radius: 10px;
  background: #1877F2; color: #fff; text-decoration: none;
  font-weight: 600; font-size: 1rem;
}
.fb-btn:hover { background: #166FE5; }
.fb-login .hint { margin: 8px 0 0; text-align: center; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ink-soft); font-size: 0.875rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fb-who { margin: -8px 0 18px; color: var(--ink-soft); }
.fb-who strong { color: var(--ink); }

/* Potvrzovací okno */
.confirm {
  width: min(440px, calc(100% - 32px));
  padding: 26px 26px 22px;
  border: 0; border-radius: 14px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 24px 60px -12px rgba(23, 48, 42, 0.35);
}
.confirm::backdrop { background: rgba(23, 48, 42, 0.45); }
.confirm h2 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -0.015em; }
.confirm p { margin: 0 0 22px; color: var(--ink-soft); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confirm-actions .primary { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }

/* Nastavení */
.settings { max-width: 820px; }
.set-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 26px 28px 28px; margin-bottom: 20px;
}
.set-card h2 { margin: 0 0 4px; font-size: 1.25rem; letter-spacing: -0.015em; }
.set-lead { margin: 0 0 20px; }
.conn { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.conn + .conn { margin-top: 12px; }
.conn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.conn-head strong { font-size: 1.0625rem; }
.conn-text { margin: 6px 0 0; color: var(--ink-soft); font-size: 0.9375rem; max-width: 62ch; }
.conn-warn { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--tag-soft); color: #6B5200; font-size: 0.9375rem; }
.conn-pages { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.conn-pages legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 0.9375rem; }
.conn-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.conn-actions .primary, .conn-actions .secondary-btn, .conn-actions .danger-btn { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }
a.secondary-btn { display: inline-flex; align-items: center; text-decoration: none; }
.set-card > .secondary-btn, .set-card > .primary { margin-top: 4px; }
.set-group { border: 0; border-top: 1px solid var(--line); padding: 20px 0 4px; margin: 0; }
.set-group:first-of-type { border-top: 0; padding-top: 0; }
.set-group legend { padding: 0; font-weight: 700; font-size: 1rem; float: left; width: 100%; margin-bottom: 8px; }
.set-group legend + * { clear: both; }
.set-group > .hint { margin: 0 0 14px; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { flex: 1; background: var(--paper); color: var(--ink-soft); font-size: 0.875rem; }
.h-portals a, .done-list a { color: var(--forest); font-weight: 600; margin-left: 4px; }

/* Hlavička formuláře */
.form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 4px 0 18px; }
.form-head h1 { margin: 0; font-size: 1.75rem; letter-spacing: -0.02em; }

/* Účet v hlavičce */
.account { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 0.9375rem; }
.account span { font-weight: 500; }

/* Přihlášení */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 400px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px;
}
.login-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.025em; margin-bottom: 28px; }
.login-card h1 { margin: 0 0 20px; font-size: 1.5rem; letter-spacing: -0.02em; }
.login-card .primary { width: 100%; margin-top: 4px; }
.login-card > .hint { margin-top: 10px; }
.login-switch { margin: 18px 0 0; text-align: center; font-size: 0.9375rem; }
.login-switch .link-btn { color: var(--forest); font-weight: 600; font-size: inherit; }
.login-error { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: var(--alert-soft); color: var(--alert); font-size: 0.9375rem; font-weight: 500; }

/* Responsive */
.logo, .app-nav a, .account, .account .link-btn { white-space: nowrap; }
@media (max-width: 1000px) {
  .top { gap: 20px; padding: 0 20px; }
  .app-nav a { padding: 0 10px; }
  .account span { display: none; }
}
@media (max-width: 1180px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); }
  .preview { grid-column: 2; position: static; }
}
@media (max-width: 760px) {
  .top { padding: 10px 16px 0; gap: 0 12px; flex-wrap: wrap; min-height: 0; }
  .logo { font-size: 1.0625rem; }
  .logo svg { width: 28px; height: 28px; }
  .app-nav { order: 3; width: 100%; height: 44px; margin: 4px -14px 0; }
  .account { gap: 10px; font-size: 0.875rem; }
  .account span { display: none; }
  .history { padding: 24px 16px 48px; }
  .h-head h1, .form-head h1 { font-size: 1.375rem; }
  .h-item summary { grid-template-columns: 88px minmax(0, 1fr) 16px; gap: 14px; padding-right: 14px; }
  .h-item summary .chip { grid-column: 2; grid-row: 2; justify-self: start; }
  .h-item summary .h-img { grid-row: span 2; }
  .h-item summary .h-chev { grid-column: 3; grid-row: 1 / span 2; }
  .h-detail { padding: 16px; }
  .h-cols { grid-template-columns: 1fr; }
  .login-card { padding: 24px 20px; }
  .set-card { padding: 20px 18px 22px; }
  .copy-row { flex-direction: column; }
  .h-head { flex-wrap: wrap; }
  .h-tools { width: 100%; }
  .h-filter, .h-filter select { flex: 1; min-width: 0; width: 100%; }
  .acc-item summary { grid-template-columns: 40px minmax(0, 1fr) 16px; }
  .acc-item summary .avatar { width: 40px; height: 40px; font-size: 0.875rem; grid-row: span 2; }
  .acc-chips { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  .acc-item summary .h-chev { grid-column: 3; grid-row: 1 / span 2; }
  .acc-inline { flex-direction: column; }
  .h-actions { flex-wrap: wrap; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 0 16px 16px; gap: 0; }
  .steps {
    top: 0; z-index: 5;
    margin: 0 -16px 16px; padding: 10px 16px;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .steps ol { display: flex; gap: 4px; overflow-x: auto; margin: 0; scrollbar-width: none; }
  .steps a { margin: 0; padding: 6px 10px 6px 6px; white-space: nowrap; font-size: 0.875rem; gap: 8px; }
  .steps .num { width: 24px; height: 24px; font-size: 0.75rem; }
  .steps-hint { display: none; }
  .block { padding: 22px 18px 24px; }
  .portals { grid-template-columns: 1fr; }
  .preview { grid-column: 1; margin-top: 24px; }
  .bar { margin: 4px -16px 0; border-radius: 0; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .bar .primary { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .seg span, .portal, .steps a { transition: background-color .15s, border-color .15s, color .15s; }
}
