/* ============================================================
   Czech There – vstupenka (3 šablony × světlá / tmavá)
   ============================================================ */
.ct-tk {
    --tk-accent: #0092FF;
    --tk-bg: #fff; --tk-fg: #111827; --tk-muted: #6B7280; --tk-line: #E5E7EB; --tk-soft: #F7F8FA;
    --tk-page: #F5F5F7;
    position: relative; overflow: hidden; color: var(--tk-fg); background: var(--tk-bg);
    border-radius: 20px; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 12px 40px rgba(15,23,42,.10);
    font-family: var(--ct-font, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    text-align: left; line-height: 1.4;
}
.ct-tk-dark { --tk-bg: #111318; --tk-fg: #F3F4F6; --tk-muted: #9CA3AF; --tk-line: #2A2E37; --tk-soft: #1A1D24; }
.ct-tk *, .ct-tk *::before, .ct-tk *::after { box-sizing: border-box; }
.ct-tk svg { flex-shrink: 0; }

.ct-tk-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--tk-fg); overflow-wrap: anywhere; }
.ct-tk-pill { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
    background: color-mix(in srgb, var(--tk-accent) 14%, transparent); color: var(--tk-accent); white-space: nowrap; }
.ct-tk-dark .ct-tk-pill { background: color-mix(in srgb, var(--tk-accent) 24%, transparent); color: color-mix(in srgb, var(--tk-accent) 55%, #fff); }
.ct-tk-logo { max-height: 34px; max-width: 120px; object-fit: contain; display: block; }

.ct-tk-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ct-tk-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.ct-tk-row > svg { color: var(--tk-accent); margin-top: 2px; }
.ct-tk-strong { font-weight: 650; color: var(--tk-fg); }
.ct-tk-strong::first-letter { text-transform: uppercase; }
.ct-tk-muted { font-size: 13px; color: var(--tk-muted); margin-top: 1px; }

.ct-tk-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--tk-line); }
.ct-tk-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-tk-meta span { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tk-muted); }
.ct-tk-meta strong { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.ct-tk-note { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5;
    background: color-mix(in srgb, var(--tk-accent) 8%, var(--tk-bg)); border-left: 3px solid var(--tk-accent); color: var(--tk-fg); }
.ct-tk-pay { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: #B45309;
    background: #FEF3C7; padding: 5px 10px; border-radius: 999px; }

.ct-tk-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ct-tk-qr-img { display: block; width: 168px; height: 168px; padding: 10px; background: #fff; border-radius: 14px; image-rendering: pixelated;
    box-shadow: 0 0 0 1px var(--tk-line); }
.ct-tk-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--tk-fg); }
.ct-tk-qr-hint { font-size: 11px; color: var(--tk-muted); }

.ct-tk-brand { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 10.5px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; color: var(--tk-muted); }
.ct-tk-brand img { height: 18px; width: auto; opacity: .85; }
.ct-tk-dark .ct-tk-brand img { background: #fff; border-radius: 6px; padding: 2px 5px; height: 20px; opacity: 1; }

/* razítka */
.ct-tk-stamp { position: absolute; top: 24px; right: -54px; transform: rotate(35deg); padding: 6px 64px; font-size: 12px; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase; color: #fff; z-index: 3; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.ct-tk-stamp-bad { background: #DC2626; }
.ct-tk-stamp-ok { background: #059669; }
.ct-tk.has-stamp .ct-tk-qr-img { opacity: .35; }

/* obrázky */
.ct-tk-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ct-tk-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.72) 100%); }

/* perforace */
.ct-tk-perf { position: relative; height: 0; border-top: 2px dashed var(--tk-line); margin: 0 18px; }
.ct-tk-perf::before, .ct-tk-perf::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--tk-page); }
.ct-tk-perf::before { left: -30px; } .ct-tk-perf::after { right: -30px; }

/* ── KLASICKÁ ── */
.ct-tk-classic { display: flex; max-width: 760px; }
.ct-tk-classic .ct-tk-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ct-tk-classic .ct-tk-stripe { height: 8px; background: linear-gradient(90deg, var(--tk-accent), color-mix(in srgb, var(--tk-accent) 55%, #fff)); }
.ct-tk-classic .ct-tk-band { position: relative; height: 96px; }
.ct-tk-classic .ct-tk-body { padding: 22px 26px 24px; }
.ct-tk-classic .ct-tk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ct-tk-classic .ct-tk-perf-v { border-top: 0; border-left: 2px dashed var(--tk-line); margin: 18px 0; width: 0; height: auto; }
.ct-tk-classic .ct-tk-perf-v { margin: 0; }
.ct-tk-classic .ct-tk-perf-v::before, .ct-tk-classic .ct-tk-perf-v::after { left: -12px; right: auto; }
.ct-tk-classic .ct-tk-perf-v::before { top: -11px; } .ct-tk-classic .ct-tk-perf-v::after { top: auto; bottom: -11px; }
.ct-tk-classic .ct-tk-right { width: 232px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px 18px; background: var(--tk-soft); }
@media (max-width: 640px) {
    .ct-tk-classic { flex-direction: column; }
    .ct-tk-classic .ct-tk-perf-v { border-left: 0; border-top: 2px dashed var(--tk-line); margin: 0 18px; width: auto; height: 0; }
    .ct-tk-classic .ct-tk-perf-v::before { top: -12px; left: -30px; } .ct-tk-classic .ct-tk-perf-v::after { top: -12px; bottom: auto; left: auto; right: -30px; }
    .ct-tk-classic .ct-tk-perf-v { margin: 0 18px; }
    .ct-tk-classic .ct-tk-right { width: auto; }
    .ct-tk-classic .ct-tk-body { padding: 20px; }
}

/* ── S PLAKÁTEM ── */
.ct-tk-poster { max-width: 420px; }
.ct-tk-poster .ct-tk-hero { position: relative; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 20px 18px;
    background: linear-gradient(135deg, var(--tk-accent), color-mix(in srgb, var(--tk-accent) 45%, #111)); }
.ct-tk-poster .ct-tk-hero-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ct-tk-poster .ct-tk-hero .ct-tk-pill { background: rgba(255,255,255,.92); color: #111; }
.ct-tk-poster .ct-tk-hero .ct-tk-logo { background: rgba(255,255,255,.92); padding: 5px 8px; border-radius: 10px; }
.ct-tk-poster .ct-tk-title { position: relative; z-index: 1; color: #fff; font-size: 24px; text-shadow: 0 1px 12px rgba(0,0,0,.35); margin-top: 40px; }
.ct-tk-poster .ct-tk-body { padding: 4px 20px 20px; }
.ct-tk-poster .ct-tk-main { padding-bottom: 18px; }
.ct-tk-poster .ct-tk-perf { margin: 0 -2px; }
.ct-tk-poster .ct-tk-perf::before { left: -32px; } .ct-tk-poster .ct-tk-perf::after { right: -32px; }
.ct-tk-poster .ct-tk-foot { padding-top: 18px; display: flex; flex-direction: column; align-items: center; }
.ct-tk-poster .ct-tk-foot .ct-tk-meta { justify-content: center; text-align: center; width: 100%; }
.ct-tk-poster .ct-tk-foot .ct-tk-meta > div { align-items: center; }

/* ── MINIMALISTICKÁ ── */
.ct-tk-minimal { max-width: 380px; text-align: center; border-top: 6px solid var(--tk-accent); }
.ct-tk-minimal .ct-tk-body { padding: 22px 24px 20px; display: flex; flex-direction: column; align-items: center; }
.ct-tk-minimal .ct-tk-min-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.ct-tk-minimal .ct-tk-title { text-align: center; font-size: 21px; }
.ct-tk-minimal .ct-tk-min-when { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--tk-fg); }
.ct-tk-minimal .ct-tk-min-when::first-letter { text-transform: uppercase; }
.ct-tk-minimal .ct-tk-min-place { font-size: 13px; color: var(--tk-muted); margin-top: 2px; }
.ct-tk-minimal .ct-tk-qr { margin: 18px 0 6px; }
.ct-tk-minimal .ct-tk-min-holder { font-size: 15px; font-weight: 700; margin-top: 6px; }
.ct-tk-minimal .ct-tk-note { text-align: left; width: 100%; }
.ct-tk-minimal .ct-tk-meta { justify-content: center; width: 100%; }
.ct-tk-minimal .ct-tk-meta > div { align-items: center; }
.ct-tk-minimal.has-bg .ct-tk-bg { display: none; }

/* ============================================================
   Editor vstupenky
   ============================================================ */
.ct-tke { container-type: inline-size; }
.ct-tke-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }
@container (max-width: 820px) { .ct-tke-grid { grid-template-columns: 1fr; } .ct-tke-preview { position: static; } }
.ct-tke-controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ct-tke-controls fieldset[disabled] { opacity: .45; pointer-events: none; }
.ct-tke-field { margin-bottom: 18px; }
.ct-tke-field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ct-700); margin-bottom: 8px; }
.ct-tke-opt { font-weight: 500; color: var(--ct-400); margin-left: 4px; }
.ct-tke-hint { font-size: 12px; color: var(--ct-400); margin-top: 6px; }

.ct-tke-tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ct-tke-tpl { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 6px 9px; border-radius: 12px; cursor: pointer;
    border: 1.5px solid var(--ct-150); background: var(--ct-white, #fff); font: inherit; font-size: 12px; font-weight: 600; color: var(--ct-600); transition: all .15s ease; }
.ct-tke-tpl:hover { border-color: var(--ct-300); }
.ct-tke-tpl.is-on { border-color: var(--ct-blue); color: var(--ct-blue); box-shadow: 0 0 0 3px rgba(0,146,255,.12); }
.ct-tke-tpl-ill { position: relative; width: 56px; height: 38px; border-radius: 6px; background: var(--ct-100); overflow: hidden; }
.ct-tke-tpl-ill i { position: absolute; display: block; border-radius: 2px; background: var(--ct-300); }
.ct-tke-ill-classic i:nth-child(1) { left: 0; top: 0; width: 100%; height: 5px; background: var(--ct-blue); }
.ct-tke-ill-classic i:nth-child(2) { left: 6px; top: 12px; width: 26px; height: 4px; }
.ct-tke-ill-classic i:nth-child(3) { right: 5px; top: 11px; width: 14px; height: 14px; background: var(--ct-500); }
.ct-tke-ill-poster i:nth-child(1) { left: 0; top: 0; width: 100%; height: 18px; background: linear-gradient(135deg, var(--ct-blue), #7C3AED); }
.ct-tke-ill-poster i:nth-child(2) { left: 6px; top: 23px; width: 22px; height: 4px; }
.ct-tke-ill-poster i:nth-child(3) { right: 6px; top: 22px; width: 12px; height: 12px; background: var(--ct-500); }
.ct-tke-ill-minimal i:nth-child(1) { left: 0; top: 0; width: 100%; height: 3px; background: var(--ct-blue); }
.ct-tke-ill-minimal i:nth-child(2) { left: 17px; top: 8px; width: 22px; height: 3px; }
.ct-tke-ill-minimal i:nth-child(3) { left: 21px; top: 15px; width: 14px; height: 14px; background: var(--ct-500); }

.ct-tke-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--ct-100); flex-wrap: wrap; }
.ct-tke-seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600;
    color: var(--ct-600); padding: 7px 12px; border-radius: 8px; cursor: pointer; transition: all .15s ease; }
.ct-tke-seg button.is-on { background: #fff; color: var(--ct-900, #111); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

.ct-tke-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-tke-color { position: relative; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; padding: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .12s ease; display: inline-flex; align-items: center; justify-content: center; color: var(--ct-500); }
.ct-tke-color:hover { transform: scale(1.08); }
.ct-tke-color.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.ct-tke-color-custom { box-shadow: inset 0 0 0 1.5px var(--ct-200); }
.ct-tke-color-custom.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ct-700); }
.ct-tke-color-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.ct-tke-upl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ct-tke-field > .ct-tke-upl:first-of-type { margin-top: 0; }
.ct-tke-upl img { width: 64px; height: 40px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--ct-150); }
.ct-tke-upl img.is-logo { object-fit: contain; background: var(--ct-50); padding: 4px; }
.ct-tke-count { text-align: right; font-size: 11px; color: var(--ct-400); margin-top: 4px; }

.ct-tke-switch { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ct-50); border: 1px solid var(--ct-150); margin-bottom: 18px; cursor: pointer; }
.ct-tke-switch span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ct-800); }
.ct-tke-switch small { font-size: 12px; color: var(--ct-500); }
.ct-tke-switch-lock { background: #FFF7ED; border-color: #FED7AA; }
.ct-tke-lock-note { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #FFF7ED; border: 1px solid #FED7AA; color: #9A3412; font-size: 13px; margin-bottom: 16px; }
.ct-tke-controls.is-ro fieldset { opacity: .5; }
.ct-tke-actions { display: flex; align-items: center; gap: 12px; }
.ct-tke-status { font-size: 12.5px; color: var(--ct-500); }

.ct-tke-preview { position: sticky; top: 84px; }
.ct-tke-preview-label { font-size: 12px; font-weight: 700; color: var(--ct-500); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.ct-tke-preview-label span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ct-400); margin-left: 6px; }
.ct-tke-stage { --tk-page: #EEF0F3; background: #EEF0F3; border-radius: 16px; padding: 22px; display: flex; justify-content: center; }
.ct-tke-stage .ct-tk { width: 100%; }
.ct-tke-stage .ct-tk-perf::before, .ct-tke-stage .ct-tk-perf::after { background: #EEF0F3; }
