:root {
  --accent: #c49a36;
  --ink: #16294a;
  --muted: #6b7280;
  --bg: #ffffff;
  --soft: #f5f3ee;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); }

.ba-app { max-width: 720px; margin: 0 auto; padding: 20px; background: var(--bg); border-radius: var(--radius); }
.ba-head { text-align: center; margin-bottom: 18px; }
.ba-title { margin: 0 0 6px; font-size: 1.6rem; }
.ba-sub { margin: 0; color: var(--muted); }

.ba-step { margin: 18px 0; }
.ba-step-label { font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.ba-step-label span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .8rem; }

.ba-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ba-chip { cursor: pointer; user-select: none; }
.ba-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ba-chip span { display: inline-block; padding: 9px 14px; border: 1.5px solid #ddd; border-radius: 999px; transition: .15s; background: #fff; }
.ba-chip:hover span { border-color: var(--accent); }
.ba-chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.ba-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.ba-note { width: 100%; margin-top: 10px; padding: 10px 12px; border: 1.5px solid #ddd; border-radius: 10px; font: inherit; }
.ba-note:focus { outline: none; border-color: var(--accent); }

.ba-drop { display: block; border: 2px dashed #cfcfcf; border-radius: var(--radius); background: var(--soft); cursor: pointer; transition: .15s; text-align: center; overflow: hidden; }
.ba-drop:hover, .ba-drop.is-over { border-color: var(--accent); }
.ba-drop-inner { padding: 26px 16px; color: var(--muted); }
.ba-drop-inner strong { color: var(--ink); }
.ba-drop-icon { font-size: 2rem; }
.ba-drop-preview { display: flex; align-items: center; gap: 12px; padding: 10px; text-align: left; }
.ba-drop-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }

.ba-btn { display: inline-block; width: 100%; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; text-align: center; text-decoration: none; transition: .15s; }
.ba-btn:hover:not(:disabled) { filter: brightness(1.07); }
.ba-btn:disabled { opacity: .45; cursor: not-allowed; }
.ba-btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid #ddd; font-weight: 600; font-size: .95rem; padding: 10px 14px; }

.ba-msg { min-height: 1.2em; margin: 10px 0 0; text-align: center; color: #b42318; }

.ba-result { margin-top: 18px; }
.ba-compare { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: #111; touch-action: pan-y; cursor: ew-resize; user-select: none; --pos: 50%; }
.ba-compare:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .06em; pointer-events: none; }
.ba-tag-before { left: 12px; }
.ba-tag-after { right: 12px; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,.4); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,.35); }

.ba-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(22,41,74,.55); color: #fff; font-weight: 600; backdrop-filter: blur(2px); }
.ba-loading[hidden] { display: none; }
.ba-spinner { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: ba-spin 1s linear infinite; }
@keyframes ba-spin { to { transform: rotate(360deg); } }

.ba-actions { display: flex; gap: 10px; margin-top: 12px; }
.ba-actions .ba-btn { flex: 1; }
.ba-legal { margin: 16px 0 0; font-size: .78rem; color: var(--muted); text-align: center; }

@media (max-width: 480px) {
  .ba-app { padding: 14px; }
  .ba-title { font-size: 1.3rem; }
  .ba-actions { flex-direction: column; }
}

/* ---- barvy a síla úprav ---- */
.ba-panels { display: grid; gap: 10px; margin-top: 12px; }
.ba-panel { padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.ba-panel-title { font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.ba-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ba-row-label { width: 92px; font-size: .85rem; color: var(--muted); }
.ba-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.ba-sw { position: relative; cursor: pointer; }
.ba-sw input { position: absolute; opacity: 0; pointer-events: none; }
.ba-sw i { display: block; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #ccc; transition: .12s; }
.ba-sw i.ba-none { background: repeating-linear-gradient(45deg, #fff 0 4px, #e5e5e5 4px 8px) !important; }
.ba-sw input:checked + i { box-shadow: 0 0 0 2.5px var(--ink); transform: scale(1.08); }
.ba-sw input:focus-visible + i { box-shadow: 0 0 0 2.5px var(--accent); }
.ba-sw-name { font-size: .78rem; color: var(--muted); min-width: 90px; }
.ba-amount { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: .9rem; }
.ba-amount input { flex: 1; accent-color: var(--accent); }
.ba-amount output { width: 48px; text-align: right; color: var(--muted); }
.ba-live { font-size: .82rem; color: var(--muted); text-align: center; margin: 8px 0 0; }
@media (max-width: 480px) { .ba-row-label { width: 100%; } }
