/* Recetas Chilenas – ficha de receta. Usa los tokens --rc-* del sitio con valores de respaldo. */
.rc-card {
	--_ink: var(--rc-ink, #1F3A5F);
	--_text: var(--rc-text, #2B2622);
	--_muted: var(--rc-muted, #5E564F);
	--_clay: var(--rc-clay, #A23E26);
	--_btn: var(--rc-clay-btn, #A8432A);
	--_btn-dark: var(--rc-clay-dark, #8C3421);
	--_paper: var(--rc-paper, #FBF7F1);
	--_cream: var(--rc-cream, #F6EBDD);
	--_line: var(--rc-line, #E8DCCB);
	margin: 2.5rem 0;
	border: 1px solid var(--_line);
	border-radius: 10px;
	background: #fff;
	color: var(--_text);
	overflow: hidden;
	scroll-margin-top: 90px;
}
.rc-card__head { padding: 1.5rem 1.5rem 1.25rem; background: var(--_paper); border-bottom: 1px solid var(--_line); }
.rc-card__title { margin: 0 0 .4rem; color: var(--_ink); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.15; }
.rc-card__summary { margin: 0 0 1.1rem; color: var(--_muted); max-width: 65ch; }
.rc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .9rem 1.25rem; margin: 0; }
.rc-facts div { margin: 0; }
.rc-facts dt { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--_muted); margin: 0 0 .15rem; }
.rc-facts dd { margin: 0; font-weight: 600; color: var(--_ink); font-variant-numeric: tabular-nums; }

.rc-calc { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--_line); }
.rc-calc__label { font-weight: 600; color: var(--_ink); }
.rc-calc__stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--_line); border-radius: 8px; overflow: hidden; background: #fff; }
.rc-calc__btn { width: 44px; min-height: 44px; border: 0; background: var(--_cream); color: var(--_ink); font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 0; transition: background-color .15s ease-out; }
.rc-calc__btn:hover { background: #EFDFC9; }
.rc-calc__btn:active { background: #E6D2B8; }
.rc-calc__input { width: 4.2rem; border: 0; border-left: 1px solid var(--_line); border-right: 1px solid var(--_line); text-align: center; font-size: 1.1rem; font-weight: 600; color: var(--_ink); font-variant-numeric: tabular-nums; background: #fff; -moz-appearance: textfield; appearance: textfield; padding: 0; }
.rc-calc__input::-webkit-outer-spin-button, .rc-calc__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rc-calc__reset { border: 1px solid var(--_line); background: #fff; color: var(--_clay); border-radius: 8px; padding: .55rem .9rem; min-height: 44px; font-weight: 600; cursor: pointer; }
.rc-calc__reset:hover { border-color: var(--_clay); background: #fff; color: var(--_btn-dark); }
.rc-calc__status { flex-basis: 100%; margin: 0; font-size: .9rem; color: var(--_muted); min-height: 0; }
.rc-calc__status:empty { display: none; }

.rc-card__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.rc-ingredients, .rc-tools, .rc-steps { padding: 1.4rem 1.5rem; }
.rc-ingredients, .rc-tools { border-bottom: 1px solid var(--_line); }
.rc-card h3 { margin: 0 0 .9rem; font-size: 1.25rem; color: var(--_ink); }
.rc-card h4 { margin: 1.1rem 0 .5rem; font-size: 1rem; color: var(--_ink); }
.rc-card .rc-ingredients ul, .rc-card .rc-tools ul { list-style: none; margin: 0; padding: 0; }
.rc-card .rc-ing { margin: 0; display: flex; flex-wrap: wrap; gap: .1rem .45rem; padding: .55rem 0; border-bottom: 1px dashed var(--_line); line-height: 1.45; }
.rc-ing:last-child { border-bottom: 0; }
.rc-ing__qty { font-weight: 700; color: var(--_ink); font-variant-numeric: tabular-nums; min-width: 4.5rem; }
.rc-ing__note { flex-basis: 100%; font-size: .9rem; color: var(--_muted); padding-left: 4.95rem; }
.rc-ing.is-approx .rc-ing__qty { color: var(--_clay); }
.rc-ing.is-fixed .rc-ing__name::after { content: " (no se escala)"; color: var(--_muted); font-size: .9em; }
html[lang^="en"] .rc-ing.is-fixed .rc-ing__name::after { content: " (not scaled)"; }
.rc-ingredients__hint { margin: .9rem 0 0; padding: .7rem .9rem; background: var(--_paper); border: 1px solid var(--_line); border-radius: 8px; font-size: .9rem; color: var(--_muted); }
.rc-card .rc-tools li { margin: 0; padding: .3rem 0 .3rem 1.1rem; position: relative; }
.rc-card .rc-tools li::before { content: ""; position: absolute; left: 0; top: .9em; width: 6px; height: 6px; border-radius: 50%; background: var(--_clay); }

.rc-card .rc-steps ol { list-style: none; counter-reset: rc-step; margin: 0; padding: 0; }
.rc-card .rc-steps li { margin: 0; line-height: 1.6; counter-increment: rc-step; position: relative; padding: 0 0 1.4rem 3rem; scroll-margin-top: 90px; }
.rc-card .rc-steps li:last-child { padding-bottom: 0; }
.rc-card .rc-steps li::before { content: counter(rc-step); position: absolute; left: 0; top: -.1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--_ink); color: #fff; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.rc-step__title { display: inline; color: var(--_ink); font-size: 1.05rem; }
.rc-step__time { display: inline-block; margin-left: .5rem; font-size: .82rem; color: var(--_muted); border: 1px solid var(--_line); border-radius: 999px; padding: .05rem .55rem; vertical-align: .1em; }
.rc-steps p { margin: .35rem 0 0; max-width: 70ch; }

@media (min-width: 860px) {
	.rc-card__body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
	.rc-ingredients { border-right: 1px solid var(--_line); grid-row: span 2; border-bottom: 0; }
	.rc-tools { border-bottom: 1px solid var(--_line); }
	.rc-steps { grid-column: 2; }
}

/* Vídeo con carga diferida */
.rc-video { margin: 2rem 0; }
.rc-video__frame { position: relative; aspect-ratio: 16 / 9; background: #111; border-radius: 10px; overflow: hidden; }
.rc-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rc-video__play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.rc-video__play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s ease-out; }
.rc-video__play:hover img { filter: brightness(.85); }
.rc-video__icon { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); border-radius: 12px; background: rgba(23, 23, 23, .82); transition: background-color .2s ease-out; }
.rc-video__icon::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.rc-video__play:hover .rc-video__icon, .rc-video__play:focus-visible .rc-video__icon { background: #c4302b; }
.rc-video figcaption { margin-top: .6rem; font-size: .9rem; color: var(--rc-muted, #5E564F); }

@media print {
	.rc-calc, .rc-video { display: none; }
	.rc-card { border: 0; }
}
