/* Sunscanner — CI v2 (tokeny z docs/design/HANDOFF.md §4, jako landing/site.css).
   Žádná amber: tady se v aplikaci neplatí. */
:root {
  --rs-blue: #0F76B8; --rs-blue-dark: #0B5F94; --rs-blue-pale: #E4F1FA;
  --rs-green: #0F7A4A; --rs-green-light: #3FD48A; --rs-green-pale: #E3F3EA;
  --ink: #22201B; --ink-80: #4F4A41; --ink-60: #6B6558;
  --hairline: #DDD8CE; --paper-dim: #ECE8E0; --paper: #F5F3EE; --surface: #FFFFFF;
  --error: #B02A20; --warning: #9A7212;
  --sun: #E0B62A; --sun-pale: #FFF6D9; --sun-ink: #4A3C00;
  --brand-sun: #D9660B; --brand-sun-dark: #F5A524; --brand-ink: #2B2925; /* jen logo */
  --r-tile: 14px; --r-block: 12px; --r-pill: 999px;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--rs-blue-dark); text-underline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 28px; font-weight: 800; line-height: 1.2; margin: 8px 0 8px; }
h2 { font-size: 19px; font-weight: 800; margin: 40px 0 12px; }
h3 { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-60); margin-bottom: 10px; }
.lead { color: var(--ink-80); max-width: 680px; margin-bottom: 20px; }
.muted { color: var(--ink-60); }
.small { font-size: 13px; }
.status { padding: 40px 0; color: var(--ink-60); }

/* Hlavička */
.top { background: var(--surface); border-bottom: 1px solid var(--hairline); }
.top-in { display: flex; align-items: center; height: 58px; gap: 16px; }
/* Logo (2026-11-10, návrh 09 „Rodina Scanner“): geometrie loga RoofScanneru, vrstvy antracit,
   slunce oranžové. Kopie glyfu i ve favicon.svg. */
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--brand-ink); }
.brand svg { width: 30px; height: 30px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand .t { stroke: var(--brand-ink); } .brand .m { stroke: #5A564E; } .brand .b { stroke: #8A847A; } .brand .s { stroke: var(--brand-sun); }
.brand-sun { color: var(--brand-sun); }
.office { margin-left: auto; color: var(--ink-80); font-weight: 600; font-size: 14px; text-align: right; }
main { padding: 24px 16px 48px; }

/* Ovládací prvky */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-tile); }
.form { padding: 22px; max-width: 620px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 700; font-size: 14px; }
.field small, .check small { color: var(--ink-60); font-size: 13px; }
input:not([type]), input[type=text] { font: inherit; padding: 11px 14px; border: 1.5px solid var(--hairline); border-radius: var(--r-block); background: var(--surface); color: var(--ink); min-height: 46px; }
input:focus-visible, .btn:focus-visible, summary:focus-visible, .back:focus-visible { outline: 3px solid var(--rs-blue-pale); outline-offset: 1px; border-color: var(--rs-blue); }
.check { display: flex; gap: 10px; align-items: baseline; font-weight: 600; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--rs-blue); width: 18px; height: 18px; position: relative; top: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 22px; border-radius: var(--r-pill); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; text-align: center; }
.btn-blue { background: var(--rs-blue); color: #fff; }
.btn-blue:hover { background: var(--rs-blue-dark); }
.btn-blue:disabled { background: var(--paper-dim); color: var(--ink-60); cursor: default; }
.btn-ghost { background: var(--surface); color: var(--rs-blue-dark); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--rs-blue); }
.btn-sm { min-height: 38px; padding: 7px 16px; font-size: 14px; }
.back { background: none; border: 0; font: inherit; font-weight: 700; font-size: 14px; color: var(--rs-blue-dark); cursor: pointer; padding: 4px 0; }
.error { color: var(--error); font-weight: 600; font-size: 14px; }
.note { font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: var(--r-block); margin-bottom: 14px; }
.side .note { margin: 0; }
.note.warn { background: var(--sun-pale); color: var(--sun-ink); }

.brand-opts { border-top: 1px solid var(--hairline); padding-top: 14px; }
.brand-opts summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--rs-blue-dark); }
.brand-opts[open] { display: flex; flex-direction: column; gap: 16px; }
.brand-opts[open] summary { margin-bottom: 2px; }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-row img { width: 54px; height: 54px; object-fit: contain; border: 1px solid var(--hairline); border-radius: 8px; background: #fff; }

.candidates { display: flex; flex-direction: column; gap: 8px; }
.candidates p { font-size: 14px; font-weight: 600; color: var(--ink-80); }
.candidates button { text-align: left; font: inherit; font-size: 15px; padding: 10px 14px; border: 1.5px solid var(--hairline); border-radius: var(--r-block); background: var(--surface); cursor: pointer; color: var(--ink); }
.candidates button:hover { border-color: var(--rs-blue); }

/* Mapa parcel */
.map-layout, .result { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.map { position: relative; aspect-ratio: 1; border-radius: var(--r-tile); overflow: hidden; background: var(--paper-dim); }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.parcel { fill: rgba(255,255,255,0); stroke: rgba(255,255,255,.85); stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.parcel:hover { fill: rgba(255,255,255,.22); }
.parcel:focus { outline: none; }
.parcel:focus-visible { stroke: #29D3F5; stroke-width: 3.5; }
.parcel.sel { fill: rgba(63,212,138,.38); stroke: var(--rs-green-light); stroke-width: 3; }
.parcel.sel:hover { fill: rgba(63,212,138,.5); }
.house { fill: rgba(13,43,64,.55); stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
/* velikost písma a obrysu nastavuje app.js v metrech výřezu (CSS px by v SVG byly metry) */
.plabel { font-family: var(--font); font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.7); pointer-events: none; text-anchor: middle; dominant-baseline: middle; }
.side { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sel { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sel li { display: flex; justify-content: space-between; gap: 10px; }
.sel li span:last-child { color: var(--ink-60); white-space: nowrap; }
.sum { font-weight: 800; border-top: 1px solid var(--hairline); padding-top: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-60); border-top: 1px solid var(--hairline); padding-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-house { background: rgba(13,43,64,.75); }
.lg-sel { background: rgba(63,212,138,.6); border: 2px solid var(--rs-green); }
.lg-par { border: 2px solid var(--ink-60); }

/* Čekání */
.wait { text-align: center; padding: 60px 0; display: flex; flex-direction: column; align-items: center; }
.wait .lead { margin: 0 auto 12px; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid var(--sun-pale); border-top-color: var(--sun); animation: spin 1s linear infinite; margin-bottom: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Výsledek */
.preview { display: block; border-radius: var(--r-tile); overflow: hidden; border: 1px solid var(--hairline); background: var(--surface); }
.preview img { display: block; width: 100%; height: auto; }
.big { font-size: 40px; font-weight: 800; color: var(--sun-ink); line-height: 1.1; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.facts dt { color: var(--ink-60); }
.facts dd { font-weight: 700; text-align: right; }

/* Historie */
.history { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.history li { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-tile); overflow: hidden; display: flex; flex-direction: column; }
.history img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--paper-dim); }
.history .h-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.history .h-addr { font-weight: 700; }
.history .h-links { display: flex; gap: 14px; margin-top: 4px; font-weight: 700; }

.foot { color: var(--ink-60); font-size: 13px; border-top: 1px solid var(--hairline); padding-top: 16px; padding-bottom: 32px; }

@media (max-width: 860px) {
  .map-layout, .result { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
