/* Kouzelná Linka — content pages: legal documents, 404, order confirmation (loaded after kl.css) */

/* ---------- Legal documents ---------- */
.legal-head h1 { max-width: 22ch; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; }
.legal-meta span { padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13); color: var(--on-night-2); }
.legal-meta strong { color: var(--on-night); }
.legal-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding: 5px; border-radius: 999px; background: rgba(0, 0, 0, .22); justify-self: start; }
.legal-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; color: var(--on-night-2); text-decoration: none; font-weight: 700; font-size: .9rem; transition: background-color .2s, color .2s; }
.legal-tab:hover { color: var(--on-night); background: rgba(255, 255, 255, .08); }
.legal-tab .i { width: 16px; height: 16px; }
.legal-tab.is-active { background: var(--paper); color: var(--ink); }
@media (max-width: 560px) { .legal-tabs { border-radius: 22px; } .legal-tab { flex: 1 1 100%; } }

.legal-summary { padding-block: 8px 34px; }
.legal-summary .wrap { display: grid; gap: 20px; }
.legal-summary-head { display: grid; gap: 6px; }
.legal-summary-head .hand-note { font-size: 1.35rem; }
.legal-summary-head h2 { font-weight: 900; font-size: clamp(1.5rem, 5.5vw, 2.1rem); line-height: 1.2; }
.legal-summary-head h2 em { color: var(--red); padding-bottom: .08em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 6c5-4 10-4 15 0s10 4 15 0 7-3 10-1' fill='none' stroke='%23e8b931' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 40px 10px repeat-x; }
.legal-summary-head p { color: var(--muted); font-size: .92rem; }
.summary-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.summary-cards li { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-paper); }
.summary-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--night); color: var(--gold); margin-bottom: 4px; }
.summary-ico .i { width: 22px; height: 22px; }
.summary-cards strong { font: 700 1.12rem/1.3 var(--font-display); }
.summary-cards p { color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
@media (max-width: 639px) {
  .summary-cards { gap: 8px; }
  .summary-cards li { grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; padding: 14px 16px; }
  .summary-ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; margin: 2px 0 0; }
  .summary-ico .i { width: 19px; height: 19px; }
  .summary-cards strong { font-size: 1.02rem; }
  .summary-cards p { font-size: .9rem; }
}
@media (min-width: 640px) { .summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .summary-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.legal-body { padding-block: 10px 70px; }
.legal-body .wrap { display: grid; gap: 24px; }
.legal-toc { border-radius: var(--r-lg); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); padding: 18px 20px; align-self: start; }
.legal-toc-title { font: 700 1.1rem/1.2 var(--font-display); margin-bottom: 10px; }
.legal-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 7px; font-size: .9rem; }
.legal-toc li::marker { color: var(--muted); }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal-toc a[aria-current] { color: var(--red); font-weight: 700; }
.legal-toc-tools { display: grid; justify-items: start; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; }
.legal-doc { max-width: 760px; min-width: 0; }
.legal-doc h2 { font-weight: 900; font-size: clamp(1.3rem, 4.6vw, 1.6rem); line-height: 1.25; margin: 38px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.legal-doc h2:first-child, .legal-doc .ai-callout + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-doc .ai-callout + h2 { margin-top: 30px; }
.legal-doc h3 { font: 700 1.08rem/1.35 var(--font-display); margin: 22px 0 8px; }
.legal-doc p, .legal-doc li { font-size: 1rem; line-height: 1.7; color: var(--ink-2); }
.legal-doc p + p { margin-top: 10px; }
.legal-doc ul, .legal-doc ol { margin: 8px 0 12px; padding-left: 22px; display: grid; gap: 4px; }
.legal-doc li::marker { color: var(--gold-deep); }
.legal-doc a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.legal-doc strong { color: var(--ink); }
.legal-doc .table-responsive { overflow-x: auto; margin: 12px 0 16px; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.legal-doc table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.legal-doc th, .legal-doc td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-doc tr:last-child td { border-bottom: 0; }
.legal-doc th { background: var(--paper-2); font-weight: 800; }
.legal-doc .ai-callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--night); color: var(--on-night); margin: 0 0 14px; }
.legal-doc .ai-callout strong { color: var(--on-night); display: block; font: 700 1.1rem/1.3 var(--font-display); margin-bottom: 4px; }
.legal-doc .ai-callout span { color: var(--on-night-2); line-height: 1.6; }
.legal-doc .ai-callout-icon { width: 42px; height: 42px; border-radius: 50%; display: grid !important; place-items: center; background: var(--gold); color: #2f2300 !important; }
.legal-doc .ai-callout-icon .i { width: 20px; height: 20px; }

.legal-contact { padding-bottom: 90px; }
.legal-contact-card { display: grid; gap: 18px; padding: 28px 22px; border-radius: var(--r-xl); }
.legal-contact-card > *:not(.sky) { position: relative; z-index: 1; }
.legal-contact-faces { display: flex; }
.legal-contact-faces img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--gold); }
.legal-contact-faces img + img { margin-left: -8px; }
.legal-contact-copy { display: grid; gap: 6px; }
.legal-contact-copy .hand-note { font-size: 1.3rem; }
.legal-contact-copy h2 { font-weight: 900; font-size: clamp(1.5rem, 5.5vw, 2.1rem); line-height: 1.2; }
.legal-contact-copy h2 em { color: var(--gold); }
.legal-contact-copy p { color: var(--on-night-2); max-width: 46ch; }
.legal-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) { .legal-contact-card { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 34px 40px; } }

@media print {
  .site-header, .site-footer, .legal-head .sky, .legal-head .ground, .legal-tabs, .legal-toc, .legal-summary, .legal-contact, .kl-consent, .read-progress { display: none !important; }
  .legal-head { background: none; color: #000; padding: 0 0 12px; }
  .legal-head h1, .legal-head .sub, .legal-meta span, .legal-meta strong, .legal-head .crumbs, .legal-head .crumbs a { color: #000 !important; background: none !important; box-shadow: none !important; }
  .legal-body .wrap { display: block; }
  .legal-doc { max-width: none; }
  .legal-doc .ai-callout { background: none; color: #000; box-shadow: inset 0 0 0 1px #999; }
}

@media (min-width: 980px) {
  .legal-body .wrap { grid-template-columns: 260px minmax(0, 760px); gap: 56px; justify-content: center; }
  .legal-toc { position: sticky; top: 96px; }
}

/* ---------- 404 / errors ---------- */
.lost { min-height: 72vh; display: grid; align-items: center; text-align: center; padding-block: 60px 220px; }
.lost .wrap { display: grid; gap: 16px; justify-items: center; position: relative; z-index: 1; }
.lost .code { font: 600 1.7rem/1 var(--font-hand); color: var(--gold); }
.lost h1 { font-weight: 900; font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1.12; }
.lost h1 em { color: var(--gold); }
.lost .sub { margin-inline: auto; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.lost-phone { position: relative; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; margin-bottom: 6px; animation: lostShake 3.2s ease-in-out infinite; }
.lost-phone .i { width: 32px; height: 32px; }
.lost-ring { position: absolute; inset: 0; border-radius: 50%; background: rgba(212, 43, 51, .45); z-index: -1; animation: lostRing 2.4s ease-out infinite; }
@keyframes lostRing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes lostShake { 0%, 70%, 100% { transform: rotate(0); } 74%, 82%, 90% { transform: rotate(-12deg); } 78%, 86%, 94% { transform: rotate(12deg); } }
.lost-links { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(100%, 860px); text-align: left; }
.lost-links a { display: grid; gap: 4px; height: 100%; padding: 16px; border-radius: 18px; background: rgba(12, 27, 33, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); color: var(--on-night); text-decoration: none; transition: background-color .2s, transform .2s var(--ease); }
.lost-links a:hover { background: rgba(12, 27, 33, .75); transform: translateY(-2px); }
.lost-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: #2f2300; margin-bottom: 6px; }
.lost-ico .i { width: 18px; height: 18px; }
.lost-links strong { font: 700 1.02rem/1.25 var(--font-display); }
.lost-links small { color: var(--on-night-2); font-size: .85rem; line-height: 1.35; }
.lost-mail { color: var(--on-night-2); font-size: .95rem; }
.lost-mail a { color: var(--on-night); font-weight: 700; }
@media (min-width: 760px) { .lost-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .lost-phone, .lost-ring { animation: none; } }
.lost .finale-bg { position: absolute; inset: 0; z-index: -3; background: 50% 85% / cover no-repeat; }
.lost .finale-bg.is-near { background-image: url("/images/night-village.webp"); }
.lost .veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 27, 33, .9) 0%, rgba(12, 27, 33, .5) 45%, rgba(12, 27, 33, 0) 70%, rgba(8, 19, 15, .4) 100%); }

/* ---------- Order confirmation ---------- */
.thanks { padding-block: 26px 80px; }
.thanks .wrap { display: grid; gap: 16px; max-width: 760px; }
/* ---------- After payment: confirmed order ---------- */
@media (max-width: 979px) { .thanks-head { --vh: 130px; } }
.page-head > .thanks-grid { gap: 26px; align-items: center; }
.thanks-portrait { position: relative; z-index: 0; margin: 0; justify-self: center; width: min(230px, 62vw); }
.thanks-portrait::before { content: ""; position: absolute; inset: -40px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(232, 185, 49, .34), rgba(232, 185, 49, 0) 66%); }
.thanks-portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: 999px 999px 26px 26px; box-shadow: 0 0 0 4px var(--night), 0 0 0 6px var(--gold), 0 40px 70px -30px rgba(0, 0, 0, .85); }
.thanks-portrait .tick { position: absolute; right: -4px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 0 0 5px var(--night); }
.thanks-portrait .tick .i { width: 30px; height: 30px; stroke-width: 3; }
.thanks-copy { display: grid; gap: 14px; justify-items: start; }
.thanks-copy h1 { font-weight: 900; font-size: clamp(2.1rem, 8vw, 3.4rem); line-height: 1.1; }
.order-chip { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); font-size: .9rem; font-weight: 700; color: var(--on-night); }
.thanks-lead { color: var(--on-night-2); font-size: 1.1rem; max-width: 48ch; }
.when-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 20px 14px 14px; border-radius: 18px; background: linear-gradient(160deg, rgba(232, 185, 49, .24), rgba(232, 185, 49, .06)); box-shadow: inset 0 0 0 1px rgba(232, 185, 49, .5); }
.when-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--gold); color: #2f2300; }
.when-card > span:last-child { display: grid; gap: 2px; }
.when-card small { color: var(--on-night-2); font-size: .85rem; }
.when-card strong { font: 700 1.2rem/1.25 var(--font-display); color: var(--on-night); }
.when-card span span { font-size: .9rem; color: var(--on-night-2); }
.when-card b { color: var(--on-night); }
.thanks-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
@media (min-width: 900px) {
  .page-head > .thanks-grid { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 64px; }
  .thanks-portrait { width: min(340px, 100%); }
}

.thanks-next { padding-block: 10px 90px; }
.thanks-next .wrap { display: grid; gap: 12px; }
.timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; padding-bottom: 24px; }
.timeline li::before { content: ""; position: absolute; left: 25px; top: 56px; bottom: 4px; width: 2px; background: repeating-linear-gradient(180deg, var(--gold) 0 6px, transparent 6px 12px); }
.timeline li:last-child::before { display: none; }
.tl-ico { grid-column: 1; grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--red); }
.tl-ico .i { width: 22px; height: 22px; }
.tl-when { grid-column: 2; grid-row: 1; font: 600 1.3rem/1.1 var(--font-hand); color: var(--red); }
.timeline li > span:last-child { grid-column: 2; display: grid; gap: 3px; }
.timeline b { font: 700 1.1rem/1.3 var(--font-display); }
.timeline small { color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
@media (min-width: 900px) {
  .timeline { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 20px; margin-top: 26px; }
  .timeline li { grid-template-columns: 1fr; padding-bottom: 0; align-content: start; row-gap: 6px; }
  .timeline li::before { left: 64px; right: -12px; top: 25px; bottom: auto; width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px); }
  .tl-ico { grid-row: auto; order: -1; margin-bottom: 8px; }
  .tl-when, .timeline li > span:last-child { grid-column: 1; grid-row: auto; }
}
.thanks-tips { display: grid; gap: 14px; margin-top: 30px; }
.tip-card { display: grid; gap: 8px; align-content: start; padding: 24px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-paper); }
.tip-card .hand-note { font-size: 1.3rem; }
.tip-card h3 { font-size: 1.35rem; }
.tip-card p { color: var(--ink-2); }
@media (min-width: 720px) { .thanks-tips { grid-template-columns: 1fr 1fr; } }
.thanks-home { margin-top: 22px; }

.thanks-facts { display: grid; gap: 0; margin: 0; }
.thanks-facts > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.thanks-facts > div:last-child { border-bottom: 0; }
.thanks-facts dt { color: var(--muted); font-size: .9rem; }
.thanks-facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.next-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.next-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.next-steps .num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2f2300; font: 700 1rem/1 var(--font-display); }
.next-steps b { display: block; }
.next-steps small { color: var(--muted); font-size: .9rem; }
.thanks .actions { display: flex; flex-wrap: wrap; gap: 10px; }

.thanks .card .spinner { width: 34px; height: 34px; }
@media (min-width: 980px) { .thanks { padding-top: 40px; } }
