/* ============ Splash Cookies – guided bake (/bake) ============
   Ported from Kitchen Mate's PFD v2 cook flow, restyled in the Splash palette.
   One type scale, one control radius, terra as the single accent. */

/* Author display rules (flex/grid) would otherwise override the browser's default
   [hidden] { display: none }, so the cook overlay showed on page load. */
.bk [hidden] { display: none !important; }
.bk { --bk-ink: var(--forest-deep); --bk-muted: var(--ink-muted); --bk-surface: var(--bone-warm); --bk-line: var(--rule); }
.bk .bk-body, .bk .bk-fine, .bk .bk-label, .bk-btn-ink, .bk-link, .bk-voice, .bk-need, .bk-notes, .bk-tl, .bk-outcome, .bk-step-ins, .bk-tip, .bk-next, .bk-timerbar { font-family: var(--sans); }

/* ---------- plan ---------- */
.bk-plan-inner { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); }
.bk-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.bk-title { font-family: "Crumb", Georgia, serif; font-weight: 400; font-size: clamp(44px, 7vw, 92px); line-height: .96; letter-spacing: -.03em; color: var(--terra); margin: 0 0 18px; overflow-wrap: break-word; }
.bk-outcome { font-size: clamp(17px, 1.5vw, 21px); color: var(--forest); margin: 0; }
.bk-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 880px) { .bk-plan-grid { grid-template-columns: 1fr; } }
.bk-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: linear-gradient(155deg, var(--blush), var(--blush-deep) 60%, var(--terra)); box-shadow: var(--shadow-image-large); }
.bk-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-side { display: grid; gap: 18px; }
.bk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px) { .bk-two { grid-template-columns: 1fr; } }
.bk-card { background: var(--bk-surface); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-card); }
.bk-card--quiet { box-shadow: none; border: 1px solid var(--bk-line); }
.bk-label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--terra); margin: 0 0 12px; line-height: 1.5; } /* also on the plan's h2s */
.bk-need, .bk-notes { list-style: none; margin: 0; padding: 0; }
.bk-need li { font-size: 16px; color: var(--bk-ink); padding: 9px 0; border-bottom: 1px solid var(--bk-line); }
.bk-need li:last-child { border-bottom: none; }
.bk-need li.is-equipment { color: var(--bk-muted); }
.bk-notes li { font-size: 15px; color: var(--bk-muted); padding: 4px 0; line-height: 1.5; }
.bk-cta { display: grid; gap: 12px; }
.bk-fine { font-size: 13px; color: var(--bk-muted); margin: 0; line-height: 1.5; }
.bk-body { font-size: 17px; color: var(--bk-ink); margin: 0; }

.bk-btn-ink { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 64px; border-radius: 999px; border: none; background: var(--terra); color: var(--bone); font-size: 18px; font-weight: 600; letter-spacing: .01em; cursor: pointer; box-shadow: var(--shadow-button); transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease); }
.bk-btn-ink:hover { background: var(--terra-deep); transform: translateY(-1px); box-shadow: var(--shadow-button-hover); }
.bk-btn-ink:active { transform: scale(.985); }
.bk-btn-ink:disabled { opacity: .4; cursor: default; transform: none; }
.bk-link { background: none; border: none; padding: 0; min-height: 44px; display: inline-flex; align-items: center; font-size: 16px; color: var(--bk-muted); cursor: pointer; font-family: var(--sans); }
.bk-link:hover { color: var(--terra); }
.bk-link:disabled, .bk-link[aria-disabled="true"] { opacity: .3; cursor: default; }

.bk-timeline { margin-top: 48px; max-width: 760px; margin-left: auto; margin-right: auto; }
.bk-timeline > summary { list-style: none; cursor: pointer; }
.bk-timeline > summary::-webkit-details-marker { display: none; }
.bk-serve { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--bk-surface); border-radius: 16px; padding: 14px 18px; margin: 16px 0; }
.bk-serve input { font: inherit; font-family: var(--sans); font-size: 17px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--blush-deep); background: var(--bone); color: var(--bk-ink); font-variant-numeric: tabular-nums; }
.bk-tl { list-style: none; margin: 0; padding: 0; background: var(--bk-surface); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.bk-tl li { display: grid; grid-template-columns: 64px 12px 1fr; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--bk-line); align-items: start; }
.bk-tl li:last-child { border-bottom: none; }
.bk-tl .tl-when { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; color: var(--terra); }
.bk-tl .tl-sub { font-size: 12px; color: var(--bk-muted); }
.bk-tl .tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--terra); margin-top: 5px; }
.bk-tl .tl-dot.oven { background: var(--saffron); }
.bk-tl .tl-dot.serve { background: #3d7a4a; }
.bk-tl .tl-comp { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--terra); }
.bk-tl .tl-comp.oven { color: #a8731a; }
.bk-tl .tl-title { font-size: 17px; font-weight: 500; color: var(--bk-ink); line-height: 1.3; }
.bk-tl .tl-meta { font-size: 13px; color: var(--bk-muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }

/* ---------- cook mode ---------- */
body.bk-cooking { overflow: hidden; }
.bk-cook { position: fixed; inset: 0; z-index: 80; background: var(--bone); color: var(--bk-ink); display: flex; flex-direction: column; padding: max(env(safe-area-inset-top), 12px) clamp(18px, 4vw, 28px) max(env(safe-area-inset-bottom), 16px); max-width: 640px; margin: 0 auto; width: 100%; left: 0; right: 0; }
@media (min-width: 641px) { .bk-cook { box-shadow: 0 0 0 100vmax var(--bone); } }
.bk-cook-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.bk-voice { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--bk-line); background: transparent; color: var(--bk-muted); font-size: 14px; cursor: pointer; }
.bk-voice svg { width: 16px; height: 16px; }
.bk-voice[aria-pressed="true"] { background: var(--terra); border-color: var(--terra); color: var(--bone); }
.bk-voice:disabled { opacity: .35; cursor: default; }
.bk-timerbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; margin-top: 6px; padding: 8px 16px; border: none; border-radius: 16px; background: var(--bk-surface); color: var(--bk-ink); font-size: 16px; text-align: left; cursor: pointer; }
.bk-timerbar .tb-side { font-size: 13px; color: var(--bk-muted); }
.bk-timerbar.is-done { background: var(--saffron); color: var(--terra-deep); animation: bkpulse 1.4s ease-in-out infinite; }
.bk-timerbar.is-done .tb-side { color: var(--terra-deep); }
@keyframes bkpulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.bk-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow-y: auto; padding: 18px 0; }
.bk-step { display: flex; flex-direction: column; gap: 14px; }
.bk-step-eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--bk-muted); margin: 0; font-family: var(--sans); }
.bk-step-title { font-family: "Crumb", Georgia, serif; font-weight: 400; font-size: clamp(36px, 8vw, 54px); line-height: 1; letter-spacing: -.02em; color: var(--terra); margin: 0; }
.bk-step-ins { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.4; color: var(--bk-ink); margin: 0; }
.bk-tip { font-size: 16px; color: var(--bk-muted); margin: 0; }
.bk-next { font-size: 14px; color: var(--bk-muted); margin: 0; }
.bk-step-video { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; max-height: 34vh; background: var(--bk-surface); box-shadow: var(--shadow-image); }
.bk-step-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-height: 640px) { .bk-step-video { display: none; } }
.bk-countdown { font-family: var(--sans); font-size: clamp(64px, 18vw, 96px); line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--terra); margin: 0; }
.bk-share { margin-top: 14px; padding: 18px; border-radius: 16px; background: var(--bk-surface); display: grid; gap: 10px; position: relative; }
.bk-share-title { font-family: "Crumb", Georgia, serif; font-size: 26px; color: var(--terra); margin: 0; letter-spacing: -.02em; }
.bk-share-drop { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1.5px dashed var(--terra); border-radius: 999px; color: var(--terra); font-weight: 600; cursor: pointer; padding: 0 18px; font-family: var(--sans); }
.bk-share-drop:hover { background: rgba(111,34,51,.06); }
/* the real file input is visually hidden but focusable (WCAG 2.1.1); its ring shows on the pill */
.bk-share-drop:focus-within { outline: 2px solid var(--terra); outline-offset: 3px; }
.bk-share-field { display: flex; flex-direction: column; gap: 6px; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--bk-ink); }
.bk-share-field[hidden] { display: none; }
.bk-share-field span { font-weight: 400; color: var(--bk-muted); }
.bk-share-field .bk-share-in { font-weight: 400; }
[data-share-msg]:focus { outline: none; }
.bk-share-preview { border-radius: 12px; overflow: hidden; max-height: 28vh; background: var(--bone); }
.bk-share-preview img { width: 100%; height: 100%; max-height: 28vh; object-fit: contain; display: block; }
.bk-share-in { font: inherit; font-family: var(--sans); font-size: 15px; padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--blush-deep); background: var(--bone); color: var(--bk-ink); }
.bk-share-in:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
.bk-share-check { display: flex; align-items: flex-start; gap: 10px; font-family: var(--sans); font-size: 14px; color: var(--bk-ink); cursor: pointer; padding: 2px 4px; line-height: 1.4; }
.bk-share-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--terra); flex-shrink: 0; }
.bk-btn-ink--saffron { background: var(--saffron); color: var(--terra-deep); min-height: 52px; font-size: 16px; }
.bk-btn-ink--saffron:hover { background: #c78a1f; }
.bk-social { display: grid; gap: 8px; padding-top: 4px; }
.bk-social[hidden] { display: none; }
.bk-social-row { display: flex; gap: 10px; }
.bk-social-btn { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1.5px solid var(--terra); background: transparent; color: var(--terra); cursor: pointer; transition: background .2s var(--ease); }
.bk-social-btn:hover { background: rgba(111,34,51,.06); }
.bk-social-btn:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
.bk-social-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.bk-cook-foot { display: grid; gap: 4px; padding-top: 10px; }
.bk-cook-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.bk-cook-row .bk-fine { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@keyframes bk-in-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes bk-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.bk-in-next { animation: bk-in-next 220ms cubic-bezier(.2,.7,.2,1) both; }
.bk-in-back { animation: bk-in-back 220ms cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .bk-in-next, .bk-in-back, .bk-timerbar.is-done { animation: none; } }
