/* Písmo Nunito je uložené priamo na stránke (public/fonts, licencia OFL) – prehliadač nič nesťahuje z Googlu */
@font-face {
  font-family: Nunito;
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/nunito-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Nunito;
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/nunito-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #1d2433;
  --muted: #5d6679;
  --navy: #1f3a5f;          /* pozadie tlačidiel a tmavých plôch */
  --navy-dark: #152a46;
  --accent: #1f3a5f;        /* odkazy a zvýraznený text */
  --sun: #ffc93c;
  --sun-soft: #fff4d1;
  --paper: #fbfaf6;
  --card: #ffffff;
  --line: #e7e3d8;
  --input: #ffffff;
  --input-line: #cfc9b9;
  --th: #f4f1e8;
  --footer: #f1eee5;
  --tint: #ffffff;          /* s ním sa miešajú farby predmetov (štítky, obrázky bez náhľadu) */
  --tag-ink: #000000;
  --tag-pct: 80%;
  --cover-bg: #eeeeee;
  --eyebrow: #b07d00;
  --ok: #2b8a3e;
  --ok-bg: #ebfbee;
  --ok-line: #b2f2bb;
  --err: #c92a2a;
  --err-bg: #fff0f0;
  --err-line: #f5c2c2;
  --sale: #e03131;
  --waiting: #b35c00;
  --toggle-icon: '🌙';
  --radius: 16px;
  --shadow: 0 1px 2px rgb(29 36 51 / 6%), 0 8px 24px rgb(29 36 51 / 6%);
}

/* Tmavý režim: podľa systému, alebo ho zvolí prepínač v hlavičke (data-theme na <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e6e9ef; --muted: #a2abbd; --navy: #2f5a8f; --navy-dark: #3a6aa6; --accent: #8db8f2;
    --sun-soft: #3a3220; --paper: #14171e; --card: #1c2029; --line: #313847; --input: #232834; --input-line: #3d4556;
    --th: #252a35; --footer: #191d25; --tint: #1c2029; --tag-ink: #ffffff; --tag-pct: 55%; --cover-bg: #2a2f3a;
    --eyebrow: #f0b429; --ok: #69db7c; --ok-bg: #1b3324; --ok-line: #2f6b40; --err: #ff8787; --err-bg: #3a1d1f;
    --err-line: #6b2b2e; --sale: #ff6b6b; --waiting: #ffa94d; --toggle-icon: '☀️';
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6e9ef; --muted: #a2abbd; --navy: #2f5a8f; --navy-dark: #3a6aa6; --accent: #8db8f2;
  --sun-soft: #3a3220; --paper: #14171e; --card: #1c2029; --line: #313847; --input: #232834; --input-line: #3d4556;
  --th: #252a35; --footer: #191d25; --tint: #1c2029; --tag-ink: #ffffff; --tag-pct: 55%; --cover-bg: #2a2f3a;
  --eyebrow: #f0b429; --ok: #69db7c; --ok-bg: #1b3324; --ok-line: #2f6b40; --err: #ff8787; --err-bg: #3a1d1f;
  --err-line: #6b2b2e; --sale: #ff6b6b; --waiting: #ffa94d; --toggle-icon: '☀️';
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Nunito, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 17px;
}

a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.6rem; margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 0.4rem 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 20px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; font-size: 0.8rem; color: var(--eyebrow); margin: 0 0 0.5rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--sun); color: #1d2433; padding: 8px 14px; z-index: 10; border-radius: 8px; }

/* Hlavička */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { font-weight: 900; font-size: 1.2rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; margin: 0; }
.logo-img { width: 48px; height: 48px; flex: none; }
.nav { display: flex; gap: 20px; flex: 1; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 700; }
.nav a:hover { color: var(--accent); text-decoration: underline; }
.cart-link { text-decoration: none; font-weight: 800; color: var(--ink); background: var(--sun-soft); padding: 8px 14px; border-radius: 999px; display: flex; gap: 6px; align-items: center; }
.theme-toggle { flex: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; padding: 0; }
.theme-toggle span::before { content: var(--toggle-icon); }
.theme-toggle:hover { border-color: var(--accent); }
.cart-count { background: var(--navy); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 0.8rem; padding: 0 6px; }

/* Tlačidlá */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--navy); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.btn:hover { background: var(--navy-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.btn-large { padding: 14px 24px; font-size: 1.05rem; }
.btn-small { padding: 8px 14px; font-size: 0.92rem; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.btn-ghost:hover { background: var(--sun-soft); }
.btn-pay { width: 100%; background: #2b8a3e; }
.btn-pay:hover { background: #237032; }
.btn-wa { background: #128c7e; }
.btn-wa:hover { background: #0e6f64; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.9rem; padding: 4px; }

/* Úvod */
.hero { background: linear-gradient(180deg, var(--sun-soft), var(--paper)); padding: 56px 0 24px; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.checks { list-style: none; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; margin: 0; font-weight: 700; }
.checks li::before { content: '✓ '; color: var(--ok); font-weight: 900; }
.hero-art img { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; filter: drop-shadow(0 12px 24px rgba(31, 58, 95, 0.18)); }

.grade-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 12px; }
.grade-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 8px; text-align: center; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.15s; }
.grade-tile:hover { transform: translateY(-3px); border-color: var(--accent); }
.grade-tile strong { font-size: 2rem; font-weight: 900; color: var(--accent); }
.grade-tile small { color: var(--muted); font-size: 0.78rem; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head a { font-weight: 800; }

/* Karty */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform 0.15s; }
.card:hover { transform: translateY(-3px); }
.card-link { color: inherit; text-decoration: none; flex: 1; }
.card-body { padding: 16px 18px 4px; }
.card-body p { margin: 0; font-size: 0.95rem; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 18px; }
.price { font-weight: 900; font-size: 1.15rem; }
.cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--cover-bg); }
.cover-large { border-radius: var(--radius); border: 1px solid var(--line); }
.cover-empty { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, var(--tint)), color-mix(in srgb, var(--c) 40%, var(--tint))); }
.cover-empty span { font-size: 3.5rem; }
.cover-large.cover-empty span { font-size: 6rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c, #888) 14%, var(--tint)); color: color-mix(in srgb, var(--c, #555) var(--tag-pct), var(--tag-ink)); }
.tag-grade { --c: #1f3a5f; }

.school-box { background: var(--navy); color: #fff; border-radius: 24px; padding: 36px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.school-box p { margin: 0; max-width: 60ch; opacity: 0.9; }
.school-box .btn { background: var(--sun); color: #1d2433; }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq p { margin: 10px 0 0; }

/* Katalóg */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.filters label { display: flex; flex-direction: column; font-weight: 700; font-size: 0.9rem; gap: 4px; }
.filters .grow { flex: 1; min-width: 200px; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--input-line); border-radius: 10px; background: var(--input); color: var(--ink); width: 100%; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; }

/* Detail */
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.detail-main { grid-column: 1; }
.detail-desc { grid-column: 1; }
.detail-desc h2 { margin-top: 32px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.thumbs img { border-radius: 10px; border: 1px solid var(--line); aspect-ratio: 16 / 10; object-fit: cover; }
.video { margin-top: 24px; aspect-ratio: 16 / 9; }
.video iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.buy-box { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.buy-box .btn { width: 100%; }
.price-big { font-size: 2.2rem; font-weight: 900; margin: 12px 0; }
.facts { list-style: none; padding: 0; margin: 20px 0 12px; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.facts span { color: var(--muted); }
.facts strong { text-align: right; }
.prose p, .prose li { max-width: 70ch; }
.prose h2 { margin-top: 2rem; font-size: 1.3rem; }

/* Košík a objednávka */
.cart-list, .download-list { list-style: none; padding: 0; margin: 24px 0; }
.cart-list li, .download-list li { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.cart-list a { flex: 1; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.download-list li > div { flex: 1; display: flex; flex-direction: column; }
.cart-total { text-align: right; font-size: 1.3rem; }
.checkout { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.error { background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.success { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.howto { background: var(--sun-soft); border-radius: var(--radius); padding: 20px 24px; margin-top: 32px; }
.howto h2 { font-size: 1.15rem; }
.dev-banner { background: #fff3bf; color: #1d2433; border: 2px dashed #f08c00; padding: 10px 14px; border-radius: 10px; font-weight: 800; }

/* Pätička */
.site-footer { background: var(--footer); border-top: 1px solid var(--line); margin-top: 48px; padding: 40px 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.news-form { display: grid; grid-template-columns: 1fr auto; gap: 12px 32px; align-items: center; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.news-form h2 { font-size: 1.05rem; margin: 0 0 4px; }
.news-form p { margin: 0; }
.news-row { display: flex; gap: 8px; }
.news-row input { min-width: 260px; }
.news-row .btn { white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check-optional { color: var(--muted); }
@media (max-width: 640px) { .news-form { grid-template-columns: 1fr; } .news-row input { min-width: 0; } }
.footer-grid h2 { font-size: 0.95rem; margin-bottom: 8px; }
.footer-grid a { display: block; color: var(--ink); text-decoration: none; padding: 3px 0; }
.footer-grid a:hover { text-decoration: underline; }

/* Administrácia */
.admin .site-header { background: var(--navy); }
.admin .logo, .admin .nav a { color: #fff; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; margin-bottom: 32px; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--th); font-size: 0.85rem; }
.table tr.inactive { opacity: 0.55; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.stats strong { font-size: 2rem; font-weight: 900; }
.stats span, .stats small { color: var(--muted); }
.admin-form { max-width: 760px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { grid-template-columns: repeat(3, 1fr); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
legend { font-weight: 700; padding: 0 6px; }
.grade-checks { display: flex; gap: 16px; flex-wrap: wrap; }
.preview-admin { display: flex; gap: 12px; flex-wrap: wrap; }
.preview-admin img { width: 140px; border-radius: 8px; border: 1px solid var(--line); }
.preview-admin .check { flex-direction: column; align-items: flex-start; gap: 4px; }
.image-field { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 900px) {
  .hero-inner, .detail { grid-template-columns: 1fr; }
  .hero-art img { max-width: 200px; }
  .grade-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-main, .detail-desc, .buy-box { grid-column: auto; grid-row: auto; }
  .buy-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 32px 16px; }
  .header-inner { flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; flex: 1 1 100%; gap: 16px; overflow-x: auto; }
  .cart-link { margin-left: auto; }
  .cart-link > span:not(.cart-count) { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
  .school-box { padding: 24px; }
}

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

/* Akciové ceny a hromadná správa */
.price del, .price-big del { color: var(--muted); font-size: 0.7em; font-weight: 500; }
.sale-price { color: var(--sale); }
.sale-badge { display: inline-block; margin-left: 8px; padding: 3px 7px; border-radius: 6px; background: var(--sale); color: #fff; font-size: 0.72em; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.sale-end { color: var(--sale); font-weight: 700; margin-top: -6px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bulk-action { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0 28px; }
.bulk-action h2 { margin-top: 0; }
.bulk-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bulk-fields label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.bulk-options { display: flex; gap: 20px; margin: 14px 0; }
.price-table-wrap { overflow-x: auto; }
.price-table { min-width: 900px; }
.price-table input:not([type="checkbox"]) { min-width: 110px; }
.price-table input[type="checkbox"] { width: 20px; height: 20px; }
.price-row-error { background: var(--err-bg); }
.price-error { color: var(--sale); font-size: 0.85rem; font-weight: 700; margin: 6px 0 0; }
@media (max-width: 640px) { .bulk-fields { grid-template-columns: 1fr; } .bulk-options { flex-wrap: wrap; } }

/* Administrácia – ZIP a obrázky (public/admin.js) */
.zip-info { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: -4px; }
.zip-info p { margin: 4px 0; }
.zip-info .warn, .thumbs-admin .warn { color: var(--err); font-weight: 700; }
.zip-info .ok { color: var(--ok); font-weight: 700; }
.visually-hidden-input input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--card); cursor: default; }
.drop-zone small { display: block; margin-top: 6px; }
.drop-zone:focus, .drop-zone.over { outline: none; border-color: var(--accent); background: var(--sun-soft); }
.thumbs-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumbs-admin > p { grid-column: 1 / -1; margin: 0; }
.thumbs-admin figure { margin: 0; }
.thumbs-admin img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.thumbs-admin figcaption { display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.thumbs-admin figcaption button { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.thumbs-admin figcaption button:disabled { opacity: 0.35; cursor: default; }
.thumbs-admin .badge { font-size: 0.75rem; font-weight: 800; color: var(--accent); margin-right: auto; }

/* Môj účet */
.account-order { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 20px; }
.account-order h2 { font-size: 1.1rem; }

/* Výber licencie, spôsob platby a platba prevodom */
.license-form { display: flex; flex-direction: column; gap: 10px; }
.license-choice, .pay-choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.license-choice legend, .pay-choice legend { font-weight: 800; margin-bottom: 6px; padding: 0; }
.license-option { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.license-option:has(input:checked) { border-color: var(--accent); background: var(--sun-soft); }
.license-option input { width: 18px; height: 18px; flex: none; margin: 0; }
.license-option span { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.license-option small { color: var(--muted); font-size: 0.8rem; }
.license-option b { white-space: nowrap; }
.transfer-box { background: var(--sun-soft); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; }
.transfer-box h2 { font-size: 1.15rem; margin-top: 0; }
.transfer-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.transfer-box dt { color: var(--muted); }
.transfer-box dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.contact-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.waiting-note { background: var(--sun-soft); border: 1px solid var(--sun); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.waiting { color: var(--waiting); font-weight: 700; }
.overdue { color: var(--err); font-weight: 700; }
.order-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Apka zadarmo */
.free-price { color: #2b8a3e; font-weight: 900; }
:root[data-theme="dark"] .free-price { color: var(--ok); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .free-price { color: var(--ok); } }
.free-box .free-form { margin-top: 8px; }
.free-school { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; font-size: 0.92rem; }
.free-school .btn { width: auto; }
.free-banner-wrap { padding-top: 24px; padding-bottom: 0; }
.free-banner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--card); border: 2px solid #2b8a3e; border-radius: var(--radius); padding: 16px 20px; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.free-banner:hover { transform: translateY(-2px); }
.free-banner-text { flex: 1; min-width: 200px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.free-banner-text strong { font-size: 1.15rem; }
.free-banner-short { color: var(--ink); }
.free-banner-text small { color: var(--muted); font-size: 0.92rem; }
.free-banner-cover { flex: 0 0 220px; }
.free-banner-cover .cover { border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 600px) { .free-banner-cover { flex-basis: 100%; } }
.free-badge { background: #2b8a3e; color: #fff; font-weight: 900; border-radius: 999px; padding: 4px 12px; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; }

/* Novinky a tip týždňa */
.tag-new { --c: #2b8a3e; }
.tip-section { padding-bottom: 0; }
.tip-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; align-items: center; background: var(--sun-soft); border: 1px solid var(--line); border-radius: 24px; padding: 24px; }
.tip-cover .cover { border-radius: var(--radius); border: 1px solid var(--line); }
.tip-body h2 { margin-bottom: 0.5rem; }
.tip-body h2 a { color: inherit; text-decoration: none; }
.tip-body h2 a:hover { text-decoration: underline; }
.tip-body .prose p { margin: 0 0 1rem; }
.tip-week { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 760px) { .tip-card { grid-template-columns: 1fr; padding: 18px; gap: 16px; } }

/* Prehliadač obrázkov (public/gallery.js) */
.gallery-cover { display: block; position: relative; cursor: zoom-in; }
.thumbs a { cursor: zoom-in; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; background: rgb(0 0 0 / 65%); color: #fff; font-weight: 800; font-size: 0.85rem; padding: 5px 10px; border-radius: 999px; }
.thumbs { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.lightbox-open { overflow: hidden; }
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgb(10 12 16 / 92%); color: #fff; }
.lightbox::backdrop { background: rgb(10 12 16 / 92%); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 8px 16px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgb(0 0 0 / 50%); }
.lightbox-count { font-weight: 700; opacity: 0.8; }
.lightbox button { background: rgb(255 255 255 / 12%); color: #fff; border: 0; cursor: pointer; font: inherit; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgb(255 255 255 / 25%); }
.lightbox-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 999px; font-size: 1.3rem; z-index: 1; }
.lightbox-nav { flex: none; width: 52px; height: 72px; margin: 0 8px; border-radius: 12px; font-size: 2.4rem; line-height: 1; }
@media (max-width: 640px) { .lightbox-nav { position: absolute; bottom: 14px; width: 56px; height: 48px; } .lightbox-prev { left: 12px; } .lightbox-next { right: 12px; } .lightbox figure { padding-bottom: 72px; } }
