/* =====================================================================
 * Konfigurátor pergoly – vzhled (sdílený oběma stránkami)
 * Barva zvýraznění a pozadí scény se nastavuje v config.js → theme.
 * ===================================================================== */
:root {
  --accent: #1f5a43;
  --accent-soft: color-mix(in srgb, var(--accent) 8%, #fff);
  --accent-mid: color-mix(in srgb, var(--accent) 32%, #fff);
  --accent-deep: color-mix(in srgb, var(--accent) 84%, #000);
  --ink: #1b2420;
  --muted: #66716b;
  --text-2: #4b564f;
  --line: #e6e1d6;
  --bg: #f3efe7;
  --panel: #fbf9f4;
  --card: #fff;
  --glass: #2a8fa5;
  --danger: #b3392a;
  --screen: #d9822b;
  --radius: 16px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sky: linear-gradient(180deg, #c4d8e4 0%, #dfe9ec 45%, #eef0e9 70%, #f1eee4 100%);
  --panel-w: 420px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.noscript { margin: 0; padding: 24px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Rozložení ---------- */
.app { display: grid; grid-template-columns: var(--panel-w) minmax(0, 1fr); height: 100dvh; }
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-right: 1px solid var(--line); position: relative; z-index: 1; }
.stage { position: relative; min-width: 0; background: var(--sky); overflow: hidden; }

/* ---------- Hlavička panelu ---------- */
.panel-head { padding: 22px 24px 14px; }
.brand { display: flex; gap: 14px; align-items: center; }
.mark { width: 46px; height: 46px; flex: none; border-radius: 13px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.mark svg { width: 27px; height: 27px; }
.eyebrow { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 27px; line-height: 1.08; }

/* Postup: 1 Konfigurace → 2 Cena */
.track { list-style: none; display: flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.track li, .track a { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.track li + li::before { content: ''; width: 30px; height: 1px; background: var(--line); margin-right: 2px; }
.track .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: #fff; border: 1.5px solid var(--line); }
.track .n svg { width: 12px; height: 12px; }
.track .is-current { color: var(--ink); }
.track .is-current .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.track .is-done { color: var(--accent); }
.track .is-done .n { background: var(--accent-soft); border-color: var(--accent-mid); color: var(--accent); }
.track a:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }

.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 20px; }

/* ---------- Kroky (rozbalovací karty) ---------- */
.steps { display: grid; gap: 10px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.2s, box-shadow 0.25s; }
.step[data-open=true] { border-color: var(--accent-mid); box-shadow: 0 12px 30px -20px color-mix(in srgb, var(--accent) 70%, transparent); }
.step-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); }
.step-num { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); transition: background 0.2s, color 0.2s; }
.step[data-open=true] .step-num { background: var(--accent); color: #fff; }
.step-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.step-title { font-size: 15px; font-weight: 700; }
.step-value { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform 0.25s; }
.chev svg { width: 100%; height: 100%; display: block; }
.step[data-open=true] .chev { transform: rotate(180deg); }
.step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.step[data-open=true] .step-body { grid-template-rows: 1fr; }
.step-inner { min-height: 0; overflow: hidden; }
.step-content { padding: 2px 18px 18px; }
.hint { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.sub { margin: 20px 0 8px; font-size: 12.5px; font-weight: 700; }
.gap { height: 12px; }
.stack { display: grid; gap: 8px; }

/* Typ pergoly: na domě / samostatně stojící */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.duo-btn { display: grid; align-content: start; justify-items: start; gap: 2px; min-width: 0; padding: 11px 12px 10px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color 0.15s, background 0.15s; }
.duo-btn:hover { border-color: var(--accent-mid); }
.duo-btn.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.duo-icon { display: block; width: 46px; height: 31px; margin-bottom: 5px; color: var(--accent); }
.duo-icon svg { width: 100%; height: 100%; display: block; }
.duo-btn b { font-size: 13px; line-height: 1.25; }
.duo-btn small { font-size: 11.5px; line-height: 1.3; color: var(--muted); }

/* Volby vybrané strany (výplň + stínění) */
.side-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fcfbf8; }
.side-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.side-panel .segmented { margin-bottom: 10px; }
.side-panel .segmented button { padding: 8px 6px; font-size: 13px; }
.side-panel .toggle { background: #fff; }
.next { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.next span { display: inline-flex; }
.next svg { width: 16px; height: 16px; }
.next:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Předvolby rozměrů ---------- */
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.preset { display: grid; justify-items: center; gap: 1px; padding: 10px 6px 9px; border-radius: 12px; border: 1px solid var(--line); background: #fff; transition: border-color 0.15s, background 0.15s; }
.preset:hover { border-color: var(--accent-mid); }
.preset.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.preset-icon { width: 48px; height: 34px; display: flex; align-items: center; justify-content: center; margin-bottom: 5px; }
.preset-icon i { display: block; border: 2px solid var(--accent); border-radius: 3px; background: color-mix(in srgb, var(--accent) 14%, #fff); }
.preset b { font-size: 13px; }
.preset small { font-size: 11.5px; color: var(--muted); }

/* ---------- Posuvníky ---------- */
.slider { margin-bottom: 16px; }
.slider-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; }
.slider-top label { font-weight: 500; color: var(--text-2); }
.num-wrap { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.num-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.num { width: 52px; padding: 0; border: 0; outline: none; background: none; text-align: right; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.num::-webkit-outer-spin-button, .num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-wrap i { font-style: normal; font-size: 12px; color: var(--muted); }
.slider-scale { display: flex; justify-content: space-between; margin-top: 1px; font-size: 11px; color: var(--muted); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; --p: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--accent) var(--p), #e7e2d8 var(--p)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: #e7e2d8; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-mid), 0 2px 6px rgba(0, 0, 0, 0.18); }

/* ---------- Barvy ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.swatch { display: grid; justify-items: center; align-content: start; gap: 7px; min-width: 0; padding: 10px 6px 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color 0.15s, background 0.15s; }
.swatch:hover { border-color: var(--accent-mid); }
.swatch-chip { width: 40px; height: 40px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14), inset 0 -10px 14px rgba(0, 0, 0, 0.1); }
.swatch-name { max-width: 100%; font-size: 12px; line-height: 1.2; color: var(--text-2); text-align: center; }
.swatch.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.swatch.on .swatch-name { color: var(--ink); font-weight: 700; }

/* ---------- Střecha ---------- */
.cards { display: grid; gap: 8px; }
.card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color 0.15s, background 0.15s; }
.card:hover { border-color: var(--accent-mid); }
.card-sw { width: 44px; height: 44px; flex: none; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.card-text b { display: block; font-size: 13.5px; font-weight: 700; }
.card-text small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }

.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: #efebe2; }
.segmented button { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border-radius: 9px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.segmented i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22); }
.segmented button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }

/* ---------- Přepínače ---------- */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: background 0.15s, border-color 0.15s; }
.toggle-text b { display: block; font-weight: 700; }
.toggle-text small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.switch { position: relative; width: 42px; height: 24px; flex: none; border-radius: 99px; background: #d4cfc3; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.toggle.on { border-color: var(--accent-mid); background: var(--accent-soft); }
.toggle.on .switch { background: var(--accent); }
.toggle.on .switch::after { transform: translateX(18px); }

/* ---------- Půdorys ---------- */
.plan { position: relative; height: 200px; margin-bottom: 12px; border-radius: 14px; background: radial-gradient(circle, #d9d3c4 1px, transparent 1.3px) 0 0 / 14px 14px, #f3efe6; }
.plan-box { position: absolute; left: 50%; top: 50%; width: 44%; height: 104px; transform: translate(-50%, -50%); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.78); border: 1px dashed #bdb6a5; }
.plan-btn { position: absolute; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.plan-btn:disabled { cursor: not-allowed; }
.plan-btn:disabled:hover .name { color: inherit; }
.plan-btn[data-state=free]:disabled .name { opacity: 0.6; }   /* přední strana v kotvení: vstup, zeď domu na ní být nemůže */
.plan-btn[aria-pressed=true] { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.plan-btn[aria-pressed=true] .name { color: var(--accent); font-weight: 700; }
.plan.dim .plan-btn:not(:hover) { opacity: 0.55; }
.plan-btn:hover .name { color: var(--ink); }
.plan-btn .edge { position: absolute; }
.plan-btn[data-side=back]  { left: 0; right: 0; top: -36px; height: 36px; }
.plan-btn[data-side=front] { left: 0; right: 0; bottom: -36px; height: 36px; }
.plan-btn[data-side=left]  { top: 0; bottom: 0; left: -66px; width: 66px; }
.plan-btn[data-side=right] { top: 0; bottom: 0; right: -66px; width: 66px; }
.plan-btn[data-side=back] .edge  { left: 0; right: 0; bottom: 0; border-top: 4px solid; }
.plan-btn[data-side=front] .edge { left: 0; right: 0; top: 0; border-top: 4px solid; }
.plan-btn[data-side=left] .edge  { top: 0; bottom: 0; right: 0; border-left: 4px solid; }
.plan-btn[data-side=right] .edge { top: 0; bottom: 0; left: 0; border-left: 4px solid; }
.plan-btn[data-side=back] .name  { margin-bottom: 8px; }
.plan-btn[data-side=front] .name { margin-top: 8px; }
.plan-btn[data-side=left] .name  { margin-right: 8px; }
.plan-btn[data-side=right] .name { margin-left: 8px; }

/* stavy stran: dům = šrafa, posuvná = dvojitá linka (dvě tabule), pevná = plná, otevřeno/volná = tečkovaná */
.plan-btn[data-state=house] .edge { border: 0; background: repeating-linear-gradient(135deg, #7d7566 0 2px, #cbc3b2 2px 5px); }
.plan-btn[data-side=back][data-state=house] .edge, .plan-btn[data-side=front][data-state=house] .edge { height: 10px; }
.plan-btn[data-side=left][data-state=house] .edge, .plan-btn[data-side=right][data-state=house] .edge { width: 10px; }
.plan-btn[data-state=sliding] .edge { border-style: double; border-color: var(--glass); }
.plan-btn[data-side=back][data-state=sliding] .edge, .plan-btn[data-side=front][data-state=sliding] .edge { border-top-width: 7px; }
.plan-btn[data-side=left][data-state=sliding] .edge, .plan-btn[data-side=right][data-state=sliding] .edge { border-left-width: 7px; }
.plan-btn[data-state=fixed] .edge { border-style: solid; border-color: #74c4d6; }
.plan-btn[data-state=open] .edge, .plan-btn[data-state=free] .edge { border-style: dotted; border-color: #b9b19f; }

/* stínění: oranžová přerušovaná čára těsně vně hrany (kombinuje se s jakoukoli výplní) */
.plan-btn[data-screen="1"] .edge::after { content: ''; position: absolute; }
.plan-btn[data-side=front][data-screen="1"] .edge::after { left: 0; right: 0; top: 7px; border-top: 3px dashed var(--screen); }
.plan-btn[data-side=back][data-screen="1"] .edge::after { left: 0; right: 0; bottom: 7px; border-top: 3px dashed var(--screen); }
.plan-btn[data-side=left][data-screen="1"] .edge::after { top: 0; bottom: 0; right: 7px; border-left: 3px dashed var(--screen); }
.plan-btn[data-side=right][data-screen="1"] .edge::after { top: 0; bottom: 0; left: 7px; border-left: 3px dashed var(--screen); }
.plan-btn[data-side=front][data-screen="1"] .name { margin-top: 20px; }
.plan-btn[data-side=back][data-screen="1"] .name { margin-bottom: 20px; }
.plan-btn[data-side=left][data-screen="1"] .name { margin-right: 18px; }
.plan-btn[data-side=right][data-screen="1"] .name { margin-left: 18px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 4px solid; }
.legend i[data-state=house] { height: 8px; border: 0; background: repeating-linear-gradient(135deg, #7d7566 0 2px, #cbc3b2 2px 5px); }
.legend i[data-state=sliding] { border-top: 7px double var(--glass); }
.legend i[data-state=fixed] { border-color: #74c4d6; }
.legend i[data-state=open], .legend i[data-state=free] { border-top: 4px dotted #b9b19f; }
.legend i[data-state=screen] { border-top: 3px dashed var(--screen); }

/* ---------- Dlouhé texty z configu se zalamují, nikdy nepřetečou ven z karty ---------- */
.step-title, .hint, .sub, .next, .legend span,
.preset b, .preset small, .swatch-name, .card-text, .toggle-text, .duo-btn b, .duo-btn small, .side-title,
.pline-text, .spec dd, .spec dt, .trow span, .disclaimer { overflow-wrap: anywhere; }
.preset, .card-text, .toggle-text, .pline-text, .spec dd, .duo-btn { min-width: 0; }

/* ---------- Patička panelu ---------- */
.panel-foot { display: grid; gap: 12px; padding: 14px 20px 18px; border-top: 1px solid var(--line); background: var(--panel); }
.foot-summary { margin: 0; display: grid; gap: 1px; min-width: 0; font-size: 12.5px; }
.foot-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#summaryText { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 8px 18px; text-align: center; line-height: 1.2; border-radius: 14px; background: var(--accent); color: #fff; text-decoration: none; font-size: 16px; font-weight: 700; box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--accent) 90%, transparent); transition: background 0.15s, transform 0.15s; }
.cta:hover { background: var(--accent-deep); transform: translateY(-1px); }
.cta-icon { display: inline-flex; flex: none; }
.cta svg { width: 20px; height: 20px; }

/* ---------- 3D scéna ---------- */
.viewport, .viewport canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.no-webgl { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 32px; text-align: center; color: var(--text-2); background: var(--bg); }
.stage-nogl .toolbar, .stage-nogl .stage-hint { display: none; }
.labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.label { position: absolute; left: 0; top: 0; padding: 2px 8px; border-radius: 6px; white-space: nowrap; font-size: 11px; font-weight: 700; line-height: 1.4; color: #fff; background: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); will-change: transform; }
.label.tag { font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); background: rgba(251, 249, 244, 0.94); border: 1px solid var(--line); box-shadow: none; }

.toolbar { position: absolute; top: 16px; right: 16px; max-width: calc(100% - 32px); display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(251, 249, 244, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.3); }
.views { display: flex; flex-wrap: wrap; gap: 2px; }
.views button { height: 32px; padding: 0 13px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.views button:hover { color: var(--ink); }
.views button[aria-checked=true] { background: var(--accent); color: #fff; }
.rotate { position: relative; width: 36px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--ink); margin-left: 3px; }
.rotate::before { content: ''; position: absolute; left: -3px; top: 7px; bottom: 7px; width: 1px; background: var(--line); }
.rotate:hover { background: var(--accent-soft); }
.rotate svg { width: 12px; height: 12px; fill: currentColor; }
.stage-hint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 32px); margin: 0; padding: 7px 14px; border-radius: 10px; font-size: 12px; font-weight: 500; line-height: 1.35; text-align: center; color: #fff; background: rgba(27, 36, 32, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; transition: opacity 0.5s; }
.stage-hint.gone { opacity: 0; }

/* =====================================================================
 * Stránka se souhrnem a cenou
 * ===================================================================== */
.block { margin: 0 0 12px; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.block h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 22px; }

.specs { margin: 0; }
.spec { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 3px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec:last-child { border-bottom: 0; padding-bottom: 2px; }
.spec dt { grid-column: 1; grid-row: 1; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.spec .edit { grid-column: 2; grid-row: 1; }
.spec dd { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.spec dd b { font-weight: 700; }
.spec dd small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.spec ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-weight: 700; }
.dot { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); }
.edit { font-size: 12.5px; font-weight: 700; color: var(--accent); text-decoration: none; }
.edit:hover { text-decoration: underline; text-underline-offset: 3px; }

.pgroup h3 { margin: 18px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); }
.pline { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.pline-text span { display: block; font-weight: 500; }
.pline-text small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.pline-amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pline-amount.incl { font-weight: 500; color: var(--muted); }

.totals { display: grid; gap: 6px; margin-top: 16px; padding-top: 10px; border-top: 2px solid var(--ink); }
.trow { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trow.grand { margin-top: 2px; color: var(--ink); font-size: 15px; font-weight: 700; }
.disclaimer { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

.total-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.total-line span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.total-line strong { font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1; color: var(--accent); white-space: nowrap; }
.btn-edit { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 16px; text-align: center; line-height: 1.2; border: 1.5px solid var(--accent); border-radius: 14px; background: #fff; color: var(--accent); text-decoration: none; font-weight: 700; transition: background 0.15s; }
.btn-edit:hover { background: var(--accent-soft); }
.btn-icon { display: inline-flex; flex: none; transform: scaleX(-1); }
.btn-icon svg { width: 18px; height: 18px; }

/* =====================================================================
 * Stránka s nezávaznou poptávkou
 * ===================================================================== */
.sum { padding: 0; }
.sum summary { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: var(--radius); cursor: pointer; list-style: none; }
.sum summary::-webkit-details-marker { display: none; }
.sum-title { flex: 1; min-width: 0; font-family: var(--display); font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.sum-total { font-family: var(--display); font-size: 22px; line-height: 1.15; color: var(--accent); white-space: nowrap; }
.sum .chev { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform 0.25s; }
.sum .chev svg { width: 100%; height: 100%; display: block; }
.sum[open] .chev { transform: rotate(180deg); }
.sum-body { padding: 0 20px 14px; }
.mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0 0 12px; }
.mini > div { min-width: 0; }
.mini .wide { grid-column: 1 / -1; }
.mini dt { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mini dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.mini dd small { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.mini ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.sum-vat { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sum-body .disclaimer { margin: 6px 0 8px; }
.sum-body .edit { display: inline-block; }

.form .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.field { grid-column: 1 / -1; display: grid; gap: 6px; min-width: 0; }
.field.half { grid-column: auto; }
.field label { font-size: 13px; font-weight: 700; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input:not([type=checkbox]), .field textarea { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid #d8d2c4; border-radius: 10px; background: #fff; font-size: 15px; line-height: 1.3; transition: border-color 0.15s, box-shadow 0.15s; }
.field textarea { min-height: 104px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #a39e92; }
.field input:not([type=checkbox]):focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input:not([type=checkbox]), .field.invalid textarea { border-color: var(--danger); background: #fff8f6; }
.field.invalid input:not([type=checkbox]):focus, .field.invalid textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, #fff); }
.field-err { margin: 0; font-size: 12.5px; line-height: 1.3; color: var(--danger); overflow-wrap: anywhere; }
.field-err:empty { display: none; }
#consentRow:not(:empty) { margin-top: 14px; }
.field label.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; font-weight: 400; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.check a { color: var(--accent); }

.form-error { margin: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--danger) 35%, #fff); border-radius: 10px; background: #fdf1ee; color: var(--danger); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.foot-form { display: grid; gap: 10px; }
.cta[disabled] { opacity: 0.8; cursor: progress; transform: none; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.success { padding: 28px 22px 24px; text-align: center; }
.success-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%; background: var(--accent); color: #fff; }
.success-icon svg { width: 30px; height: 30px; }
.success h2 { margin: 0 0 8px; font-size: 26px; outline: none; }
.success p { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.success .demo-note { margin-top: 16px; padding: 10px 12px; border: 1px dashed #c9a24a; border-radius: 10px; background: #fff8e6; color: #7a5a12; font-size: 12.5px; text-align: left; }

/* =====================================================================
 * Mobil
 * ===================================================================== */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 46svh minmax(0, 1fr); }
  .stage { order: -1; }
  .panel { border-right: 0; border-top: 1px solid var(--line); }
  .panel-head { padding: 12px 18px 6px; }
  .mark { width: 34px; height: 34px; border-radius: 10px; }
  .mark svg { width: 20px; height: 20px; }
  .eyebrow, .track { display: none; }   /* na mobilu šetříme místem pro samotné volby */
  h1 { font-size: 21px; }
  .panel-scroll { padding: 4px 12px 16px; }
  .foot-summary { display: none; }
  .panel-foot { padding: 10px 16px 14px; }
  .cta { min-height: 50px; }
  .toolbar { top: 10px; right: 10px; }
  .stage-hint, .label.tag { display: none; }
  .total-line strong { font-size: 30px; }
  .field input:not([type=checkbox]), .field textarea { font-size: 16px; }
  .sum-title, .sum-total { font-size: 20px; }
  .sum summary { padding: 14px 16px; }
  .sum-body { padding: 0 16px 16px; }
}
@media (max-width: 480px) {
  .field.half { grid-column: 1 / -1; }
}
