* { box-sizing: border-box; }
html, body {
	margin: 0; padding: 0; height: 100%;
	font-family: Lato, sans-serif;
	background: #faf9f7;
	color: #1f2f3d;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

.cook-header {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex; align-items: center; gap: 12px;
	padding: 14px 24px;
	background: #fff;
	border-bottom: 1px solid #eeece8;
}
.cook-header-brand { display: flex; align-items: center; flex-shrink: 0; }
.cook-header-logo { height: 28px; width: auto; max-width: 130px; object-fit: contain; display: block; }
.cook-header-divider { width: 1px; height: 24px; background: #eeece8; margin: 0 4px; flex-shrink: 0; }
.cook-header-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.cook-header-text { flex: 1; min-width: 0; }
.cook-header-title { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-header-sub { font-size: 12px; color: #97a3ad; }
.cook-exit {
	display: flex; align-items: center; gap: 6px;
	padding: 8px 16px;
	border: 1.5px solid #f6d9d1;
	border-radius: 999px;
	color: #e74c3c;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}
.cook-exit:hover { background: #fdeceb; }
.cook-exit svg { width: 14px; height: 14px; }

.cook-progress {
	display: flex; align-items: center; justify-content: center;
	gap: 6px;
	padding: 20px 24px 8px;
	max-width: 700px; margin: 0 auto;
}
.cook-dot {
	width: 30px; height: 30px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #fff; border: 2px solid #eeece8; color: #97a3ad;
	font-size: 12px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}
.cook-dot.is-active { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.cook-dot.is-done { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.cook-dot-line { flex: 1; height: 2px; background: #eeece8; min-width: 8px; }
.cook-dot-line.is-done { background: #e74c3c; }

.cook-main { max-width: 700px; margin: 0 auto; padding: 24px; text-align: center; }
.cook-main.is-hidden { display: none; }
/* Generic hide utility — also used on .cook-header/.cook-progress/.cook-footer
   when the completion screen takes over the whole viewport. */
.is-hidden { display: none !important; }
.cook-step-media {
	border-radius: 16px; overflow: hidden; margin-bottom: 20px;
	background: #eeece8;
}
.cook-step-media img { width: 100%; display: block; max-height: 320px; object-fit: cover; }
.cook-step-count { font-size: 13px; font-weight: 700; color: #e74c3c; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.cook-step-heading { font-size: 26px; font-weight: 800; line-height: 1.3; margin: 0 0 20px; }

.cook-timer-trigger { margin-top: 8px; }
.cook-timer-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 20px;
	border: 1.5px solid #eeece8;
	border-radius: 999px;
	background: #fff;
	color: #1f2f3d;
	font-size: 13.5px;
	font-weight: 700;
}
.cook-timer-btn:hover { border-color: #e74c3c; color: #e74c3c; }
.cook-timer-btn svg { width: 16px; height: 16px; }

.cook-footer {
	position: sticky; bottom: 0;
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px;
	padding: 16px 24px;
	background: #fff;
	border-top: 1px solid #eeece8;
	max-width: 900px; margin: 40px auto 0;
}
.cook-nav-btn {
	display: flex; align-items: center; gap: 8px;
	padding: 12px 22px;
	border: 1.5px solid #eeece8;
	border-radius: 999px;
	background: #fff;
	color: #1f2f3d;
	font-size: 14px;
	font-weight: 700;
}
.cook-nav-btn svg { width: 16px; height: 16px; }
.cook-nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.cook-nav-btn-primary { background: #e74c3c; border-color: #e74c3c; color: #fff; flex-direction: row-reverse; }
.cook-nav-btn-primary:hover { background: #d8432f; }
.cook-footer-mid { display: flex; gap: 8px; }
.cook-icon-btn {
	width: 44px; height: 44px; border-radius: 50%;
	border: 1.5px solid #eeece8; background: #fff; color: #97a3ad;
	display: flex; align-items: center; justify-content: center;
}
.cook-icon-btn svg { width: 18px; height: 18px; }
.cook-icon-btn.is-active { border-color: #e74c3c; color: #e74c3c; background: #fdeceb; }

.hide { display: none !important; }

.cook-ingredients-drawer {
	position: fixed; top: 0; right: 0; bottom: 0;
	width: 320px; max-width: 85vw;
	background: #fff;
	box-shadow: -8px 0 24px rgba(45,62,79,.15);
	padding: 20px;
	z-index: 30;
	overflow-y: auto;
}
.cook-drawer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cook-drawer-header h3 { margin: 0; font-size: 17px; }
.cook-drawer-header button { border: none; background: none; font-size: 22px; color: #97a3ad; line-height: 1; }
.cook-ingredients-drawer ul { list-style: none; margin: 0; padding: 0; }
.cook-ingredients-drawer li { padding: 8px 0; border-bottom: 1px dashed #eeece8; font-size: 14px; }
.cook-drawer-overlay { position: fixed; inset: 0; background: rgba(31,47,61,.35); z-index: 20; }

.cook-timer-overlay {
	position: fixed; inset: 0; background: rgba(31,47,61,.5);
	display: flex; align-items: center; justify-content: center;
	z-index: 40;
}
.cook-timer-card {
	position: relative;
	background: #faf9f7;
	border-radius: 24px;
	padding: 40px 36px;
	text-align: center;
	width: 320px; max-width: 90vw;
}
.cook-timer-close { position: absolute; top: 14px; right: 16px; border: none; background: none; font-size: 20px; color: #97a3ad; }
.cook-timer-ring { width: 160px; height: 160px; transform: rotate(-90deg); }
.cook-timer-ring-bg { fill: none; stroke: #eeece8; stroke-width: 8; }
.cook-timer-ring-fg { fill: none; stroke: #e74c3c; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.cook-timer-display { font-size: 40px; font-weight: 800; margin-top: -110px; margin-bottom: 60px; }
.cook-timer-label { font-size: 13px; color: #7c8994; margin-bottom: 20px; }
.cook-timer-actions { display: flex; gap: 12px; justify-content: center; }
.cook-timer-actions button { padding: 10px 22px; border-radius: 999px; border: none; font-size: 13.5px; font-weight: 700; }
.cook-timer-pause { background: #e74c3c; color: #fff; }
.cook-timer-cancel { background: #f4f3f1; color: #1f2f3d; }

.cook-complete {
	position: fixed;
	top: 73px;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-size: cover;
	background-position: center;
	background-color: #fdf3ea;
	overflow-y: auto;
	padding: 40px 20px;
}
.cook-complete.hide { display: none; }

.cook-complete-deco {
	position: absolute;
	font-family: Georgia, 'Times New Roman', serif;
	font-style: italic;
	color: #b9846a;
	font-size: 17px;
	line-height: 1.35;
}
.cook-complete-deco-tl { top: 24px; left: 40px; text-align: left; }
.cook-complete-deco-tr { top: 24px; right: 40px; text-align: right; }
.cook-complete-deco-br { bottom: 24px; right: 40px; text-align: right; }

.cook-complete-card {
	position: relative;
	z-index: 1;
	max-width: 460px;
	width: 100%;
	padding: 40px 36px;
	border-radius: 24px;
	background: rgba(255,255,255,.72);
	backdrop-filter: blur(6px);
	box-shadow: 0 20px 60px rgba(45,62,79,.12);
}
.cook-complete-icon {
	width: 68px; height: 68px; border-radius: 50%;
	background: #e74c3c; color: #fff;
	display: flex; align-items: center; justify-content: center;
	margin: 0 auto 22px;
	box-shadow: 0 8px 20px rgba(231,76,60,.35);
}
.cook-complete-icon svg { width: 30px; height: 30px; }
.cook-complete-card h2 { font-size: 26px; font-weight: 800; color: #1f2f3d; margin: 0 0 10px; }
.cook-complete-sub { font-size: 14.5px; color: #6b7680; margin: 0 0 26px; line-height: 1.5; }
.cook-complete-rate-label { font-size: 13px; font-weight: 700; color: #1f2f3d; margin-bottom: 10px; }
.cook-complete-stars { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 28px; }
.cook-complete-stars span { cursor: pointer; color: #f0b429; display: flex; }
.cook-complete-stars span svg { width: 28px; height: 28px; transition: fill .15s ease; }
.cook-complete-stars span.is-filled svg { fill: #f0b429; }
.cook-complete-photo-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%;
	box-sizing: border-box;
	padding: 14px 22px;
	border-radius: 999px;
	background: #e74c3c;
	color: #fff;
	font-weight: 700;
	font-size: 14.5px;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(231,76,60,.3);
	transition: background-color .15s ease, transform .15s ease;
}
.cook-complete-photo-btn:hover { background: #d8432f; transform: translateY(-1px); }
.cook-complete-photo-btn svg { width: 18px; height: 18px; }
.cook-complete-back-link {
	display: inline-flex; align-items: center; gap: 6px;
	margin-top: 18px;
	color: #e74c3c;
	font-weight: 700;
	font-size: 13.5px;
}
.cook-complete-back-link svg { width: 14px; height: 14px; }
.cook-complete-back-link:hover { text-decoration: underline; }

/* Cook Mode Share to Story (Feature B) */
.cook-complete-story-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%;
	box-sizing: border-box;
	margin-top: 12px;
	padding: 13px 22px;
	border-radius: 999px;
	border: 1.5px solid #e74c3c;
	background: #fff;
	color: #e74c3c;
	font-weight: 800;
	font-size: 14.5px;
	cursor: pointer;
	transition: background-color .15s ease, transform .15s ease, color .15s ease;
}
.cook-complete-story-btn:hover { background: #fdeceb; transform: translateY(-1px); }
.cook-complete-story-btn svg { width: 18px; height: 18px; }

.cook-story-modal-overlay {
	position: fixed; inset: 0;
	background: rgba(15,20,26,.7);
	backdrop-filter: blur(5px);
	z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
}
.cook-story-modal {
	position: relative;
	width: 100%; max-width: 420px;
	background: #fff;
	border-radius: 20px;
	padding: 24px;
	box-shadow: 0 20px 50px rgba(0,0,0,.3);
	color: #2d3e4f;
	text-align: left;
}
.cook-story-modal-close {
	position: absolute; top: 16px; right: 18px;
	background: none; border: 0;
	font-size: 24px; color: #97a3ad;
	cursor: pointer; line-height: 1;
}
.cook-story-modal h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; color: #1f2f3d; }
.cook-story-modal-sub { margin: 0 0 16px; font-size: 13px; color: #6b7680; line-height: 1.45; }
.cook-story-preview-box {
	position: relative;
	width: 100%; aspect-ratio: 9/12; max-height: 260px;
	background: #111; border-radius: 12px;
	overflow: hidden; margin-bottom: 14px;
}
.cook-story-preview-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cook-story-preview-sticker {
	position: absolute; left: 12px; bottom: 12px;
	background: rgba(255,255,255,.92); color: #2d3e4f;
	padding: 6px 12px; border-radius: 999px;
	font-size: 12px; font-weight: 600;
	box-shadow: 0 4px 12px rgba(0,0,0,.2);
	display: flex; align-items: center; gap: 5px;
	max-width: calc(100% - 24px); box-sizing: border-box;
}
.cook-story-preview-sticker b { color: #111; }
.cook-story-upload-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; box-sizing: border-box;
	padding: 10px 14px; border-radius: 10px;
	border: 1.5px dashed #dcd9d2; background: #faf9f7;
	color: #6b7680; font-size: 13px; font-weight: 600;
	cursor: pointer; margin-bottom: 12px; transition: border-color .15s ease;
}
.cook-story-upload-btn:hover { border-color: #e74c3c; color: #e74c3c; }
.cook-story-upload-btn svg { width: 16px; height: 16px; }
.cook-story-caption-input {
	width: 100%; box-sizing: border-box;
	border: 1px solid #eeece8; background: #faf9f7;
	border-radius: 10px; padding: 11px 14px;
	font-size: 13.5px; margin-bottom: 14px; color: #1f2f3d;
	font-family: inherit;
}
.cook-story-caption-input:focus { outline: none; border-color: #e74c3c; background: #fff; }
.cook-story-error { color: #c0392b; font-size: 13px; margin: 0 0 12px; background: #fdf0ed; padding: 8px 12px; border-radius: 8px; }
.cook-story-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cook-story-btn-cancel { border: 0; border-radius: 999px; padding: 10px 20px; font-size: 13.5px; font-weight: 700; background: #f4f3f1; color: #6b7680; cursor: pointer; }
.cook-story-btn-submit { border: 0; border-radius: 999px; padding: 10px 22px; font-size: 13.5px; font-weight: 700; background: #e74c3c; color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(231,76,60,.3); }
.cook-story-btn-submit:hover { background: #d8432f; }
.cook-story-btn-submit[disabled] { opacity: .6; cursor: default; }

@media (max-width: 560px) {
	.cook-header { padding: 10px 14px; gap: 8px; }
	.cook-header-logo { height: 22px; max-width: 90px; }
	.cook-header-divider { display: none; }
	.cook-header-thumb { width: 36px; height: 36px; }
	.cook-header-title { font-size: 13px; }
	.cook-exit { padding: 6px 12px; font-size: 12px; }
	.cook-complete { top: 57px; }
	.cook-complete-deco { display: none; }
	.cook-complete-card { padding: 32px 24px; }
	.cook-step-heading { font-size: 21px; }
	.cook-footer { flex-wrap: wrap; }
}
