/* =====================================================================
   COOKED - greasy late-night diner kitchen
   Bootstrap 5 handles grid, navbar, forms, modals and toasts.
   This file overrides its default look completely.
   ===================================================================== */

:root {
  /* Palette */
  --ketchup: #D7261E;
  --ketchup-dark: #A91B14;
  --mustard: #F2B705;
  --mustard-soft: #FCE9A8;
  --grill: #1C1C1C;
  --paper: #FFFDF7;
  --paper-2: #F6F1E4; /* slightly darker paper for sections */
  --pickle: #6A8F2E;
  --steel: #8A8D91;
  --steel-dark: #5E6166; /* steel for small text, passes contrast on paper */
  --orange: #E8731C;

  /* Type */
  --font-sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  /* Shape */
  --radius: 6px;
  --line: 2px solid var(--grill);
  --shadow-hard: 4px 4px 0 var(--grill);

  /* Bootstrap overrides */
  --bs-body-font-family: var(--font-sans);
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--grill);
  --bs-border-radius: var(--radius);
  --bs-border-color: var(--grill);
  --bs-link-color-rgb: 215, 38, 30;
  --bs-link-hover-color-rgb: 169, 27, 20;
  --bs-emphasis-color: var(--grill);
  --bs-secondary-color: var(--steel-dark);
}

/* ---------- Base ---------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--grill);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4, .display-cooked {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  overflow-wrap: anywhere; /* long @handles must wrap on phones */
}
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1; }
p { max-width: 62ch; }
a { text-underline-offset: 3px; }
::selection { background: var(--mustard); color: var(--grill); }

.eyebrow {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ketchup);
  margin-bottom: 0.75rem;
}
.muted { color: var(--steel-dark); }
.text-ketchup { color: var(--ketchup) !important; }

/* Visible keyboard focus everywhere */
:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--mustard) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--grill) !important;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 2000;
  background: var(--grill); color: var(--paper); padding: 8px 14px; border-radius: var(--radius);
}
.skip-link:focus { left: 8px; }

/* Checkered diner-floor strip, used as a divider */
.checker {
  height: 14px;
  background: repeating-conic-gradient(var(--grill) 0 25%, var(--paper) 0 50%) 0 0 / 14px 14px;
  border-block: 2px solid var(--grill);
}

/* ---------- Navbar -------------------------------------------------- */
.navbar-cooked {
  background: var(--paper);
  border-bottom: var(--line);
  padding-block: 0.7rem;
}
.brand {
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.05em;
  color: var(--grill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.brand:hover { color: var(--grill); }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ketchup);
  border: var(--line);
  display: inline-grid; place-items: center;
  box-shadow: 2px 2px 0 var(--grill);
}
.brand-mark svg { width: 16px; height: 16px; }
.navbar-cooked .nav-link {
  font-weight: 600;
  color: var(--grill);
  padding-inline: 0.8rem !important;
  border-radius: var(--radius);
}
.navbar-cooked .nav-link:hover { background: var(--mustard-soft); }
.navbar-cooked .nav-link.active { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--ketchup); text-underline-offset: 6px; }
.navbar-toggler { border: var(--line); border-radius: var(--radius); padding: 0.35rem 0.55rem; }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- Buttons ------------------------------------------------- */
.btn {
  --bs-btn-font-weight: 700;
  --bs-btn-border-width: 2px;
  --bs-btn-border-radius: var(--radius);
  --bs-btn-padding-x: 1.15rem;
  --bs-btn-padding-y: 0.6rem;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s ease;
}
.btn-lg { --bs-btn-padding-x: 1.6rem; --bs-btn-padding-y: 0.85rem; font-size: 1.15rem; }
.btn-sm { --bs-btn-padding-x: 0.7rem; --bs-btn-padding-y: 0.3rem; }

/* Hard-shadow buttons that "press" when clicked */
.btn-ketchup, .btn-mustard, .btn-paper, .btn-grill {
  border: var(--line);
  box-shadow: 3px 3px 0 var(--grill);
}
.btn-ketchup:hover, .btn-mustard:hover, .btn-paper:hover, .btn-grill:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--grill); }
.btn-ketchup:active, .btn-mustard:active, .btn-paper:active, .btn-grill:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--grill) !important; }

.btn-ketchup { background: var(--ketchup); color: var(--paper); }
.btn-ketchup:hover, .btn-ketchup:focus, .btn-ketchup:active { background: var(--ketchup-dark) !important; color: var(--paper) !important; border-color: var(--grill) !important; }
.btn-mustard { background: var(--mustard); color: var(--grill); }
.btn-mustard:hover, .btn-mustard:focus, .btn-mustard:active { background: #E0A800 !important; color: var(--grill) !important; border-color: var(--grill) !important; }
.btn-paper { background: var(--paper); color: var(--grill); }
.btn-paper:hover, .btn-paper:focus, .btn-paper:active { background: var(--mustard-soft) !important; color: var(--grill) !important; border-color: var(--grill) !important; }
.btn-grill { background: var(--grill); color: var(--paper); }
.btn-grill:hover, .btn-grill:focus, .btn-grill:active { background: #000 !important; color: var(--paper) !important; }
.btn-link-plain { background: none; border: 0; padding: 0.25rem 0.4rem; font-weight: 600; color: var(--grill); text-decoration: underline; }
.btn:disabled, .btn.disabled { opacity: 0.55; box-shadow: none; transform: none; }

/* ---------- Forms --------------------------------------------------- */
.form-label { font-weight: 700; margin-bottom: 0.35rem; }
.form-text { color: var(--steel-dark); font-size: 0.9rem; }
.form-control, .form-select {
  border: var(--line);
  border-radius: var(--radius);
  background-color: #fff;
  color: var(--grill);
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
}
.form-control::placeholder { color: #9A9CA0; }
.form-control:focus, .form-select:focus {
  border-color: var(--grill);
  box-shadow: 4px 4px 0 var(--mustard);
  outline: none;
}
.form-control.is-invalid { border-color: var(--ketchup); background-image: none; padding-right: 0.85rem; }
.form-control.is-invalid:focus { box-shadow: 4px 4px 0 rgba(215, 38, 30, 0.35); }
.invalid-feedback { color: var(--ketchup); font-weight: 600; font-size: 0.9rem; }
.input-group-text { border: var(--line); background: var(--mustard); font-weight: 800; color: var(--grill); }
.form-check-input { border: var(--line); width: 1.2em; height: 1.2em; }
.form-check-input:checked { background-color: var(--ketchup); border-color: var(--grill); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--mustard); border-color: var(--grill); }
.char-count { font-variant-numeric: tabular-nums; font-size: 0.85rem; color: var(--steel-dark); }
.char-count.over { color: var(--ketchup); font-weight: 700; }

/* Segmented control (Bootstrap btn-check) */
.segmented { display: inline-flex; border: var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.segmented .btn { border: 0; border-radius: 0; box-shadow: none; font-weight: 600; }
.segmented .btn + .btn, .segmented label + input + label { border-left: var(--line); }
.segmented .btn-check:checked + .btn { background: var(--grill); color: var(--paper); }
.segmented .btn-check:focus-visible + .btn { outline: 3px solid var(--mustard); outline-offset: -3px; }

/* ---------- Hero ---------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5.5rem); overflow: hidden; }
.hero h1 {
  font-size: clamp(3rem, 9.5vw, 7.4rem);
  line-height: 0.86;
  letter-spacing: -0.055em;
  margin-bottom: 1.5rem;
}
.hero h1 .hot {
  color: var(--ketchup);
  position: relative;
  white-space: nowrap;
}
.hero h1 .hot::after {
  content: "";
  position: absolute; left: -0.04em; right: -0.04em; bottom: 0.1em;
  height: 0.2em;
  background: var(--mustard);
  z-index: -1;
}
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 34ch; }
.hero-note { font-size: 0.9rem; color: var(--steel-dark); }

/* The sample ticket on the landing page */
.hero-ticket-wrap { position: relative; display: flex; justify-content: center; padding-top: 1rem; }
.hero-ticket-wrap .ticket-shadow { transform: rotate(2.5deg); max-width: 340px; width: 100%; }

/* ---------- Stats band ---------------------------------------------- */
.stats-band { background: var(--mustard); border-block: var(--line); padding-block: 2rem; }
.stat-num {
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-weight: 600; font-size: 0.95rem; }
.stats-band .col + .col { border-left: 2px solid rgba(28, 28, 28, 0.25); }

/* ---------- Sections ------------------------------------------------ */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-paper { background: var(--paper-2); border-block: var(--line); }

/* How it works: 3 numbered steps, separated by rules (not cards) */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 1.25rem; }
.step::before { /* rule inside the gutter so each step gets its own line */
  content: ""; position: absolute; top: 0;
  left: calc(var(--bs-gutter-x) * 0.5); right: calc(var(--bs-gutter-x) * 0.5);
  border-top: var(--line);
}
.step-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  background: var(--grill);
  color: var(--paper);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.9rem; margin-bottom: 0.5rem; }

/* Privacy note */
.privacy {
  border: var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.5rem;
  display: flex; gap: 1.1rem; align-items: flex-start;
  box-shadow: var(--shadow-hard);
}
.privacy-icon { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--pickle); border: var(--line); display: grid; place-items: center; color: var(--paper); }

/* Big red call to action block */
.cta-block { background: var(--ketchup); color: var(--paper); border-block: var(--line); padding-block: clamp(3rem, 7vw, 5rem); }
.cta-block h2 { font-size: clamp(2.4rem, 7vw, 5rem); line-height: 0.9; }
.cta-block p { color: #FFE3DF; }

/* ---------- Page header --------------------------------------------- */
.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); line-height: 0.9; }

/* ---------- Order pad (roast form) ---------------------------------- */
.pad {
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: clamp(1.1rem, 3vw, 2rem);
}
.caption-row { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: 0.6rem; align-items: start; margin-bottom: 0.75rem; }
.caption-row .num {
  font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem;
  background: var(--paper-2); border: var(--line); border-radius: var(--radius);
  height: 2.6rem; display: grid; place-items: center;
}
.caption-row textarea { min-height: 2.6rem; resize: vertical; }
.btn-remove {
  width: 2.6rem; height: 2.6rem; padding: 0;
  border: var(--line); border-radius: var(--radius); background: #fff; color: var(--grill);
  display: grid; place-items: center;
}
.btn-remove:hover { background: var(--ketchup); color: var(--paper); }
.btn-remove:disabled { opacity: 0.35; background: #fff; color: var(--grill); }
.caption-meter { font-weight: 700; font-variant-numeric: tabular-nums; }
.side-note { border-left: 4px solid var(--mustard); padding-left: 1rem; }
.side-note li { margin-bottom: 0.4rem; }

/* Kitchen loading state */
.kitchen-modal .modal-content {
  border: var(--line); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--grill);
  background: var(--paper); text-align: center; padding: 2rem 1.5rem;
}
.grill-anim { display: flex; justify-content: center; gap: 6px; height: 56px; align-items: flex-end; margin-bottom: 1.25rem; }
.grill-anim span { width: 12px; border-radius: 6px 6px 2px 2px; background: var(--ketchup); animation: flame 0.9s ease-in-out infinite; transform-origin: bottom; }
.grill-anim span:nth-child(2) { background: var(--mustard); animation-delay: 0.15s; }
.grill-anim span:nth-child(3) { background: var(--orange); animation-delay: 0.3s; }
.grill-anim span:nth-child(4) { background: var(--ketchup); animation-delay: 0.45s; }
.grill-anim span:nth-child(5) { background: var(--mustard); animation-delay: 0.6s; }
@keyframes flame { 0%, 100% { height: 18px; } 50% { height: 52px; } }
.kitchen-step { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; }
.kitchen-steps { list-style: none; padding: 0; margin: 1rem auto 0; display: flex; justify-content: center; gap: 1rem; font-size: 0.85rem; font-weight: 600; color: var(--steel-dark); }
.kitchen-steps li.done { color: var(--pickle); }
.kitchen-steps li.now { color: var(--grill); text-decoration: underline; text-decoration-color: var(--ketchup); text-decoration-thickness: 2px; }

/* =====================================================================
   THE ORDER TICKET - thermal printed kitchen ticket
   ===================================================================== */
.ticket-shadow { filter: drop-shadow(3px 5px 0 rgba(28, 28, 28, 0.18)); }
.ticket {
  --zig: 14px;
  position: relative;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.5;
  color: #262626;
  padding: calc(var(--zig) + 1.1rem) 1.35rem calc(var(--zig) + 1.2rem);
  /* Torn zig-zag top + bottom edge with a CSS mask */
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zig) 51% repeat-x;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zig) 51% repeat-x;
}
/* faint thermal-paper texture */
.ticket::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.018) 0 1px, transparent 1px 3px);
}
.ticket-head { text-align: center; margin-bottom: 0.6rem; }
.ticket-head .shop { font-weight: 600; font-size: 1.15rem; letter-spacing: 0.18em; }
.ticket-head .sub { font-size: 0.75rem; color: #666; letter-spacing: 0.06em; }
.ticket hr, .ticket .rule { border: 0; border-top: 1.5px dashed #444; opacity: 1; margin: 0.6rem 0; }
.ticket .rule-double { border-top: 4px double #333; margin: 0.6rem 0; }
.ticket-meta { display: grid; grid-template-columns: 1fr auto; column-gap: 0.75rem; font-size: 0.8rem; text-transform: uppercase; }
.ticket-meta .strong { font-weight: 600; font-size: 0.95rem; }
.ticket-items { list-style: none; padding: 0; margin: 0; }
.ticket-item { padding: 0.18rem 0; }
.ticket-line { display: flex; align-items: baseline; gap: 0.3rem; }
.ticket-line .no { flex: 0 0 auto; color: #777; }
.ticket-line .desc { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-line .dots { flex: 1 1 1.5rem; min-width: 1rem; border-bottom: 2px dotted #999; transform: translateY(-0.3em); }
.ticket-line .verdict { flex: 0 0 auto; font-weight: 600; letter-spacing: 0.05em; }
.verdict.fresh { color: var(--pickle); }
.verdict.mid { color: #7a6200; }
.verdict.burnt { color: var(--ketchup); }
.ticket-item .sin { font-size: 0.74rem; color: #777; padding-left: 1.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
.ticket-tally { display: flex; justify-content: space-between; font-size: 0.8rem; text-transform: uppercase; }
.ticket-total { display: flex; align-items: baseline; gap: 0.4rem; font-weight: 600; font-size: 1.05rem; text-transform: uppercase; }
.ticket-total .dots { flex: 1; border-bottom: 2px dotted #777; transform: translateY(-0.3em); }
.ticket-total .amount { font-size: 1.5rem; letter-spacing: -0.02em; }
.ticket-foot { text-align: center; font-size: 0.75rem; color: #666; margin-top: 0.8rem; }
.barcode {
  height: 38px; margin: 0.7rem auto 0.2rem; max-width: 220px;
  background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 4px, #222 4px 5px, transparent 5px 8px, #222 8px 11px, transparent 11px 12px, #222 12px 13px, transparent 13px 16px);
}

/* The rubber stamp */
.stamp {
  --stamp-bg: transparent;
  --stamp-color: var(--ketchup);
  position: absolute;
  right: 5%;
  bottom: 3.5%;
  transform: rotate(-14deg);
  font-family: var(--font-sans);
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--stamp-color);
  background: var(--stamp-bg);
  border: 4px solid currentColor;
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 8px;
  padding: 0.45rem 0.8rem 0.5rem;
  font-size: 1.55rem;
  mix-blend-mode: multiply;
  opacity: 0.92;
  filter: url(#stamp-rough);
  z-index: 3;
  pointer-events: none;
}
.stamp small { display: block; font-size: 0.62rem; letter-spacing: 0.1em; font-weight: 700; margin-top: 0.25rem; }
/* Solid doneness stamps (bg colour) keep the text readable */
.stamp.solid { mix-blend-mode: normal; opacity: 0.95; }
.stamp.solid { outline-color: var(--stamp-bg); }

/* Printer slot + print animation (result page) */
.printer { position: relative; max-width: 440px; margin-inline: auto; }
.printer-slot {
  height: 22px;
  background: var(--grill);
  border-radius: 11px;
  position: relative;
  z-index: 5;
  box-shadow: inset 0 -5px 0 #000, 0 3px 0 rgba(0,0,0,0.12);
}
.printer-slot::after { /* glowing paper exit line */
  content: ""; position: absolute; left: 12px; right: 12px; top: 9px; height: 4px; border-radius: 2px; background: #3a3a3a;
}
.printer-feed { overflow: hidden; margin: -11px 12px 0; padding-bottom: 12px; }
.printer-feed .ticket-shadow { transform-origin: top center; }

.is-printing .printer-feed .ticket-shadow { animation: print-out 1.9s steps(24, end) both; }
.is-printing .stamp { animation: stamp-slap 0.42s cubic-bezier(.2, 1.6, .4, 1) 2s both; }
@keyframes print-out {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
@keyframes stamp-slap {
  0% { opacity: 0; transform: rotate(-4deg) scale(2.6); }
  70% { opacity: 0.95; transform: rotate(-16deg) scale(0.94); }
  100% { opacity: 0.92; transform: rotate(-14deg) scale(1); }
}

/* ---------- Meat thermometer ---------------------------------------- */
.thermo { max-width: 360px; margin-inline: auto; }
.thermo svg { width: 100%; height: auto; display: block; overflow: visible; }
.thermo .needle { transform-origin: 150px 150px; transition: transform 1.3s cubic-bezier(.3, 1.4, .5, 1); }
.thermo-score { text-align: center; margin-top: 0.5rem; }
.thermo-score .num { font-weight: 800; font-size: 4.2rem; letter-spacing: -0.06em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.thermo-score .of { font-weight: 700; color: var(--steel-dark); }
.thermo-score .band { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }

/* ---------- Result page panels -------------------------------------- */
.panel { border-top: var(--line); padding-top: 1.1rem; margin-top: 1.9rem; }
.panel h2 { font-size: 1.6rem; letter-spacing: -0.03em; margin-bottom: 0.9rem; }
.bucket-bar { display: flex; height: 16px; border: var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.bucket-bar span { display: block; height: 100%; }
.bucket-bar .b-fresh { background: var(--pickle); }
.bucket-bar .b-mid { background: var(--mustard); }
.bucket-bar .b-burnt { background: var(--ketchup); }
.bucket-bar span + span { border-left: 2px solid var(--grill); }
.bucket-legend { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 0.7rem; font-weight: 600; }
.bucket-legend .swatch { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--grill); border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; }
.roast-lines { list-style: none; padding: 0; margin: 0; counter-reset: roast; }
.roast-lines li {
  counter-increment: roast;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  padding: 0.85rem 0 0.85rem 2.6rem;
  position: relative;
  border-bottom: 1px dashed rgba(28,28,28,0.3);
}
.roast-lines li::before {
  content: counter(roast, decimal-leading-zero);
  position: absolute; left: 0; top: 1rem;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  background: var(--ketchup); color: var(--paper); padding: 0 0.35rem; border-radius: 3px;
}
.bio-verdict { display: inline-block; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; padding: 0.2rem 0.7rem; border: var(--line); border-radius: var(--radius); }
.bio-verdict.good { background: var(--pickle); color: var(--paper); }
.bio-verdict.bad { background: var(--mustard); }
.bio-verdict.ugly { background: var(--ketchup); color: var(--paper); }
.tips { padding-left: 0; list-style: none; margin: 0; }
.tips li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem 0; font-weight: 600; }
.tips li::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 0.2rem; border: 2px solid var(--grill); border-radius: 4px; background: var(--mustard); }
.react-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn-react { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 1.05rem; }
.btn-react .count { font-variant-numeric: tabular-nums; font-weight: 800; }
.btn-react.reacted { background: var(--mustard); }
.fallback-note { font-size: 0.85rem; color: var(--steel-dark); border: 1.5px dashed var(--steel); border-radius: var(--radius); padding: 0.55rem 0.8rem; display: inline-block; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Offscreen export stage for html2canvas */
.export-stage { position: fixed; left: 0; top: 0; padding: 36px; background: var(--mustard); width: 480px; visibility: hidden; pointer-events: none; z-index: -1; }
.export-stage .ticket { -webkit-mask: none; mask: none; }
.export-stage .zig-top, .export-stage .zig-bottom { display: block; }
.zig-top, .zig-bottom { display: none; position: absolute; left: 0; right: 0; height: 14px; z-index: 4; }
.zig-top { top: 0; background: linear-gradient(135deg, var(--mustard) 50%, transparent 50%) 0 0 / 14px 14px repeat-x, linear-gradient(225deg, var(--mustard) 50%, transparent 50%) 0 0 / 14px 14px repeat-x; }
.zig-bottom { bottom: 0; background: linear-gradient(45deg, var(--mustard) 50%, transparent 50%) 0 100% / 14px 14px repeat-x, linear-gradient(-45deg, var(--mustard) 50%, transparent 50%) 0 100% / 14px 14px repeat-x; }
.export-stage .stamp { filter: none; mix-blend-mode: normal; animation: none !important; }
.export-credit { font-family: var(--font-sans); font-weight: 800; text-align: center; margin-top: 18px; letter-spacing: -0.03em; font-size: 20px; }

/* ---------- Doneness pills ------------------------------------------ */
.pill {
  display: inline-block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em;
  padding: 0.15rem 0.55rem; border-radius: 999px; border: 2px solid var(--grill); white-space: nowrap;
}
.pill.raw { background: var(--pickle); color: var(--paper); }
.pill.medium-rare { background: var(--mustard); color: var(--grill); }
.pill.medium { background: var(--orange); color: var(--grill); }
.pill.well-done { background: var(--ketchup); color: var(--paper); }
.pill.fully-cooked { background: var(--grill); color: #FF6B63; }
.pill.judge { background: #fff; color: var(--steel-dark); border-color: var(--steel); font-weight: 600; }

/* ---------- Leaderboard --------------------------------------------- */
.tabs-cooked { display: flex; gap: 0; border: var(--line); border-radius: var(--radius); overflow: hidden; width: fit-content; background: #fff; }
.tabs-cooked .nav-link {
  border: 0; border-radius: 0; color: var(--grill); font-weight: 700; padding: 0.6rem 1.2rem; background: none;
}
.tabs-cooked .nav-link + .nav-link { border-left: var(--line); }
.tabs-cooked .nav-link.active { background: var(--grill); color: var(--paper); }
.board { list-style: none; padding: 0; margin: 0; border-top: var(--line); }
.board-row {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid rgba(28,28,28,0.2);
  text-decoration: none;
  color: var(--grill);
}
a.board-row:hover { background: var(--mustard-soft); color: var(--grill); }
.board-rank { font-weight: 800; font-size: 1.9rem; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.board-row:nth-child(1) .board-rank { color: var(--ketchup); }
.board-handle { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-sub { font-size: 0.85rem; color: var(--steel-dark); }
.board-score { font-weight: 800; font-size: 1.7rem; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; text-align: right; }
.board-score small { font-size: 0.8rem; color: var(--steel-dark); font-weight: 600; }
.search-box { max-width: 320px; }

/* ---------- About page ---------------------------------------------- */
.q-list { list-style: none; padding: 0; margin: 0; border-top: var(--line); }
.q-list li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid rgba(28,28,28,0.18); }
.q-list code { font-family: var(--font-mono); font-weight: 600; color: var(--ketchup); background: none; font-size: 0.95rem; }
.rule-card { font-family: var(--font-mono); background: var(--grill); color: var(--paper); border-radius: var(--radius); padding: 1.25rem 1.4rem; font-size: 0.9rem; line-height: 1.7; overflow-x: auto; }
.rule-card .k { color: var(--mustard); }
.rule-card .burnt { color: #FF6B63; }
.rule-card .fresh { color: #A8D26A; }
.band-table { width: 100%; border-collapse: collapse; }
.band-table th, .band-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid rgba(28,28,28,0.2); text-align: left; }
.band-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: var(--line); }

/* ---------- Auth pages ---------------------------------------------- */
.auth-wrap { max-width: 440px; margin: clamp(2rem, 6vw, 4rem) auto; }
.auth-wrap h1 { font-size: clamp(2.4rem, 7vw, 3.4rem); }

/* ---------- Empty / error states ------------------------------------ */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state h2 { font-size: 2rem; }
.skeleton { background: linear-gradient(90deg, #eee8d8 25%, #f7f2e6 50%, #eee8d8 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Toasts -------------------------------------------------- */
.toast { border: var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--grill); background: var(--paper); font-weight: 600; }
.toast.toast-error { background: var(--ketchup); color: var(--paper); }
.toast.toast-ok { background: var(--pickle); color: var(--paper); }
.toast .btn-close { filter: none; }
.toast.toast-error .btn-close, .toast.toast-ok .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* ---------- Modal --------------------------------------------------- */
.modal-content { border: var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 6px 6px 0 var(--grill); }
.modal-header, .modal-footer { border-color: var(--grill); }

/* ---------- Footer -------------------------------------------------- */
.site-footer { background: var(--grill); color: #CFCFCF; padding-block: 2.5rem 2rem; font-size: 0.95rem; }
.site-footer a { color: var(--paper); }
.site-footer .brand { color: var(--paper); }
.site-footer .small { color: #A9ABAE; }

/* =====================================================================
   COOK PAGE (cook.html)
   ===================================================================== */
.gu, [lang="gu"] { font-family: "Noto Sans Gujarati", var(--font-sans); font-weight: 500; }

/* Step tabs */
.steps-nav { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 1.75rem; border: var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; width: fit-content; max-width: 100%; }
.steps-nav li + li { border-left: var(--line); }
.step-tab { background: none; border: 0; padding: 0.6rem 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; color: var(--grill); white-space: nowrap; }
.step-tab .n { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--grill); display: inline-grid; place-items: center; font-family: var(--font-mono); font-size: 0.8rem; }
.step-tab.active { background: var(--grill); color: var(--paper); }
.step-tab.active .n { border-color: var(--mustard); background: var(--mustard); color: var(--grill); }
.step-tab.done .n { background: var(--pickle); border-color: var(--grill); color: var(--paper); }
.step-panel h2:focus { outline: none; }
.step-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.25rem; border-top: var(--line); }

/* Dropzone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; text-align: center;
  border: 3px dashed var(--grill); border-radius: var(--radius); background: #fff; padding: 2rem 1rem; cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
}
.dropzone:hover, .dropzone.over { background: var(--mustard-soft); }
.dropzone.over { transform: scale(1.01); }
.dropzone:focus-within { outline: 3px solid var(--mustard); outline-offset: 2px; }
.dz-title { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.dz-sub { font-size: 0.9rem; color: var(--steel-dark); }
.shot-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.shot { display: flex; gap: 0.75rem; align-items: center; border: 1.5px solid rgba(28,28,28,0.3); border-left: 5px solid var(--steel); border-radius: var(--radius); background: #fff; padding: 0.5rem 0.7rem; }
.shot.ok { border-left-color: var(--pickle); }
.shot.warn { border-left-color: var(--ketchup); }
.shot img { width: 44px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(28,28,28,0.2); flex: 0 0 auto; }
.shot-info { flex: 1; min-width: 0; font-size: 0.9rem; display: grid; gap: 0.2rem; }
.shot-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-status { color: var(--steel-dark); }
.progress { height: 8px; border: 1.5px solid var(--grill); border-radius: 4px; background: var(--paper-2); }
.progress-bar { background: var(--ketchup); transition: width 0.3s; }

/* Editable app table */
.app-table { display: grid; gap: 0.45rem; }
.app-row { display: grid; grid-template-columns: minmax(90px, 1.1fr) 88px minmax(120px, 2fr) 34px; gap: 0.45rem; align-items: center; }
.app-head { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.app-row .form-control-sm { padding: 0.35rem 0.55rem; font-size: 0.92rem; }
.app-row .btn-remove { width: 34px; height: 34px; }
.app-row.suspicious [data-field="time"] { border-color: var(--ketchup); background: #FFF1EF; }
.app-empty { display: block; padding: 0.6rem 0; font-size: 0.92rem; }
.total-input { width: 6.5rem; }

/* Category pills (horizontally scrollable on phones) */
.cat-pills { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.25rem 0.1rem 0.75rem; scrollbar-width: thin; }
.cat-pill { flex: 0 0 auto; border: var(--line); border-radius: 999px; background: #fff; font-weight: 700; padding: 0.35rem 0.9rem; white-space: nowrap; }
.cat-pill:hover { background: var(--mustard-soft); }
.cat-pill.active { background: var(--grill); color: var(--paper); }

/* Dish cards */
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.dish-card { border: var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.12s, transform 0.12s; }
.dish-card.picked { box-shadow: 5px 5px 0 var(--mustard); outline: 2px solid var(--grill); transform: translate(-2px, -2px); }
.dish-photo { position: relative; display: block; border: 0; padding: 0; background: var(--paper-2); aspect-ratio: 1 / 1; cursor: pointer; width: 100%; }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-badge { position: absolute; left: 0.45rem; top: 0.45rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.45rem; border-radius: 999px; border: 1.5px solid var(--grill); background: var(--paper); }
.dish-badge.verdict-fresh { background: var(--pickle); color: var(--paper); }
.dish-badge.verdict-burnt { background: var(--ketchup); color: var(--paper); }
.dish-qty { position: absolute; right: 0.45rem; top: 0.45rem; background: var(--mustard); border: 2px solid var(--grill); border-radius: var(--radius); font-weight: 800; font-size: 1.1rem; padding: 0 0.4rem; }
.dish-body { padding: 0.6rem 0.7rem 0.7rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.dish-name { font-size: 1.05rem; margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
.dish-name .gu { display: block; font-size: 0.85rem; color: var(--steel-dark); letter-spacing: 0; margin-top: 0.1rem; }
.dish-meta { font-size: 0.8rem; color: var(--steel-dark); margin: 0; }
.counter { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; margin-top: auto; border: var(--line); border-radius: var(--radius); overflow: hidden; }
.counter-btn { height: 36px; border: 0; background: var(--paper-2); font-weight: 800; font-size: 1.25rem; line-height: 1; }
.counter-btn:hover:not(:disabled) { background: var(--mustard); }
.counter-btn:disabled { opacity: 0.35; }
.counter output { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; border-inline: 2px solid var(--grill); height: 36px; line-height: 34px; }

/* Extra food chips */
.extra-input { max-width: 460px; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 0.75rem 0 0; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--mustard-soft); border: 1.5px solid var(--grill); border-radius: 999px; padding: 0.15rem 0.3rem 0.15rem 0.75rem; font-weight: 600; }
.chip button { border: 0; background: var(--grill); color: var(--paper); border-radius: 50%; width: 22px; height: 22px; line-height: 1; font-weight: 800; }

/* Sticky totals bar */
.totals-bar { position: sticky; bottom: 0; z-index: 20; background: var(--grill); color: var(--paper); border-top: 3px solid var(--mustard); }
.totals-inner { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding-block: 0.6rem; font-size: 0.95rem; }
.totals-inner b { font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--mustard); }

/* Result page extras */
.parts { display: grid; gap: 0.7rem; }
.part-row { display: grid; grid-template-columns: 7rem 1fr 3rem; align-items: center; gap: 0.75rem; font-weight: 700; }
.part-track { height: 14px; border: var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.part-fill { height: 100%; }
.part-val { text-align: right; font-variant-numeric: tabular-nums; }
.part-row.skipped { color: var(--steel-dark); font-weight: 600; }
.macro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; }
.macro { border: var(--line); border-radius: var(--radius); background: #fff; padding: 0.7rem 0.8rem; }
.macro .v { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.macro .l { font-size: 0.82rem; color: var(--steel-dark); font-weight: 600; }
.macro.warn { background: #FFF1EF; }
.projection { border: var(--line); border-radius: var(--radius); background: var(--paper-2); padding: 1rem 1.1rem; }
.projection .big { font-weight: 800; font-size: 2.2rem; letter-spacing: -0.05em; line-height: 1; }
.private-tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel-dark); }
.ticket-section { font-weight: 600; letter-spacing: 0.12em; font-size: 0.75rem; margin: 0.35rem 0 0.1rem; }
.ticket-line .qty { flex: 0 0 auto; color: #555; }

/* Credits (about page) */
.credits { columns: 2 260px; column-gap: 2rem; font-size: 0.85rem; padding-left: 1.1rem; }
.credits li { break-inside: avoid; margin-bottom: 0.3rem; }

/* ---------- Responsive ---------------------------------------------- */
@media (max-width: 575.98px) {
  body { font-size: 1rem; }
  .ticket { font-size: 0.78rem; padding-inline: 1rem; }
  .stamp { font-size: 1.2rem; right: 4%; }
  .stats-band .col + .col { border-left: 0; }
  .board-row { grid-template-columns: 2.4rem 1fr auto; }
  .board-row .board-extra { display: none; }
  .board-rank { font-size: 1.5rem; }
  .q-list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .app-row { grid-template-columns: 1fr 76px 34px; }
  .app-row [data-field="note"] { grid-column: 1 / -2; grid-row: 2; }
  .app-row .btn-remove { grid-row: 1; grid-column: 3; }
  .app-head span:nth-child(3) { display: none; }
  .app-row:not(.app-head) { padding-bottom: 0.5rem; border-bottom: 1px dashed rgba(28,28,28,0.25); }
  .dish-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .totals-inner { gap: 0.75rem; font-size: 0.85rem; }
  .step-tab { padding: 0.55rem 0.7rem; }
  .hero h1 .hot { white-space: normal; }
}

/* ---------- Reduced motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .is-printing .printer-feed .ticket-shadow, .is-printing .stamp { animation: none !important; }
}
