/* =========================================================
   Recepty od počítače – návrh 2027
   mobile first: základ = telefon, rozšíření přes min-width
   ========================================================= */

@view-transition { navigation: auto; }

:root {
	--bg: #fff7ec;
	--surface: #ffffff;
	--surface-2: #fdeedb;
	--ink: #2b1a12;
	--muted: #7a6253;
	--line: #2b1a12;

	--tomato: #e8462e;
	--mustard: #f4b52a;
	--sage: #8fb573;
	--berry: #d9497f;
	--sky: #5aa9d6;
	--orange: #f08a3c;
	--plum: #8a5bb0;

	--radius: 22px;
	--radius-s: 14px;
	--shadow: 4px 4px 0 var(--line);
	--shadow-hover: 7px 7px 0 var(--line);

	--font-display: 'Bricolage Grotesque', system-ui, sans-serif;
	--font-text: 'Inter', system-ui, sans-serif;
	--font-hand: 'Caveat', cursive;

	--gutter: 16px;
	--tabbar-h: 72px;
	--bounce: cubic-bezier(.34, 1.56, .64, 1);

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #1b1310;
		--surface: #2a1f1a;
		--surface-2: #362720;
		--ink: #fbefe2;
		--muted: #c7ae9b;
		--line: #0b0705;
		--shadow: 4px 4px 0 #0b0705;
		--shadow-hover: 7px 7px 0 #0b0705;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #1b1310;
	--surface: #2a1f1a;
	--surface-2: #362720;
	--ink: #fbefe2;
	--muted: #c7ae9b;
	--line: #0b0705;
	--shadow: 4px 4px 0 #0b0705;
	--shadow-hover: 7px 7px 0 #0b0705;
	color-scheme: dark;
}

/* barvy kategorií */
.t-yellow { --c: var(--mustard); }
.t-red    { --c: var(--tomato); }
.t-green  { --c: var(--sage); }
.t-pink   { --c: var(--berry); }
.t-blue   { --c: var(--sky); }
.t-orange { --c: var(--orange); }
.t-plum   { --c: var(--plum); }

/* ---------- základ ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	background: var(--bg);
	color: var(--ink);
	font: 400 1rem/1.6 var(--font-text);
	/* místo pro mobilní tab bar drží patička (je poslední a podbarvená až dolů) */
	overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
ul, ol { list-style: none; }

:focus-visible {
	outline: 3px solid var(--tomato);
	outline-offset: 3px;
	border-radius: 8px;
}

h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.02em;
}
h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); }

.wrap {
	width: 100%;
	max-width: 1500px;
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section { margin-block: 40px; }
.section-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}
.section-head a {
	font-weight: 600;
	font-size: .9rem;
	text-decoration: none;
	color: var(--tomato);
	white-space: nowrap;
}

.hand {
	font-family: var(--font-hand);
	font-weight: 600;
	color: var(--tomato);
	font-size: 1.5em;
	line-height: 1;
}

/* ---------- horní lišta ---------- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}
.topbar .wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 64px;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	margin-right: auto;
}
.logo-mark {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	background: var(--mustard);
	border: 2px solid var(--line);
	border-radius: 46% 54% 38% 62% / 55% 40% 60% 45%;
	font-size: 1.3rem;
	transform: rotate(-8deg);
	transition: transform .4s var(--bounce);
}
.logo:hover .logo-mark { transform: rotate(10deg) scale(1.08); }
.logo-text {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.15rem;
	line-height: 1;
}
.logo-text small {
	display: block;
	font-family: var(--font-hand);
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--tomato);
}

.topnav { display: none; }

.icon-btn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2px solid var(--line);
	background: var(--surface);
	box-shadow: 2px 2px 0 var(--line);
	cursor: pointer;
	transition: transform .25s var(--bounce), box-shadow .25s;
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- vyhledávání ---------- */
.search {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--surface);
	border: 2px solid var(--line);
	border-radius: 999px;
	padding: 6px 6px 6px 18px;
	box-shadow: var(--shadow);
	transition: box-shadow .25s, transform .25s;
}
.search:focus-within { box-shadow: var(--shadow-hover); transform: translate(-2px, -2px); }
.search input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: none;
	outline: none;
	padding: 8px 0;
	font-size: 1rem;
}
.search input::placeholder { color: var(--muted); }
.search button {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: var(--tomato);
	color: #fff;
	cursor: pointer;
	transition: transform .3s var(--bounce);
}
.search button:hover { transform: rotate(-15deg) scale(1.08); }
.search button svg { width: 20px; height: 20px; }

/* ---------- hero úvodu ---------- */
.hero {
	position: relative;
	padding-block: 24px 8px;
}
.hero h1 {
	font-size: clamp(2.6rem, 1.6rem + 6vw, 5.5rem);
	margin-bottom: 14px;
}
.hero h1 .squiggle {
	position: relative;
	display: inline-block;
	color: var(--tomato);
}
.hero h1 .squiggle::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -.12em;
	height: .2em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 8'%3E%3Cpath d='M0 4 Q5 0 10 4 T20 4 T30 4 T40 4' fill='none' stroke='%23f4b52a' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
	background-size: auto 100%;
}
.hero p {
	color: var(--muted);
	max-width: 34ch;
	margin-bottom: 22px;
}
.hero-doodle {
	position: absolute;
	right: 0;
	top: 8px;
	font-size: 3rem;
	transform: rotate(14deg);
	animation: wobble 5s ease-in-out infinite;
	pointer-events: none;
}
/* koláž fotek vedle nadpisu – jen na větších obrazovkách */
.hero-photos { display: none; }

@keyframes wobble {
	0%, 100% { transform: rotate(14deg) translateY(0); }
	50% { transform: rotate(-6deg) translateY(-8px); }
}

/* ---------- čipy kategorií ---------- */
.chips {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding: 6px var(--gutter) 14px;
	margin-inline: calc(var(--gutter) * -1);
	scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
	flex: none;
	scroll-snap-align: start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 2px solid var(--line);
	border-radius: 999px;
	background: color-mix(in srgb, var(--c, var(--surface-2)) 30%, var(--surface));
	box-shadow: 2px 2px 0 var(--line);
	font-weight: 600;
	font-size: .92rem;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .25s var(--bounce), background .2s;
}
.chip:hover { transform: translateY(-3px) rotate(-2deg); background: var(--c, var(--surface-2)); color: #2b1a12; }
.chip[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* malý štítek na kartě */
.tag {
	display: inline-block;
	align-self: flex-start;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--c, var(--mustard));
	color: #2b1a12;
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-decoration: none;
}

/* ---------- karty receptů ---------- */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
	gap: 18px 14px;
}

.card {
	container-type: inline-size;
	position: relative;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	background: var(--surface);
	border: 2px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: clip; /* ne hidden: to by z karty udělalo scroll kontejner a rozbilo animace při scrollu */
	transition: transform .35s var(--bounce), box-shadow .35s;
}
.card:nth-child(3n+1):hover { transform: translate(-3px, -3px) rotate(-1.5deg); }
.card:nth-child(3n+2):hover { transform: translate(-3px, -3px) rotate(1.5deg); }
.card:nth-child(3n):hover   { transform: translate(-3px, -3px) rotate(-.8deg); }
.card:hover { box-shadow: var(--shadow-hover); }
.card:active { transform: scale(.97) !important; }

.card-img {
	aspect-ratio: 1;
	overflow: clip;
	border-bottom: 2px solid var(--line);
	background: var(--surface-2);
}
.card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}
.card:hover .card-img img { transform: scale(1.08); }

.card-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px 12px 14px;
}
.card-body h3 {
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.card .tag { align-self: flex-start; }

@container (min-width: 230px) {
	.card-img { aspect-ratio: 4 / 3; }
	.card-body { padding: 14px 16px 18px; }
	.card-body h3 { font-size: 1.25rem; }
}

/* nástup karet při scrollu */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.grid .card, .carousel .card {
			animation: pop-in linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 55%;
		}
	}
}
@keyframes pop-in {
	from { opacity: 0; transform: translateY(30px) scale(.94) rotate(-2deg); }
	to   { opacity: 1; transform: none; }
}

/* ---------- recept dne ---------- */
.featured {
	display: grid;
	text-decoration: none;
	background: var(--mustard);
	color: #2b1a12;
	border: 2px solid var(--line);
	border-radius: calc(var(--radius) + 6px);
	box-shadow: var(--shadow);
	overflow: clip;
	transition: transform .35s var(--bounce), box-shadow .35s;
}
.featured:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-hover); }
.featured-img {
	aspect-ratio: 4 / 3;
	overflow: clip;
	border-bottom: 2px solid var(--line);
}
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-body {
	position: relative;
	padding: 20px 20px 24px;
}
.featured-body .badge {
	position: absolute;
	top: -26px;
	right: 18px;
	display: grid;
	place-items: center;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: var(--tomato);
	color: #fff;
	border: 2px solid var(--line);
	font-family: var(--font-hand);
	font-size: 1.25rem;
	line-height: 1;
	text-align: center;
	transform: rotate(12deg);
	animation: spin-slow 12s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(372deg); } }
.featured-body h3 { font-size: clamp(1.8rem, 1.3rem + 2.5vw, 3rem); margin: 6px 0 8px; }
.featured-body p { max-width: 42ch; }
.featured .tag { --c: #fff; }

/* ---------- překvap mě ---------- */
.surprise {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	text-align: center;
	padding: 30px 20px;
	background: var(--surface-2);
	border: 2px dashed color-mix(in srgb, var(--ink) 40%, transparent);
	border-radius: calc(var(--radius) + 6px);
}
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 10px 22px;
	border: 2px solid var(--line);
	border-radius: 999px;
	background: var(--tomato);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	box-shadow: var(--shadow);
	cursor: pointer;
	transition: transform .25s var(--bounce), box-shadow .25s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hover); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--line); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn .dice { display: inline-block; transition: transform .6s var(--bounce); }
.btn:hover .dice { transform: rotate(360deg); }
.btn.rolling .dice { animation: roll .5s linear infinite; }
@keyframes roll { to { transform: rotate(360deg); } }

/* ---------- kuchyně světa ---------- */
.cuisines {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 10px;
}
.cuisine {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 14px 8px;
	background: var(--surface);
	border: 2px solid var(--line);
	border-radius: var(--radius-s);
	box-shadow: 2px 2px 0 var(--line);
	text-decoration: none;
	font-weight: 600;
	font-size: .88rem;
	transition: transform .25s var(--bounce);
}
.cuisine span { font-size: 1.8rem; line-height: 1; }
.cuisine:hover { transform: translateY(-4px) rotate(2deg); }

/* ---------- stránkování ---------- */
.pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
}
.pager a {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 10px;
	border: 2px solid var(--line);
	border-radius: 14px;
	background: var(--surface);
	font-weight: 700;
	text-decoration: none;
	transition: transform .2s var(--bounce);
}
.pager a:hover { transform: translateY(-3px); }
.pager a[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* ---------- reklama (pevná výška proti poskakování) ---------- */
.reklama {
	display: grid;
	place-items: center;
	min-height: 280px;
	margin-block: 40px;
	border-radius: var(--radius);
	background: repeating-linear-gradient(45deg, var(--surface-2) 0 12px, transparent 12px 24px);
	color: var(--muted);
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .1em;
}
/* reklama nikdy širší než svůj blok – AdSense jinak vloží pevně široký iframe a roztlačí stránku */
.reklama { min-width: 0; max-width: 100%; overflow: hidden; }
.reklama ins, .reklama iframe { max-width: 100% !important; }
/* automatické reklamy (Google je vkládá kamkoli do obsahu) */
.google-auto-placed { max-width: 100%; overflow: hidden; }
.google-auto-placed ins, .google-auto-placed iframe { max-width: 100% !important; }
.panel { min-width: 0; }
/* reklama uvnitř receptu: jen na jednom typu zařízení, menší okraje */
.panel .reklama { margin-block: 28px 0; }
@media (min-width: 900px) { .reklama-mobil { display: none; } }
@media (max-width: 899.98px) { .reklama-desktop { display: none; } }

/* ---------- patička ---------- */
/* patička: podbarvený pruh přes celou šířku – projekty a copyright nepatří k receptům */
.footer {
	margin-top: 60px;
	padding: 40px 0 calc(32px + var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
	background: var(--ink);
	color: color-mix(in srgb, var(--bg) 80%, transparent);
	font-size: .85rem;
	text-align: center;
}
.footer a { color: var(--bg); }
.footer a:hover { color: var(--mustard); }
@media (min-width: 900px) {
	.footer { padding-bottom: 32px; }
}
.footer .hand { display: block; margin-bottom: 8px; }
.footer-spodek {
	margin-top: 32px;
	padding-top: 20px;
	border-top: 1px solid color-mix(in srgb, var(--bg) 25%, transparent);
}

/* další projekty autora (světlé karty na tmavém pruhu patičky) */
.projekty { text-align: left; }
.projekty h2 { margin-bottom: 16px; font-size: 1.3rem; color: var(--bg); }
.projekty ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.footer .projekty a {
	display: flex;
	flex-direction: column;
	gap: 3px;
	height: 100%;
	padding: 12px 14px;
	border: 2px solid transparent;
	border-radius: var(--radius-s);
	background: var(--bg);
	color: var(--muted);
	text-decoration: none;
	transition: transform .25s var(--bounce), border-color .2s;
}
.footer .projekty a:hover { transform: translateY(-3px); border-color: var(--mustard); color: var(--muted); }
.projekty b { color: var(--ink); font-size: .98rem; }
.projekty .projekt-stitek { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tomato); }
.projekty .projekt-popis { font-size: .8rem; line-height: 1.4; }
.projekty .projekt-url { margin-top: auto; padding-top: 4px; font-size: .75rem; color: var(--ink); }

/* ---------- spodní tab bar (mobil) ---------- */
.tabbar {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: calc(10px + env(safe-area-inset-bottom));
	z-index: 60;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	height: var(--tabbar-h);
	padding: 6px;
	background: var(--ink);
	color: var(--bg);
	border-radius: 26px;
	box-shadow: 0 10px 30px rgb(0 0 0 / .25);
}
.tabbar a, .tabbar button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 0;
	background: none;
	border-radius: 20px;
	font-size: .7rem;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: background .2s, transform .25s var(--bounce);
}
.tabbar span[aria-hidden] { font-size: 1.35rem; line-height: 1; transition: transform .3s var(--bounce); }
.tabbar a:active span[aria-hidden], .tabbar button:active span[aria-hidden] { transform: scale(1.3) rotate(-10deg); }
.tabbar [aria-current="page"] { background: color-mix(in srgb, var(--bg) 16%, transparent); }

/* ---------- bottom sheet ---------- */
.sheet {
	position: fixed;
	inset: auto 0 0 0;
	width: 100%;
	max-width: 640px;
	max-height: 80dvh;
	margin: 0 auto;
	padding: 10px var(--gutter) calc(24px + env(safe-area-inset-bottom));
	border: 2px solid var(--line);
	border-bottom: 0;
	border-radius: 30px 30px 0 0;
	background: var(--bg);
	color: var(--ink);
	overflow-y: auto;
}
.sheet[open] { animation: sheet-up .4s var(--bounce); }
.sheet::backdrop { background: rgb(20 10 5 / .45); backdrop-filter: blur(3px); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-handle {
	width: 48px;
	height: 5px;
	margin: 0 auto 14px;
	border-radius: 5px;
	background: color-mix(in srgb, var(--ink) 25%, transparent);
}
.sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.sheet .chips-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* =========================================================
   DETAIL RECEPTU
   ========================================================= */
.recipe-hero {
	position: relative;
	margin-inline: calc(var(--gutter) * -1);
}
.recipe-hero img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0 0 40px 40px;
	view-transition-name: recept-foto;
}
.recipe-hero .back {
	position: absolute;
	top: 12px;
	left: var(--gutter);
}

.recipe-head {
	position: relative;
	margin-top: -38px;
	padding: 22px 20px 20px;
	background: var(--surface);
	border: 2px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.recipe-head h1 {
	font-size: clamp(2.4rem, 1.6rem + 5vw, 4.5rem);
	margin: 10px 0 12px;
}
.recipe-head h1, .card-body h3 { text-wrap: balance; }

/* dlouhé názvy „Název - vysvětlení“: část za pomlčkou jako podtitul */
.recipe-head h1 small,
.card-body h3 small {
	display: block;
	margin-top: .3em;
	font-family: var(--font-text);
	font-size: clamp(1rem, .9rem + .6vw, 1.35rem);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.3;
	color: var(--muted);
	text-shadow: none;
}
.card-body h3 small { font-size: .78rem; font-weight: 500; }

.recipe-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}
.recipe-meta .chip { font-size: .85rem; padding: 6px 12px; }
.recipe-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.recipe-actions .btn { flex: 1 1 auto; white-space: nowrap; }

.crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: .82rem;
	color: var(--muted);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--tomato); }
.crumbs li + li::before { content: '›'; margin-right: 6px; }

/* přepínač Co do toho? / Co s tím? */
.segmented {
	position: sticky;
	top: 72px;
	z-index: 20;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	margin: 26px 0 18px;
	padding: 5px;
	background: var(--surface-2);
	border: 2px solid var(--line);
	border-radius: 999px;
}
.segmented button {
	min-height: 44px;
	border: 0;
	border-radius: 999px;
	background: none;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.05rem;
	cursor: pointer;
	transition: background .25s, color .25s;
}
.segmented button[aria-selected="true"] {
	background: var(--ink);
	color: var(--bg);
}
.segmented .count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	margin-left: 4px;
	border-radius: 999px;
	background: var(--mustard);
	color: #2b1a12;
	font-family: var(--font-text);
	font-size: .72rem;
}

.recipe-body [role="tabpanel"][hidden] { display: none; }

.panel {
	background: var(--surface);
	border: 2px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
}
.panel h2 { font-size: 1.8rem; margin-bottom: 4px; }

/* progress ingrediencí */
.progress {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 6px 0 16px;
	font-size: .85rem;
	font-weight: 600;
	color: var(--muted);
}
.progress-bar {
	flex: 1;
	height: 12px;
	border: 2px solid var(--line);
	border-radius: 999px;
	background: var(--surface-2);
	overflow: hidden;
}
.progress-bar i {
	display: block;
	width: var(--p, 0%);
	height: 100%;
	background: var(--sage);
	border-radius: 999px;
	transition: width .5s var(--bounce);
}
.panel.done .progress-bar i { background: var(--mustard); }

/* checklist */
.checklist li + li { border-top: 2px dashed color-mix(in srgb, var(--ink) 12%, transparent); }
.checklist label {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 52px;
	padding: 8px 4px;
	cursor: pointer;
	user-select: none;
}
.checklist input {
	appearance: none;
	flex: none;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 2px solid var(--line);
	border-radius: 9px;
	background: var(--surface);
	cursor: pointer;
	transition: background .2s, transform .3s var(--bounce);
}
.checklist input::after {
	content: '';
	width: 7px;
	height: 13px;
	margin-top: -3px;
	border: solid #fff;
	border-width: 0 3px 3px 0;
	transform: rotate(45deg) scale(0);
	transition: transform .3s var(--bounce);
}
.checklist input:checked { background: var(--sage); transform: rotate(-8deg); }
.checklist input:checked::after { transform: rotate(45deg) scale(1); }
.checklist label:has(input:checked) span {
	color: var(--muted);
	text-decoration: line-through;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--tomato);
}

/* kroky postupu */
.steps { counter-reset: krok; display: grid; gap: 14px; margin-top: 14px; }
.steps li { counter-increment: krok; }
.steps button {
	position: relative;
	display: block;
	width: 100%;
	padding: 16px 16px 16px 66px;
	border: 2px solid var(--line);
	border-radius: var(--radius-s);
	background: var(--bg);
	text-align: left;
	line-height: 1.6;
	cursor: pointer;
	transition: transform .25s var(--bounce), opacity .25s;
}
.steps button::before {
	content: counter(krok);
	position: absolute;
	left: 14px;
	top: 14px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 2px solid var(--line);
	border-radius: 50%;
	background: var(--mustard);
	color: #2b1a12;
	font-family: var(--font-display);
	font-weight: 800;
	transition: background .2s;
}
.steps button:hover { transform: translateX(4px); }
.steps button[aria-pressed="true"] { opacity: .55; }
.steps button[aria-pressed="true"]::before { content: '✓'; background: var(--sage); }

.tip {
	position: relative;
	margin-top: 22px;
	padding: 16px 18px 16px 56px;
	background: color-mix(in srgb, var(--mustard) 25%, var(--surface));
	border-radius: var(--radius-s);
	transform: rotate(-1deg);
}
.tip::before {
	content: '💡';
	position: absolute;
	left: 16px;
	top: 14px;
	font-size: 1.5rem;
}
.tip .hand { font-size: 1.6rem; color: var(--ink); }

/* karusel podobných */
.carousel {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 62%;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 6px var(--gutter) 16px;
	margin-inline: calc(var(--gutter) * -1);
	scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .card { scroll-snap-align: start; }

/* režim vaření */
body.cook-mode { font-size: 1.2rem; }
body.cook-mode .tabbar,
body.cook-mode .reklama,
body.cook-mode .similar { display: none; }
body.cook-mode .cook-btn { background: var(--sage); color: #2b1a12; }

/* konfety */
.confetti {
	position: fixed;
	z-index: 100;
	pointer-events: none;
	font-size: 1.4rem;
	animation: confetti 1.1s cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes confetti {
	to {
		transform: translate(var(--x), var(--y)) rotate(var(--r));
		opacity: 0;
	}
}

.toast {
	position: fixed;
	left: 50%;
	bottom: calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom));
	z-index: 90;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--ink);
	color: var(--bg);
	font-weight: 600;
	font-size: .9rem;
	transform: translate(-50%, 20px);
	opacity: 0;
	transition: transform .35s var(--bounce), opacity .25s;
	pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* =========================================================
   Větší obrazovky
   ========================================================= */
@media (min-width: 600px) {
	:root { --gutter: 24px; }
	.featured { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
	.featured-img { aspect-ratio: auto; height: clamp(280px, 30vw, 480px); border-bottom: 0; border-right: 2px solid var(--line); }
	.featured-body { display: flex; flex-direction: column; justify-content: center; padding: 32px; }
	.featured-body .badge { top: 18px; right: 18px; }
	.carousel { grid-auto-columns: 34%; }
	.recipe-hero img { aspect-ratio: 16 / 9; }
}

@media (min-width: 900px) {
	:root { --gutter: 32px; }
	body { padding-bottom: 0; }

	.tabbar { display: none; }
	.topnav {
		display: flex;
		gap: 6px;
	}
	.topnav a, .topnav button {
		padding: 8px 14px;
		border: 0;
		border-radius: 999px;
		background: none;
		font-weight: 600;
		text-decoration: none;
		cursor: pointer;
		transition: background .2s;
	}
	.topnav a:hover, .topnav button:hover { background: var(--surface-2); }
	.topbar .wrap { height: 76px; }

	.hero {
		display: grid;
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		/* prázdné řádky nahoře a dole drží text svisle uprostřed vedle fotek */
		grid-template-rows: 1fr auto auto auto 1fr;
		column-gap: 48px;
		padding-block: 40px 16px;
	}
	.hero > :not(.hero-photos, .hero-doodle) { grid-column: 1; }
	.hero h1 { grid-row: 2; }
	.hero p { grid-row: 3; }
	.hero .search { grid-row: 4; }
	.hero .search { max-width: 560px; }
	.hero-doodle { font-size: 5rem; right: 2%; top: 20px; z-index: 2; }

	.hero-photos {
		display: block;
		position: relative;
		grid-column: 2;
		grid-row: 1 / -1;
		aspect-ratio: 1;
		max-width: 640px;
		width: 100%;
		justify-self: center;
	}
	.hero-photos img {
		position: absolute;
		object-fit: cover;
		border: 2px solid var(--line);
		border-radius: var(--radius);
		box-shadow: var(--shadow-hover);
		animation: float 6s ease-in-out infinite;
	}
	.hero-photos .p1 { width: 62%; aspect-ratio: 1; left: 18%; top: 12%; transform: rotate(-4deg); z-index: 1; }
	.hero-photos .p2 { width: 40%; aspect-ratio: 1; left: 0; top: 0; transform: rotate(6deg); animation-delay: -2s; }
	.hero-photos .p3 { width: 42%; aspect-ratio: 1; right: 0; bottom: 0; transform: rotate(7deg); z-index: 2; animation-delay: -4s; }
	@keyframes float {
		50% { translate: 0 -10px; }
	}

	.grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 24px; }

	/* detail: hero vedle hlavičky, panely ve 2 sloupcích */
	.recipe-top {
		display: grid;
		grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
		align-items: center;
		gap: 32px;
		margin-top: 16px;
	}
	.recipe-hero { margin-inline: 0; }
	.recipe-hero img {
		aspect-ratio: 4 / 3;
		max-height: 600px; /* na širokých monitorech fotku nenafukovat */
		border: 2px solid var(--line);
		border-radius: 40px;
		box-shadow: var(--shadow-hover);
		transform: rotate(-1.5deg);
	}
	.recipe-head { margin-top: 0; }

	.segmented { display: none; }
	.recipe-body {
		display: grid;
		/* minmax(0, …): sloupec se nesmí roztáhnout podle obsahu (reklama s pevnou šířkou by rozbila stránku) */
		grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
		align-items: start;
		gap: 32px;
		margin-top: 40px;
	}
	.recipe-body [role="tabpanel"][hidden] { display: block; }
	#panel-ingredience { position: sticky; top: 96px; }
	.panel { padding: 28px; }
}

/* myš / velká obrazovka: místo vodorovného posouvání zalomit do řádků */
@media (min-width: 900px), (pointer: fine) {
	.chips {
		flex-wrap: wrap;
		overflow: visible;
		margin-inline: 0;
		padding-inline: 0;
	}
	.carousel {
		grid-auto-flow: row;
		grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
		overflow: visible;
		margin-inline: 0;
		padding-inline: 0;
	}
}

/* 4K při 100 % / ultraširoké monitory: celý web úměrně zvětšit,
   aby nebyl malý ostrůvek uprostřed (po zvětšení vychází okno vždy ~1900 px) */
@media (min-width: 2400px) { html { zoom: 1.25; } }
@media (min-width: 2880px) { html { zoom: 1.5; } }
@media (min-width: 3400px) { html { zoom: 1.75; } }
@media (min-width: 3800px) { html { zoom: 2; } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
	@view-transition { navigation: none; }
}

/* =========================================================
   Doplňky pro PHP web (prvky, které statický návrh neměl)
   ========================================================= */

/* záhlaví seznamů (kategorie, kuchyně, hledání, 404) */
.stranka-hlavicka { padding-block: 28px 8px; }
.stranka-hlavicka p { color: var(--muted); margin: -4px 0 18px; }
.stranka-hlavicka .search { max-width: 560px; }
.stranka-nadpis { font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem); margin-bottom: 16px; }
.stranka-nadpis small { font-size: .45em; color: var(--muted); }
.stranka-pocet { margin-top: 14px; font-weight: 600; }

/* recept bez fotky – „Nevař mě, nejsem vyzkoušenej“ jako na starém webu */
.card-bez-fotky, .hero-bez-fotky {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .2em;
	width: 100%;
	height: 100%;
	padding: 8%;
	text-align: center;
	background: color-mix(in srgb, var(--mustard) 35%, var(--surface));
}
.card-bez-fotky { font-size: clamp(2.2rem, 22cqi, 3.5rem); }
.card-bez-fotky .hand, .hero-bez-fotky .hand { font-size: clamp(.75rem, 7cqi, 1.15rem); line-height: 1.25; text-wrap: balance; }
.hero-bez-fotky {
	min-height: 220px;
	aspect-ratio: 16 / 9;
	font-size: 4rem;
	border-radius: 0 0 40px 40px;
}
.hero-bez-fotky .hand { font-size: clamp(1rem, .8rem + 1.2vw, 1.5rem); }

/* perex pod nadpisem receptu */
.recipe-perex { margin: -2px 0 16px; color: var(--muted); }
.recipe-perex p + p { margin-top: .5em; }

/* nadpis skupiny ingrediencí („Na tvaroh“) */
.panel h3.sekce {
	margin: 20px 0 2px;
	font-size: 1.05rem;
	color: var(--tomato);
}
.checklist .mnozstvi { font-weight: 700; white-space: nowrap; }
.checklist a, .steps a, .postup-text a { color: var(--tomato); }

/* přepočet množství: porce − 4 + / násobek ½× 1× 2× 3× */
.prepocet {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 4px 0 14px;
	font-weight: 600;
	font-size: .92rem;
}
.prepocet > span { margin-right: 4px; }
.prepocet button {
	min-width: 40px;
	height: 36px;
	padding: 0 12px;
	border: 2px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	box-shadow: 2px 2px 0 var(--line);
	color: var(--ink);
	font: inherit;
	cursor: pointer;
	transition: transform .2s var(--bounce);
}
.prepocet button:hover { transform: translateY(-2px); }
.prepocet button:active { transform: scale(.94); }
.prepocet button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.prepocet output { min-width: 5.5em; text-align: center; }

/* okno hledání (lupa): shora – na mobilu by spodní okno zakryla klávesnice; pozadí rozmazané jako u menu */
.sheet.hledani {
	inset: 0 0 auto 0;
	max-height: 90dvh;
	padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 20px;
	border: 2px solid var(--line);
	border-top: 0;
	border-radius: 0 0 30px 30px;
}
.sheet.hledani[open] { animation: hledani-dolu .35s var(--bounce); }
.sheet.hledani::backdrop { backdrop-filter: blur(6px); }
@keyframes hledani-dolu { from { transform: translateY(-100%); } }
@media (prefers-reduced-motion: reduce) { .sheet[open], .sheet.hledani[open] { animation: none; } }
.hledani .search input { font-size: 1.1rem; }
.hledani-vysledky { margin-top: 16px; }
.hledani-vysledky .chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hledani-seznam { display: grid; gap: 4px; }
.hledani-seznam a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px;
	border-radius: var(--radius-s);
	text-decoration: none;
}
.hledani-seznam a:hover, .hledani-seznam a:focus-visible { background: var(--surface-2); }
.hledani-seznam img, .hledani-seznam .bez-fotky {
	flex: none;
	width: 56px;
	height: 56px;
	border: 2px solid var(--line);
	border-radius: var(--radius-s);
	object-fit: cover;
}
.hledani-seznam .bez-fotky { display: grid; place-items: center; background: color-mix(in srgb, var(--mustard) 35%, var(--surface)); }
.hledani-seznam span:not(.bez-fotky) { display: flex; flex-direction: column; min-width: 0; }
.hledani-seznam small { color: var(--muted); }
.hledani-vse { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--tomato); }
.hledani-nic { color: var(--muted); }

/* minutky: tlačítka pod krokem postupu + lišta běžících minutek */
.minutky { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.steps .minutky { padding-left: 66px; }
.minutka-btn {
	padding: 5px 12px;
	border: 2px solid var(--line);
	border-radius: 999px;
	background: color-mix(in srgb, var(--mustard) 45%, var(--surface));
	box-shadow: 2px 2px 0 var(--line);
	color: var(--ink);
	font: inherit;
	font-size: .85rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform .2s var(--bounce);
}
.minutka-btn:hover { transform: translateY(-2px); }
.minutka-btn:active { transform: scale(.94); }

.minutky-lista {
	position: fixed;
	right: 12px;
	left: 12px;
	bottom: calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom));
	z-index: 80;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	pointer-events: none;
}
.minutky-lista[hidden] { display: none; }
body.cook-mode .minutky-lista { bottom: calc(16px + env(safe-area-inset-bottom)); }
.minutka {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 6px 6px 6px 14px;
	border: 2px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	box-shadow: var(--shadow);
	font-size: .9rem;
}
.minutka b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.minutka span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .8rem; }
.minutka button {
	flex: none;
	width: 34px;
	height: 34px;
	border: 2px solid var(--line);
	border-radius: 50%;
	background: var(--surface-2);
	color: var(--ink);
	font: inherit;
	cursor: pointer;
}
.minutka.pauza b { opacity: .5; }
.minutka.hotovo { background: var(--tomato); color: #fff; animation: minutka-zvoni .6s ease-in-out infinite alternate; }
.minutka.hotovo span { color: inherit; }
@keyframes minutka-zvoni { to { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .minutka.hotovo { animation: none; } }
@media (min-width: 900px) {
	.minutky-lista { bottom: 16px; left: auto; max-width: 420px; }
}

/* postup, který je jen jeden odstavec – bez číslování */
.postup-text { margin-top: 12px; line-height: 1.7; }

.pager-mezera { display: grid; place-items: center; min-width: 24px; color: var(--muted); }
