/*
Theme Name: Soutez v4
Description: Mobile-first šablona soutez.org – výpis soutěží pod sebou, detail, skončené soutěže s podobnými běžícími. Vyžaduje plugin soutez-core.
Version: 0.1.0
Requires at least: 7.0
Requires PHP: 8.3
Author: soutez.org
Text Domain: soutez-v4
*/

/* ==========================================================================
   Proměnné
   ========================================================================== */
:root {
	--accent: #e06c00;
	--accent-strong: #b85600;
	--accent-soft: #fff3e6;
	--text: #1c1c1f;
	--muted: #5d6068;
	--bg: #f5f5f2;
	--surface: #ffffff;
	--border: #e3e2dd;
	--soon: #b93c08;
	--soon-soft: #fde9df;
	--ok: #137a43;
	--ok-soft: #e3f5ea;
	--hl: #8a5a00;
	--hl-soft: #fff1c7;
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgb(0 0 0 / .05), 0 4px 14px rgb(0 0 0 / .05);
	--gutter: 16px;
	--max: 1160px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color-scheme: light;
}

/* ==========================================================================
   Základ
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font: 16px/1.55 var(--font);
	color: var(--text);
	background: var(--bg);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-underline-offset: 2px; }
a:hover { color: var(--text); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.icon { flex: none; vertical-align: -0.2em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ==========================================================================
   Tlačítka, štítky, čipy
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 40px; padding: 8px 16px;
	font: 600 .95rem/1.2 var(--font); text-decoration: none; white-space: nowrap;
	border-radius: 999px; border: 1px solid transparent; cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }
.btn--lg { min-height: 52px; padding: 12px 28px; font-size: 1.1rem; width: 100%; }

.badge {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 2px 9px; border-radius: 999px;
	font-size: .78rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
	background: var(--ok-soft); color: var(--ok);
}
.badge .icon { width: 13px; height: 13px; }
.badge--soon { background: var(--soon-soft); color: var(--soon); }
.badge--ended { background: #ececea; color: var(--muted); }
.badge--hl { background: var(--hl-soft); color: var(--hl); }
.badge--new { background: var(--accent-soft); color: var(--accent-strong); }
.badge--type { background: #eef0f5; color: #3d4556; }
.badge-note { align-self: center; font-size: .7rem; color: #9a8f84; text-transform: lowercase; letter-spacing: .02em; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
	flex: none; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
	background: var(--surface); color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }

/* ==========================================================================
   Hlavička
   ========================================================================== */
/* Na mobilu se hlavička posouvá s obsahem (šetří místo), od tabletu zůstává nahoře. */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 50; }
@media (min-width: 768px) {
	.site-header { position: sticky; top: 0; }
	.admin-bar .site-header { top: 32px; }
}
.site-header__bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 60px; }

.logo { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo__svg { display: block; height: 36px; width: auto; }
.logo__word { fill: currentColor; }
.logo__tld { fill: var(--accent); }
@media (min-width: 768px) { .logo__svg { height: 42px; } }

.site-search { grid-column: 1 / -1; grid-row: 2; display: flex; margin-bottom: 10px; }
.site-search input {
	flex: 1; min-width: 0; height: 42px; padding: 0 14px;
	font: inherit; font-size: 16px; color: var(--text);
	background: var(--bg); border: 1px solid var(--border); border-right: 0; border-radius: 999px 0 0 999px;
}
.site-search input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.site-search button { width: 48px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 0 999px 999px 0; background: var(--accent); color: #fff; cursor: pointer; }

.site-header__actions { display: flex; align-items: center; gap: 8px; grid-column: 3; }
.btn--add { padding: 8px 14px; box-shadow: 0 2px 8px rgb(224 108 0 / .35); }
.btn--add__long { display: none; }
.icon-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--text); border: 1px solid var(--border); }
.icon-link:hover { border-color: var(--text); color: var(--text); }
.icon-link--user { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; font-size: .92rem; letter-spacing: .02em; text-decoration: none; }
.icon-link--user:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }

/* Kategorie – vodorovně posuvný pás (mobil i desktop) */
.catnav { border-top: 1px solid var(--border); }
.catnav__list { display: flex; gap: 4px; list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.catnav__list::-webkit-scrollbar { display: none; }
.catnav__list a { display: block; padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.catnav__list a:hover { color: var(--accent-strong); background: var(--accent-soft); }
.catnav__list a[aria-current] { color: #fff; background: var(--accent); }

@media (min-width: 768px) {
	.site-header__bar { grid-template-columns: auto minmax(0, 520px) auto; justify-content: space-between; min-height: 68px; }
	.site-search { grid-column: 2; grid-row: 1; margin: 0; }
	.btn--add__short { display: none; }
	.btn--add__long { display: inline; }
}

/* ==========================================================================
   Rozvržení
   ========================================================================== */
.layout { display: grid; gap: 24px; padding-top: 20px; padding-bottom: 48px; }
.layout__main { min-width: 0; }
.layout__side { display: none; }
@media (min-width: 1024px) {
	.layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding-top: 28px; }
	.layout--narrow { grid-template-columns: minmax(0, 760px); justify-content: center; }
	.layout__side { display: block; }
	.layout__sticky { position: sticky; top: 140px; }
}

.page-head { margin-bottom: 16px; }
.page-head h1 { margin-bottom: 4px; }
.page-head__desc { color: var(--muted); margin: 0; }

/* ==========================================================================
   Karta soutěže ve výpisu
   ========================================================================== */
.cards { display: grid; gap: 14px; }
.card {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	grid-template-areas: "media head" "body body";
	gap: 12px 14px;
	padding: 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.card__media { grid-area: media; align-self: start; }
.card__media img, .thumb-placeholder {
	width: 104px; height: 104px; object-fit: contain; background: #fafaf8; border-radius: var(--radius-sm);
}
.thumb-placeholder { display: grid; place-items: center; color: #c9c7c0; }
.thumb-placeholder .icon { width: 36px; height: 36px; }
.card__head { grid-area: head; min-width: 0; }
.card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.card__title { font-size: 1.05rem; margin: 0; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a:hover { color: var(--accent-strong); text-decoration: underline; }
.card__body { grid-area: body; min-width: 0; }
.card__excerpt { color: #3c3e44; margin: 0 0 8px; font-size: .95rem; }
.card__prizes { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; font-size: .93rem; font-weight: 600; }
.card__prizes .icon { color: var(--accent); margin-top: 2px; width: 18px; height: 18px; }
.card__prizes .muted { font-weight: 400; }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.card__org { font-size: .88rem; min-width: 0; overflow-wrap: anywhere; }
.card__org a { color: var(--text); }
.card__actions { display: flex; gap: 8px; margin-left: auto; }

/* Zvýrazněná (placená) soutěž: podbarvení jako položka menu po najetí. */
.card--hl { background: var(--accent-soft); border-color: #f6d3ad; }
.card--hl .card__foot { border-top-color: #f6d3ad; }
.card--hl .card__media img, .card--hl .thumb-placeholder { background: #fff; }
.card--hl .badge--hl, .mini--hl .badge--hl { background: var(--accent); color: #fff; }
.card--hl .badge--new { background: #fff; }
.card--ended .card__media img { filter: grayscale(1); opacity: .7; }
.card--ended .card__title a { color: var(--muted); }

@media (min-width: 768px) {
	.card {
		grid-template-columns: 168px minmax(0, 1fr);
		grid-template-areas: "media head" "media body";
		grid-template-rows: auto 1fr;
		padding: 18px;
		gap: 6px 20px;
	}
	.card__media img, .thumb-placeholder { width: 168px; height: 168px; }
	.card__title { font-size: 1.2rem; }
}

/* ==========================================================================
   Malé karty (podobné soutěže, panel)
   ========================================================================== */
.minis { display: grid; gap: 10px; }
.minis--grid { grid-template-columns: 1fr; }
@media (min-width: 600px) { .minis--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mini--hl { background: var(--accent-soft); border-color: #f6d3ad; }
.mini__media img, .mini .thumb-placeholder { width: 72px; height: 72px; object-fit: contain; border-radius: 6px; background: #fafaf8; }
.mini__title { font-size: .95rem; margin: 0 0 4px; line-height: 1.3; }
.mini__title a { color: var(--text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini__title a:hover { color: var(--accent-strong); }
.mini__meta { margin: 0; display: flex; gap: 4px; flex-wrap: wrap; }

/* ==========================================================================
   Panel
   ========================================================================== */
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.box__title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.box__title .icon { color: var(--accent); }
.box .mini { border: 0; padding: 6px 0; border-radius: 0; border-bottom: 1px solid var(--border); }
.box .mini:last-child { border-bottom: 0; }
.box__more { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .92rem; }

/* ==========================================================================
   Detail soutěže
   ========================================================================== */
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs .icon { width: 14px; height: 14px; }
.contest { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.contest__title { font-size: 1.5rem; margin-top: 4px; }
.contest__top { display: grid; gap: 18px; margin: 12px 0 20px; }
.contest__image img { width: 100%; max-height: 220px; object-fit: contain; background: #fafaf8; border-radius: var(--radius-sm); }
@media (min-width: 768px) { .contest__image img { max-height: 420px; } }
.contest__image { margin: 0; }
.facts { margin: 0 0 16px; display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.facts dd .badge { margin-left: 6px; }
.contest__cta { display: grid; gap: 10px; justify-items: center; }
.contest__rules { font-size: .9rem; }
.contest__disclaimer { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
.contest__report { margin: 24px 0 0; font-size: .85rem; }
.contest__report a { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.contest__report .icon { width: 15px; height: 15px; }
.related { margin-top: 28px; }

@media (min-width: 768px) {
	.contest { padding: 28px; }
	.contest__title { font-size: 2rem; }
	.contest__top { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
	.contest__top:not(:has(.contest__image)) { grid-template-columns: 1fr; }
	.btn--lg { width: auto; min-width: 260px; }
	.contest__cta { justify-items: start; }
}

/* Obsah soutěže */
.entry { overflow-wrap: anywhere; }
.entry img { border-radius: var(--radius-sm); margin: 8px 0; }
.entry .alignleft { float: none; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry blockquote { margin: 1em 0; padding: 8px 16px; border-left: 4px solid var(--accent); background: var(--bg); }
.entry table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: .92rem; }
.entry th, .entry td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.entry th { background: var(--bg); font-weight: 600; }
@media (max-width: 599px) { .entry table { display: block; overflow-x: auto; } }

/* Skončená soutěž */
.contest--ended .contest__title { color: var(--muted); }
.ended-notice {
	margin: 14px calc(-1 * 18px) 20px; padding: 18px;
	background: var(--accent-soft); border-block: 1px solid #f6d3ad;
}
.ended-notice h2 { font-size: 1.15rem; color: var(--accent-strong); margin-bottom: 4px; }
.ended-notice .minis { margin: 12px 0 16px; }
.archive-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 0 0; }
.contest--ended .contest__archive { filter: grayscale(1); opacity: .62; transition: opacity .2s; }
.contest--ended .contest__archive:hover { opacity: .85; }
@media (min-width: 768px) { .ended-notice { margin: 16px 0 24px; border: 1px solid #f6d3ad; border-radius: var(--radius); padding: 22px; } }

/* ==========================================================================
   Reklama (rezervovaná výška – bez posouvání stránky)
   ========================================================================== */
.ad { position: relative; display: grid; grid-template-rows: 16px 1fr; justify-items: center; align-items: center; min-height: var(--ad-h, 266px); margin: 6px 0; overflow: hidden; }
.ad__label { font-size: 10px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: #a3a29c; }
.ad--sidebar { min-height: var(--ad-h-lg, 616px); }
@media (min-width: 768px) { .ad { min-height: var(--ad-h-lg, 266px); } }
.ad--sidebar { display: none; }
@media (min-width: 1024px) { .ad--sidebar { display: grid; } }
.ad--detail_bottom_2 { display: none; }
@media (min-width: 768px) { .ad--detail_bottom_2 { display: grid; } }
/* Detail: dvě plochy 300×250 vedle sebe (na mobilu jen první) */
.ad-pair { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 20px 0; }
.ad-pair .ad { flex: 0 1 300px; margin: 0; }
.ad__placeholder { width: min(100%, var(--ad-w, 300px)); height: calc(var(--ad-h, 266px) - 16px); display: grid; place-content: center; text-align: center; gap: 4px; border: 2px dashed #d5d3cc; border-radius: var(--radius-sm); color: #9a9a95; font-size: .85rem; }
.ad__placeholder small { font-size: .78rem; }
@media (min-width: 768px) { .ad__placeholder { width: min(100%, var(--ad-w-lg, 728px)); height: calc(var(--ad-h-lg, 266px) - 16px); } }
.contest .ad { margin: 20px 0; }
.contest .ad-pair .ad { margin: 0; }

/* ==========================================================================
   Stránkování, prázdný stav, stránky
   ========================================================================== */
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 28px 0 0; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); font-weight: 600; }
.pagination .current { background: var(--text); color: #fff; border-color: var(--text); }
.pagination .dots { border: 0; background: none; }
.empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 28px; text-align: center; }
.page-article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.search-form { display: flex; gap: 8px; margin-top: 14px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; height: 42px; padding: 0 14px; font: inherit; border: 1px solid var(--border); border-radius: 999px; }
.search-form .search-submit { height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }

/* ==========================================================================
   Komentáře
   ========================================================================== */
.comments { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
@media (min-width: 768px) { .comments { padding: 28px; } }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 20px; padding-left: 14px; border-left: 2px solid var(--border); }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 999px; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8rem; margin: 2px 0 6px 50px; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-content { margin-left: 50px; }
.comment-content p { margin-bottom: .5em; }
.reply { margin-left: 50px; font-size: .85rem; }
.comment-respond { margin-top: 20px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.comment-form textarea { width: 100%; padding: 12px; font: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.comment-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.comment-form .submit { min-height: 44px; padding: 10px 22px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 600 1rem var(--font); cursor: pointer; }
.must-log-in { padding: 14px 16px; background: var(--accent-soft); border-radius: var(--radius-sm); }

/* ==========================================================================
   Patička
   ========================================================================== */
.site-footer { background: #1f1f22; color: #c9c9cc; padding: 36px 0 20px; margin-top: 24px; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer__inner { display: grid; gap: 24px; }
.logo--footer { color: #fff; margin-bottom: 10px; }
.logo--footer .logo__tld { fill: #ff9a3c; }
.logo--footer .logo__svg { height: 36px; }
.logo--footer:hover { color: #fff; }
.site-footer__note { color: #9d9da2; font-size: .85rem; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__copy { margin-top: 24px; padding-top: 16px; border-top: 1px solid #333338; color: #8d8d92; font-size: .82rem; }
@media (min-width: 768px) { .site-footer__inner { grid-template-columns: 2fr 1fr; } }

/* Stránky účtů z pluginu (registrace, můj účet) uvnitř této šablony */
.soutez-account { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 24px auto 48px; }

/* ==========================================================================
   Detail – ceny, tlačítko, O soutěži, Informace
   ========================================================================== */
.contest__main { min-width: 0; display: grid; gap: 16px; align-content: start; }
.contest__main .contest__head { margin: 0; }
.contest__main .contest__title { margin-bottom: 0; }

.prizes { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: #fcfcfa; }
.prizes__title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.prizes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prizes__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.prizes__item:last-child { border-bottom: 0; padding-bottom: 0; }
.prizes__label { font-weight: 700; color: var(--accent-strong); white-space: nowrap; font-size: .92rem; }
.prizes__name { font-weight: 600; overflow-wrap: anywhere; }
.prizes__qty { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.prizes__list--single .prizes__item { grid-template-columns: minmax(0, 1fr) auto; }
.prizes__list--single .prizes__name { font-size: 1.1rem; }
.prizes__total { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }

.contest__cta { display: grid; gap: 8px; }
.cta-note { margin: 0; font-size: .78rem; line-height: 1.45; color: var(--muted); text-align: center; }
@media (min-width: 768px) { .cta-note { text-align: left; } }

.contest__about, .contest__info { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.contest__about h2, .contest__info h2 { font-size: 1.15rem; }
.contest__info .facts { margin-bottom: 12px; }
.contest__info .facts > div { grid-template-columns: 120px minmax(0, 1fr); }
.contest__info .contest__report { margin-top: 12px; }
.contest__archive { min-width: 0; }
.related .box__more { margin-top: 12px; }
/* Na mobilu název nad obrázkem (obrázek a název jsou v různých sloupcích desktopového rozvržení). */
@media (max-width: 767px) {
	.contest__top .contest__main { display: contents; }
	.contest__top .contest__head { order: -1; }
}

/* Karta: popisek „Cena:/Ceny:“ a datum konce v patičce */
.card__prizes-label { color: var(--muted); font-weight: 500; margin-right: 4px; }
.card__date { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.card__date .icon { width: 16px; height: 16px; }

/* Skončená soutěž ve výpisu: jemně šedé pozadí celé karty, ať se odliší od běžících */
.card--ended { background: #efefec; border-color: #e0dfda; box-shadow: none; }
.card--ended .card__media img, .card--ended .thumb-placeholder { background: #e6e5e1; }
.card--ended .card__excerpt, .card--ended .card__prizes { color: var(--muted); }
.card--ended .card__foot { border-top-color: #dcdbd5; }
.card__date--running { color: var(--ok); font-weight: 600; }
.card__date--soon { color: var(--soon); font-weight: 700; }

/* Obrázky ve výpisu vyplní celou plochu (výřez na střed) – jednotný vzhled
   bez ohledu na to, jestli je obrázek na výšku nebo na šířku. Detail ukazuje celý obrázek. */
.card__media { display: block; overflow: hidden; border-radius: var(--radius-sm); }
.card__media img { object-fit: cover; object-position: center; transition: transform .25s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.mini__media { display: block; overflow: hidden; border-radius: 6px; }
.mini__media img { object-fit: cover; object-position: center; }
@media (min-width: 768px) {
	.card { grid-template-columns: 200px minmax(0, 1fr); }
	.card__media img, .card .thumb-placeholder { width: 200px; height: 150px; }
}
@media (prefers-reduced-motion: reduce) { .card:hover .card__media img { transform: none; } }

/* ==========================================================================
   Menu kategorií: mobil = posuvný pás se všemi (s náznakem pokračování),
   desktop (≥ 1100 px) = hlavní kategorie + „Další kategorie“ v rozbalovací nabídce
   ========================================================================== */
.catnav { position: relative; }
.catnav__more { display: none; }
@media (max-width: 1099px) {
	/* jemné ztmavení vpravo naznačuje, že pás jde posunout */
	.catnav::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; pointer-events: none; background: linear-gradient(90deg, rgb(255 255 255 / 0), var(--surface)); }
}
@media (min-width: 1100px) {
	.catnav__list { overflow: visible; flex-wrap: nowrap; }
	.catnav__extra { display: none; }
	.catnav__more { display: block; position: relative; margin-left: auto; }
	.catnav__more summary {
		list-style: none; cursor: pointer; padding: 6px 12px; border-radius: 999px;
		color: var(--muted); font-size: .9rem; font-weight: 600; white-space: nowrap;
	}
	.catnav__more summary::-webkit-details-marker { display: none; }
	.catnav__more summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .15s; }
	.catnav__more details[open] summary::after { transform: translateY(0) rotate(-135deg); }
	.catnav__more summary:hover { color: var(--accent-strong); background: var(--accent-soft); }
	.catnav__more summary.is-active { color: #fff; background: var(--accent); }
	.catnav__dropdown {
		position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
		min-width: 240px; margin: 0; padding: 8px; list-style: none;
		background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgb(0 0 0 / .12);
		display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
	}
	.catnav__dropdown a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); white-space: nowrap; }
}
