/* Accidental Kitchen – Cékla theme (from the design "C′ · Esti konyha – Cékla"). */

/* ---------- Fonts (self-hosted, SIL OFL; see assets/fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
	src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
	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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
	src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
	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; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("../fonts/instrument-serif-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("../fonts/instrument-serif-latin-400-normal.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; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
	src: url("../fonts/instrument-serif-latin-ext-400-italic.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
	src: url("../fonts/instrument-serif-latin-400-italic.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; }

/* ---------- Palettes ---------- */
:root, body.pal-cekla {
	--bg: #F8EBE5; --surface: #F0D9CF; --surface2: #E6C6B9; --line: #DDBFB2;
	--ink: #33141A; --muted: #704650;
	--acc: #9B2743; --acc-ink: #87203A; --on-acc: #FFF2EB;
	--acc2: #EDB84C; --acc2-ink: #835A0E; --on-acc2: #33141A;
	--hl: #F4D3D3; --dark: #33141A; --on-dark: #F8E6DE; --on-dark-muted: #D3B5AE;
	--focus: #835A0E;
	color-scheme: light;
}
body.pal-cekla-forditva {
	--bg: #86213D; --surface: #962B48; --surface2: #A63A57; --line: #A8465F;
	--ink: #FBEDE6; --muted: #EBC3C9;
	--acc: #EDB84C; --acc-ink: #F3C766; --on-acc: #4A0F22;
	--acc2: #F4C2C8; --acc2-ink: #F7CDD2; --on-acc2: #4A0F22;
	--hl: #6C1730; --dark: #5A1228; --on-dark: #FBEDE6; --on-dark-muted: #E3B6BE;
	--focus: #F3C766;
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font-family: "Manrope", "Segoe UI", system-ui, sans-serif; font-size: 17px; line-height: 1.6;
	font-feature-settings: "kern";
	/* Footer stays at the bottom of short pages. */
	display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
#main { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--acc-ink); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, .serif { font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-weight: 400; }
h2 { font-size: clamp(38px, 5vw, 56px); line-height: 1; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap {
	max-width: 1320px; margin-inline: auto;
	padding-left: max(20px, env(safe-area-inset-left, 0px));
	padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip-link:focus { left: 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong-link { font-weight: 700; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.kicker--acc { color: var(--acc-ink); }
.kicker--icon { display: inline-flex; align-items: center; gap: 8px; }
.chip { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; line-height: 1.4; }
.chip--acc { background: var(--acc); color: var(--on-acc); }
.chip--acc2 { background: var(--acc2); color: var(--on-acc2); }
.chip--soft { background: var(--surface2); color: var(--ink); }
.chip--ink { background: var(--ink); color: var(--bg); }
.chip--tiny { font-size: 11px; padding: 3px 9px; vertical-align: 2px; }
.chip--on-image { position: absolute; top: 18px; left: 18px; background: var(--bg); color: var(--ink); margin: 0; }
.btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
	background: var(--acc); color: var(--on-acc); text-decoration: none; border: 0;
	font: inherit; font-weight: 800; font-size: 15px; padding: 12px 22px; border-radius: 999px; cursor: pointer;
}
.btn:hover { background: var(--acc-ink); color: var(--on-acc); }
.btn--small { padding: 8px 18px; font-size: 14px; min-height: 40px; }
.btn--inverse { background: var(--on-acc); color: var(--acc-ink); align-self: flex-start; }
.btn--inverse:hover { background: var(--bg); color: var(--ink); }

/* ---------- Header / footer ---------- */
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px; padding-block: 20px; }
.logo { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 32px; line-height: 1; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--acc); }
.nav { flex: 1 1 auto; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; }
.nav__list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav__list a:hover, .nav__list .current-menu-item a { color: var(--acc-ink); }
.site-header__actions { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.quiet-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-footer { background: var(--dark); color: var(--on-dark-muted); margin-top: 88px; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 28px 56px; padding-block: 52px; font-size: 15px; }
.site-footer__about { flex: 2 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer__joke { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; color: var(--on-dark); }
.site-footer__nav { flex: 1 1 220px; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--on-dark); }

/* ---------- Recipe page ---------- */
.recipe { display: flex; flex-direction: column; gap: clamp(56px, 7vw, 76px); padding-top: 4px; }
.hero { display: flex; flex-direction: column; gap: 32px; }
.hero__image { position: relative; margin: 0; }
.hero__image img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 20px; }
.hero__body { display: flex; flex-wrap: wrap; gap: 28px 64px; align-items: flex-start; }
.hero__main { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hero__side { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.hero__title { margin: 0; font-size: clamp(52px, 8vw, 108px); line-height: 0.94; letter-spacing: -0.02em; text-wrap: balance; }
.hero__title em { display: block; color: var(--acc-ink); }
.hero__lead { font-size: clamp(18px, 1.6vw, 20px); max-width: 34em; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.facts dt { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 34px; line-height: 1.15; }
.facts dd.facts__plain { font-size: 16px; padding-top: 8px; font-family: inherit; }
.safety { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.safety strong { color: var(--ink); }
.sponsor { background: var(--surface); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.sponsor__row { display: flex; gap: 14px; align-items: center; font-size: 15px; }
.sponsor__logo { width: 104px; height: 44px; object-fit: contain; background: var(--bg); border-radius: 10px; padding: 6px; flex: 0 0 104px; }

.videos { display: flex; flex-direction: column; gap: 20px; }
.videos__grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.video { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.video--main { flex: 3 1 560px; }
.videos__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.video__frame { position: relative; aspect-ratio: 16 / 9; background: var(--dark); border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.video__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.video__play { position: relative; width: 88px; height: 88px; border-radius: 50%; background: var(--acc); color: var(--on-acc); display: flex; align-items: center; justify-content: center; }
.video__play--small { width: 56px; height: 56px; background: var(--bg); color: var(--ink); }
.video__title { font-size: 28px; line-height: 1.1; }
.tile { background: var(--surface); border-radius: 18px; padding: 20px 22px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.tile__title { font-size: 26px; line-height: 1.1; }

.story { background: var(--surface); border-radius: 24px; padding: clamp(24px, 3.5vw, 40px) clamp(20px, 3.5vw, 44px); display: flex; flex-direction: column; gap: 28px; }
.story__head { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; justify-content: space-between; }
.story__book { font-size: 15px; }
.story__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.story__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.story__col--idea { border-left: 1px solid var(--line); padding-left: 28px; }
.story__num { font-size: clamp(60px, 7vw, 80px); line-height: 0.9; font-variant-numeric: lining-nums; }
.story__num.is-a { color: var(--acc-ink); }
.story__num.is-b { color: var(--acc2-ink); }
.story__name { font-weight: 800; font-size: 20px; }
.story__kept { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.story__foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 15px; border-top: 1px solid var(--line); padding-top: 18px; }

.why { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: baseline; }
.why h2 { flex: 1 1 280px; }
.why__body { flex: 3 1 520px; min-width: 0; font-size: 19px; max-width: 40em; }
.why__body p + p { margin-top: 1em; }

.method { display: flex; flex-direction: column; gap: 24px; }
.method__grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.method__ingredients { flex: 1 1 340px; min-width: 0; }
.method__ingredients > .kicker { margin-bottom: 10px; }
.method__steps { flex: 2 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.ingredients { list-style: none; margin: 0 0 10px; padding: 0; }
.ingredients li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ingredients__name { flex: 1 1 auto; min-width: 0; }
.ingredients__qty { font-weight: 700; text-align: right; }
.origin { flex: 0 0 48px; font-size: 12px; font-weight: 800; text-align: center; border-radius: 999px; padding: 2px 0; }
.origin.is-a { background: var(--acc); color: var(--on-acc); }
.origin.is-b { background: var(--acc2); color: var(--on-acc2); }
.origin.is-ab { background: var(--surface2); color: var(--ink); }
.origin.is-new { background: var(--ink); color: var(--bg); }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 22px; }
.steps li { display: flex; gap: 20px; }
.steps li > div { min-width: 0; }
.steps li p:first-child { font-size: 18px; }
.steps li p + p { margin-top: 4px; }
.steps__num { flex: 0 0 44px; font-style: italic; font-size: 48px; line-height: 0.9; color: var(--acc-ink); }
.critical { background: var(--hl); border-radius: 18px; padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.locked { background: var(--hl); border-radius: 24px; padding: clamp(24px, 3.5vw, 38px) clamp(20px, 3.5vw, 44px); display: flex; flex-wrap: wrap; gap: 22px 44px; align-items: center; }
.locked__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.locked__title { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; text-wrap: balance; }
.locked__actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

.compare { display: flex; flex-wrap: wrap; gap: 44px; align-items: flex-start; }
.compare__main { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.compare__side { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-top: 14px; }
.cmp { --pos: 50%; position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 20px; background: var(--surface2); }
.cmp__real, .cmp__ai { position: absolute; inset: 0; }
.cmp__real img, .cmp__ai img { width: 100%; height: 100%; object-fit: cover; }
.cmp__ai { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp__placeholder { position: absolute; top: 0; bottom: 0; left: 50%; right: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 6%; text-align: center; color: var(--muted); font-size: 15px; }
.cmp__placeholder .serif { font-size: clamp(24px, 3vw, 36px); line-height: 1.1; color: var(--ink); }
.cmp__label-ai { top: 16px; left: 16px; }
.cmp__label-real { position: absolute; top: 16px; right: 16px; }
.cmp__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #FFF9F1; pointer-events: none; }
.cmp__knob { position: absolute; top: 50%; left: var(--pos); width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: var(--acc); color: var(--on-acc); border: 3px solid #FFF9F1; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(40, 10, 18, 0.3); pointer-events: none; }
.cmp input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp:has(input:focus-visible) .cmp__knob { outline: 3px solid var(--focus); outline-offset: 3px; }
.score { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.score__value { font-size: 60px; line-height: 1; color: var(--acc-ink); }
.score__value .muted, .verdict__value .muted { font-family: "Manrope", system-ui, sans-serif; font-size: 16px; }
.dim { display: flex; flex-direction: column; gap: 5px; }
.dim__row { display: flex; justify-content: space-between; font-size: 15px; }
.dim__val { font-weight: 700; font-variant-numeric: tabular-nums; }
.dim__track { height: 6px; background: var(--surface2); border-radius: 3px; }
.dim__track span { display: block; height: 6px; background: var(--acc); border-radius: 3px; }
.verdict { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; background: var(--surface); border-radius: 16px; padding: 14px 18px; margin-top: 6px; }
.verdict__label { font-weight: 700; }
.verdict__value { font-size: 36px; line-height: 1; }

.later { display: flex; flex-wrap: wrap; gap: 12px 44px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 30px; }
.later h2 { font-size: clamp(32px, 4vw, 40px); }
.later p { flex: 1 1 420px; min-width: 0; max-width: 42em; }

.ugc { display: flex; flex-direction: column; gap: 16px; }
.ugc__head { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-end; justify-content: space-between; }
.ugc__empty { font-size: clamp(22px, 2.4vw, 28px); background: var(--surface); border-radius: 18px; padding: 24px 28px; }

.duo { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.vote { flex: 3 1 560px; min-width: 0; background: var(--surface); border-radius: 24px; padding: clamp(22px, 3vw, 34px) clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.vote h2 { margin-top: 8px; font-size: clamp(34px, 4vw, 48px); }
.vote__list { display: flex; flex-direction: column; }
.vote__item { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.vote__img { width: 96px; height: 72px; object-fit: cover; border-radius: 12px; flex: 0 0 96px; }
.vote__text { flex: 1 1 auto; min-width: 0; }
.vote__title { font-weight: 700; line-height: 1.3; color: var(--ink); text-decoration: none; }
.vote__title:hover { text-decoration: underline; }
.vote__mine { font-weight: 700; color: var(--acc-ink); font-size: 14px; white-space: nowrap; }
.vote__btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--bg); color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.vote__btn:disabled { opacity: 0.45; cursor: default; }
.vote__note { font-size: 14px; background: var(--bg); padding: 10px 14px; border-radius: 12px; }
.patreon { flex: 2 1 340px; min-width: 0; background: var(--acc); color: var(--on-acc); border-radius: 24px; padding: clamp(22px, 3vw, 34px) clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; }
.patreon h2 { font-size: clamp(34px, 4vw, 48px); }
.patreon ul { margin: 0 0 auto; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 18px; }
.patreon__soon { font-size: 14px; opacity: 0.85; }

.related { display: flex; flex-direction: column; gap: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card__media { position: relative; display: block; }
.card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; }
.chip--small { top: 12px; left: 12px; font-size: 12px; padding: 4px 10px; }
.card__title { font-size: 28px; line-height: 1.1; }
.card:hover .card__title { color: var(--acc-ink); }

/* ---------- Listings and plain pages ---------- */
.listing { display: flex; flex-direction: column; gap: 36px; padding-top: 12px; }
.listing__head { display: flex; flex-direction: column; gap: 12px; max-width: 46em; }
.listing__title { margin: 0; font-size: clamp(48px, 7vw, 92px); line-height: 0.95; letter-spacing: -0.02em; text-wrap: balance; }
.listing__desc { font-size: 19px; }
.prose-page { padding-top: 12px; display: flex; flex-direction: column; gap: 28px; }
.prose { max-width: 42em; font-size: 18px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 40px; margin-top: 1.4em; }
.prose h3 { font-size: 27px; line-height: 1.15; margin: 1.3em 0 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: 0.4em; }
.prose li > ul { margin-top: 0.4em; }
.prose mark { background: var(--acc); color: var(--on-acc); padding: 0 0.25em; border-radius: 4px; }
.prose .updated { color: var(--muted); font-size: 15px; }
.pagination .nav-links { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 700; }

@media (max-width: 640px) {
	body { font-size: 16px; }
	.site-header__inner { gap: 10px 20px; }
	.hero__image img { aspect-ratio: 4 / 3; border-radius: 16px; }
	.story__col--idea { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
	.cmp { aspect-ratio: 4 / 5; }
	.cmp__knob { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
	.vote__img { width: 64px; height: 56px; flex-basis: 64px; }
	.vote__item { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- Accessibility helper ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Primary menu: category submenu ---------- */
.nav__list > li { position: relative; display: flex; align-items: center; gap: 2px; }
.submenu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.submenu-toggle:hover { background: var(--surface); }
.is-open > .submenu-toggle svg { transform: rotate(180deg); }
.nav__list .sub-menu {
	display: none; position: absolute; top: 100%; left: -14px; z-index: 50; min-width: 240px;
	list-style: none; margin: 0; padding: 10px; background: var(--bg);
	border-radius: 16px; box-shadow: 0 14px 40px rgba(40, 10, 18, 0.18);
}
.nav__list .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav__list li:hover > .sub-menu, .nav__list li:focus-within > .sub-menu, .nav__list li.is-open > .sub-menu { display: block; }
.nav__list .sub-menu a { display: block; padding: 8px 12px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.nav__list .sub-menu a:hover, .nav__list .sub-menu .current-menu-item > a { background: var(--surface); color: var(--ink); }

/* ---------- Search ---------- */
.search-mini, .search-big { display: flex; align-items: center; background: var(--surface); border-radius: 999px; padding: 2px 2px 2px 14px; }
.search-mini input, .search-big input { border: 0; background: transparent; color: var(--ink); font: inherit; min-width: 0; width: 100%; outline: none; }
.search-mini input { font-size: 14px; width: 170px; }
.search-big { max-width: 520px; padding-left: 18px; }
.search-big input { font-size: 17px; padding: 8px 0; }
.search-mini input::placeholder, .search-big input::placeholder { color: var(--muted); opacity: 1; }
.search-mini button, .search-big button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 999px; background: var(--acc); color: var(--on-acc); cursor: pointer; }
.search-big button { width: 44px; height: 44px; }
.search-mini:focus-within, .search-big:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Category chips and grouped archive ---------- */
.cat-chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chips a { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.cat-chips a:hover { background: var(--surface2); }
.cat-chips a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.group { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.group__head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 22px; }
.group__head h2 { font-size: clamp(32px, 4vw, 46px); }

/* ---------- Visitors' versions ---------- */
.notice { font-size: 15px; padding: 12px 16px; border-radius: 14px; }
.notice--ok { background: var(--surface); }
.notice--error { background: var(--hl); font-weight: 700; }
.ugc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.ugc-card { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ugc-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; }
.ugc-card figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.ugc-card__name { font-weight: 800; }
.ugc-card__text { color: var(--muted); }
.ugc-card__link { font-weight: 700; font-size: 14px; }
.ugc-form > summary { list-style: none; width: fit-content; }
.ugc-form > summary::-webkit-details-marker { display: none; }
.ugc-form[open] > summary { margin-bottom: 16px; }
.ugc-form__body { background: var(--surface); border-radius: 20px; padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; }
.field input[type="url"], .field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.field input[type="file"] { font: inherit; }
.field--check { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 15px; }
.field--check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--acc); }
.field--hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ugc__login { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }

@media (max-width: 640px) {
	.search-mini { order: -1; flex: 1 1 100%; }
	.search-mini input { width: 100%; }
	.nav__list .sub-menu { position: static; box-shadow: none; padding: 4px 0 0; min-width: 0; background: transparent; }
	.nav__list li:hover > .sub-menu, .nav__list li:focus-within > .sub-menu { display: none; }
	.nav__list li.is-open > .sub-menu { display: block; flex-basis: 100%; }
	.nav__list > li { flex-wrap: wrap; }
}
