/* widgets.css — ignition, venting, cooking, conclusion */

/* ====================== shared callout ====================== */
.safety-note {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 18px; padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(228,106,85,0.3);
  background: linear-gradient(180deg, rgba(228,106,85,0.12), rgba(228,106,85,0.04));
}
.safety-note.tip { border-color: rgba(196,190,188,0.22); background: rgba(255,255,255,0.035); }
.safety-ico {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: var(--fire);
  background: rgba(228,106,85,0.16);
}
.safety-ico.tip { color: var(--ember-glow); background: rgba(255,179,122,0.12); }
.safety-title { font-family: var(--font-head); font-weight: 800; font-size: 13px; color: #fff; margin-bottom: 3px; letter-spacing: .02em; }
.safety-copy { font-size: 13px; line-height: 1.5; color: rgba(216,211,208,0.78); margin: 0; }

/* ====================== TEMP REFERENCE ====================== */
.temp-ref-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 18px; padding: 12px 14px;
  border-radius: 12px; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 14px; letter-spacing: .02em;
  color: var(--ember-glow);
  background: rgba(255,179,122,0.10);
  border: 1px solid rgba(255,179,122,0.30);
  transition: background .18s, border-color .18s;
}
.temp-ref-btn:hover { background: rgba(255,179,122,0.17); border-color: rgba(255,179,122,0.45); }
.temp-ref-btn:active { background: rgba(255,179,122,0.24); }
.trb-emoji { font-size: 16px; line-height: 1; }

.temp-modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(10,12,15,0.64); backdrop-filter: blur(4px);
  animation: tmFade .2s ease;
}
.temp-modal {
  width: 100%; max-width: 332px; max-height: 100%; overflow-y: auto;
  background: var(--char-900);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  padding: 18px 20px 6px;
  box-shadow: 0 26px 64px -14px rgba(0,0,0,0.75);
  animation: tmRise .26s cubic-bezier(.2,.8,.2,1);
}
.tm-head { display: flex; align-items: center; justify-content: space-between; }
.tm-title { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: #fff; letter-spacing: .01em; }
.tm-close {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(255,255,255,0.07); border: none;
  transition: background .18s;
}
.tm-close:hover { background: rgba(255,255,255,0.14); }
.tm-sub { font-size: 12px; line-height: 1.5; color: rgba(196,190,188,0.62); margin: 6px 0 10px; }
.tr-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tr-row:last-child { border-bottom: none; }
.tr-food { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: #fff; }
.tr-note { font-size: 11.5px; color: rgba(196,190,188,0.6); margin-top: 2px; }
.tr-temp { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--ember-glow); white-space: nowrap; }
.tm-foot { font-size: 11px; color: rgba(196,190,188,0.5); text-align: center; padding: 12px 0 10px; }
@keyframes tmFade { from { opacity: 0; } }
@keyframes tmRise { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@media (prefers-reduced-motion: reduce) {
  .temp-modal-overlay, .temp-modal { animation: none; }
}

/* ====================== IGNITION ====================== */
.chimney-stage { display: flex; flex-direction: column; align-items: center; margin: 14px 0 6px; }
.chimney {
  position: relative; width: 150px; height: auto;
  display: flex; flex-direction: column; align-items: center;
  --ignite: 0;
}
.chimney-smoke {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 70px; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 60%, rgba(196,190,188,0.22), rgba(196,190,188,0) 70%);
  filter: blur(6px); opacity: 0; transition: opacity .8s;
}
.chimney.phase-lighting .chimney-smoke,
.chimney.phase-ready .chimney-smoke { opacity: calc(0.4 + var(--ignite) * 0.5); }
.chimney.motion-rich.phase-lighting .chimney-smoke,
.chimney.motion-subtle.phase-lighting .chimney-smoke { animation: smokeRise 3s ease-in-out infinite; }
@keyframes smokeRise { 0%,100% { transform: translateX(-50%) translateY(0) scale(1); } 50% { transform: translateX(-50%) translateY(-8px) scale(1.1); } }

/* chimney mouth — looking down into the cylinder at a heaped pile */
.chimney-mouth {
  position: relative; z-index: 3;
  width: 116px; height: 46px; margin-bottom: -24px;
}
.mouth-rim {
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(160deg, #6a7480 0%, #3a424d 42%, #20252c 70%, #434c58 100%);
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.22), inset 0 -3px 5px rgba(0,0,0,0.5), 0 5px 10px -3px rgba(0,0,0,0.55);
}
.mouth-well {
  position: absolute; inset: 5px; border-radius: 50%;
  background: radial-gradient(72% 84% at 50% 32%, #20252c 0%, #14171c 55%, #08090b 100%);
  box-shadow: inset 0 7px 12px rgba(0,0,0,0.85), inset 0 -2px 6px rgba(0,0,0,0.6);
}
.chimney-coals { position: absolute; inset: 0; }
.cc {
  position: absolute; transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  border-radius: 46% 54% 50% 50% / 54% 46% 54% 46%;
  filter: brightness(var(--tone, 1));
  /* cold base: near-black charcoal with a faint top sheen for form */
  background: radial-gradient(58% 52% at 38% 30%, #41464e 0%, #23272e 36%, #111419 66%, #07080a 100%);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.6),
    0 0 calc(2px + var(--ignite) * 14px) calc(var(--ignite) * 4px) rgba(245,149,99, calc(var(--ignite) * 0.6));
}
.cc-ash {
  position: absolute; inset: 0; border-radius: inherit;
  /* light ash coat — opacity bound to ignition in JS; no orange on the coal itself */
  background: radial-gradient(58% 52% at 38% 30%, #e8e3dc 0%, #b4b1ad 36%, #76757a 66%, #4d4e54 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), inset 0 -2px 3px rgba(0,0,0,0.35);
  transition: opacity .6s;
}

/* metal body */
.chimney-body {
  position: relative; z-index: 2;
  width: 116px; height: 170px;
  border-radius: 18px 18px 10px 10px;
  background:
    linear-gradient(90deg, #1b1f25 0%, #5b6470 18%, #3a424d 40%, #20252c 62%, #4d5662 84%, #232932 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,0.18), inset 0 -10px 20px rgba(0,0,0,0.55), 0 12px 24px -10px rgba(0,0,0,0.7);
}
.louver {
  position: absolute; left: 12%; right: 12%; height: 5px; border-radius: 3px;
  background: linear-gradient(180deg, #0a0c0e, #2b3139);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 calc(var(--ignite) * 10px) rgba(245,149,99, calc(var(--ignite) * 0.6));
}
.chimney-handle {
  position: absolute; right: -26px; top: 30%;
  width: 30px; height: 60px;
  border: 6px solid #3a424d; border-left: none;
  border-radius: 0 16px 16px 0;
  box-shadow: inset -2px 0 2px rgba(255,255,255,0.1);
}

/* flames at the bottom */
.chimney-flames {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 4; width: 90px; height: 60px;
  display: flex; align-items: flex-end; justify-content: center; gap: 4px;
  opacity: 0; transition: opacity .4s;
}
.chimney.phase-lighting .chimney-flames { opacity: 1; }
.chimney.phase-ready .chimney-flames { opacity: 0; }
.fl {
  width: 18px; height: calc(16px + var(--ignite) * 34px);
  background: linear-gradient(180deg, #ffd089 0%, #f59563 38%, #E46A55 70%, #b03a26 100%);
  border-radius: 50% 50% 48% 48% / 70% 70% 30% 30%;
  filter: blur(0.5px);
  transform-origin: 50% 100%;
  box-shadow: 0 0 20px 4px rgba(245,149,99,0.6);
}
.chimney.motion-rich .fl, .chimney.motion-subtle .fl { animation: flame 0.7s ease-in-out infinite; animation-delay: calc(var(--i) * 0.12s); }
@keyframes flame {
  0%,100% { transform: scaleY(1) scaleX(1) rotate(0deg); opacity: .92; }
  50%     { transform: scaleY(1.15) scaleX(0.92) rotate(2deg); opacity: 1; }
}

/* crumpled newspaper stuffed in the lower chamber */
.chimney-paper {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; align-items: flex-end; gap: 1px;
}
.pw {
  position: relative;
  width: 30px; height: 22px; margin: 0 -5px;
  /* creamy newsprint with fold highlights + crease shadows */
  background:
    linear-gradient(118deg, transparent 39%, rgba(118,106,84,0.30) 41%, transparent 44%),
    linear-gradient(54deg, transparent 55%, rgba(118,106,84,0.24) 57%, transparent 60%),
    linear-gradient(150deg, rgba(255,255,255,0.7) 6%, transparent 40%),
    radial-gradient(72% 70% at 40% 28%, #f3eee3, #ddd6c6 66%, #c5bda9 100%);
  /* irregular crumpled silhouette */
  clip-path: polygon(6% 50%, 30% 16%, 50% 30%, 70% 12%, 92% 44%, 82% 66%, 60% 64%, 40% 88%, 14% 70%);
  transform: rotate(calc(var(--i) * 13deg - 13deg));
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
  transition: opacity .5s, filter .5s;
}
.pw:nth-child(2) {
  width: 34px; height: 26px;
  clip-path: polygon(10% 38%, 26% 10%, 48% 24%, 72% 8%, 94% 40%, 84% 60%, 98% 84%, 66% 78%, 34% 96%, 8% 64%);
}
.pw:nth-child(3) {
  clip-path: polygon(8% 44%, 28% 18%, 52% 8%, 74% 26%, 90% 16%, 86% 56%, 70% 82%, 44% 72%, 22% 90%, 6% 60%);
}
.pw::after {
  content: ''; position: absolute; inset: -10%;
  background: radial-gradient(60% 60% at 50% 80%, rgba(255,179,122,0.9), rgba(228,106,85,0.5) 55%, rgba(228,106,85,0) 80%);
  opacity: calc(var(--ignite) * (1 - var(--ignite)) * 3.2);
}
.chimney.phase-lighting .pw,
.chimney.phase-ready .pw {
  filter: brightness(calc(1 - var(--ignite) * 0.85));
  opacity: calc(1.05 - var(--ignite) * 1.15);
  transform: rotate(calc(var(--i) * 17deg - 14deg)) scale(calc(1 - var(--ignite) * 0.3));
}

/* stick lighter — lights the newspaper through the base */
.stick-lighter {
  position: absolute; z-index: 6;
  left: 56px; bottom: 0;
  width: 150px; height: 34px;
  pointer-events: none;
  transition: opacity .6s ease, transform .6s ease;
  animation: lighterIn .55s ease-out backwards;
}
@keyframes lighterIn {
  from { opacity: 0; transform: translate(60px, 34px) rotate(-4deg); }
}
.sl-wand {
  position: absolute; left: 12px; top: 14px; width: 64px; height: 7px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #6a7480, #2b3139);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.sl-wand::before {
  content: ''; position: absolute; left: -7px; top: -2px; width: 10px; height: 11px;
  border-radius: 3px; background: linear-gradient(180deg, #3a424d, #14171c);
}
.sl-body {
  position: absolute; left: 74px; top: 8px; width: 52px; height: 19px;
  border-radius: 5px 10px 10px 5px;
  background: linear-gradient(180deg, #3a424d, #14171c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.sl-body::after {
  content: ''; position: absolute; left: 9px; bottom: -5px; width: 11px; height: 7px;
  border-radius: 0 0 5px 5px; background: var(--fire, #E46A55);
}
.sl-flame {
  position: absolute; left: 4px; top: -7px; width: 11px; height: 17px;
  border-radius: 50% 50% 48% 48% / 64% 64% 36% 36%;
  background: linear-gradient(180deg, #ffd089 0%, #f59563 55%, #E46A55 100%);
  box-shadow: 0 0 14px 3px rgba(245,149,99,0.6);
  transform-origin: 50% 100%;
}
.chimney.motion-rich .sl-flame,
.chimney.motion-subtle .sl-flame { animation: flame .55s ease-in-out infinite; }

.chimney-stand {
  position: relative; z-index: 1; width: 130px; height: 14px; margin-top: -2px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #2b3139, #14171c);
  box-shadow: 0 14px 26px -10px rgba(245,149,99, calc(var(--ignite) * 0.8));
}

.ignite-meter {
  width: 220px; max-width: 80%; height: 8px; margin-top: 22px;
  border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08);
}
.ignite-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #b03a26, #E46A55 50%, #f59563 100%);
  box-shadow: 0 0 12px 1px rgba(245,149,99,0.7);
  transition: width .15s linear;
}
.ignite-status {
  font-family: var(--font-head); font-weight: 700; font-size: 12.5px; letter-spacing: .03em;
  color: rgba(196,190,188,0.72); margin-top: 9px;
}
.ignite-action { margin-top: 18px; }
.btn-fire.is-busy { opacity: .9; }
.spark-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====================== VENTING ====================== */
.vent-readout {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin: 16px 0 8px;
}
.gauge { display: block; }
.vent-temp { display: flex; flex-direction: column; align-items: center; margin-top: -8px; }
.vt-num { font-family: var(--font-head); font-weight: 800; font-size: 44px; line-height: 1; color: #fff; }
.vt-deg { font-size: 20px; font-weight: 700; color: rgba(196,190,188,0.7); margin-left: 2px; }
.vt-zone {
  margin-top: 8px; font-family: var(--font-head); font-weight: 800; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px;
}
.vt-zone.indirect { color: #aeb6bf; background: rgba(77,86,98,0.4); }
.vt-zone.medium { color: #ffce9e; background: rgba(255,179,122,0.16); }
.vt-zone.direct { color: #ffb59f; background: rgba(228,106,85,0.2); }

.vent-controls { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.vent-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.025);
}
.vent-meta { flex: 1; min-width: 0; }
.vent-name { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: #fff; }
.vent-sub { color: rgba(196,190,188,0.55); font-weight: 600; font-size: 13px; }
.vent-val { font-family: var(--font-head); font-weight: 700; font-size: 12.5px; color: var(--fire); margin-top: 7px; }

/* circular damper */
.damper { position: relative; width: 72px; height: 72px; flex-shrink: 0; --glow: 0.3; }
.damper-base, .damper-cover {
  position: absolute; inset: 0; border-radius: 50%;
}
.damper-base {
  background: radial-gradient(60% 60% at 50% 40%, #2b3139, #14171c);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.7), 0 4px 10px rgba(0,0,0,0.5);
}
.d-slot {
  position: absolute; top: 50%; left: 50%; width: 12px; height: 24px; margin: -12px 0 0 -6px;
  border-radius: 8px; transform-origin: 50% 50%;
  background: radial-gradient(50% 60% at 50% 50%, rgba(255,210,140,0.95), #f59563 45%, #b03a26 90%);
  box-shadow: 0 0 calc(4px + var(--glow) * 14px) calc(var(--glow) * 3px) rgba(245,149,99, calc(0.4 + var(--glow) * 0.5));
  opacity: calc(0.45 + var(--glow) * 0.55);
}
.damper-core {
  position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: #14171c;
}
.damper-cover {
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
}
.damper-cover svg { display: block; }
.damper-hub {
  position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 40% 35%, #6b7480, #2b3139);
  box-shadow: 0 1px 2px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* range slider */
.fire-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin: 10px 0 0;
  border-radius: 999px; outline: none;
  background: linear-gradient(90deg, #4d5662, #f59563, #E46A55);
}
.fire-range.tall { height: 10px; }
.fire-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(50% 50% at 40% 35%, #fff, #f0eae7);
  border: 3px solid var(--fire);
  box-shadow: 0 3px 8px rgba(0,0,0,0.5), 0 0 12px 1px rgba(228,106,85,0.5);
  cursor: grab;
}
.fire-range::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.08); }
.fire-range::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--fire);
  box-shadow: 0 3px 8px rgba(0,0,0,0.5); cursor: grab;
}

/* ====================== COOKING ====================== */
.steak-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 18px 0 8px; }
.steak { position: relative; width: 250px; height: 183px; }
.steak svg { display: block; filter: drop-shadow(0 16px 22px rgba(0,0,0,0.6)); }
.stk-core { transition: transform .35s cubic-bezier(.3,.7,.2,1); }
.steak-temp { display: flex; flex-direction: column; align-items: center; margin-top: 4px; }
.st-num { font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1; color: #fff; }
.st-name { font-family: var(--font-head); font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--fire); margin-top: 6px; }

.done-control { margin-top: 14px; }
.done-ticks { display: flex; justify-content: space-between; margin-top: 12px; }
.dt {
  font-family: var(--font-head); font-weight: 700; font-size: 10.5px;
  color: rgba(196,190,188,0.5); letter-spacing: .01em; text-align: center; flex: 1;
  transition: color .2s;
}
.dt.on { color: #fff; }
.done-tip { text-align: center; margin-top: 14px; font-size: 14px; }

/* ====================== CONCLUSION ====================== */
.conclusion-body { padding: 86px 26px 30px; display: flex; flex-direction: column; min-height: 100%; }
.conclusion-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.flame-wrap.small { width: 70px; height: 84px; }
.flame-wrap.small img { height: 74px; }
.recap {
  margin-top: 26px; display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; overflow: hidden;
  background: rgba(255,255,255,0.025);
}
.recap-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  width: 100%; text-align: left; background: none; border-left: none; border-right: none; border-top: none;
  color: inherit; font: inherit; cursor: pointer;
  transition: background .18s;
}
.recap-row:hover { background: rgba(255,255,255,0.05); }
.recap-row:active { background: rgba(255,255,255,0.08); }
.recap-go { margin-left: auto; color: rgba(196,190,188,0.4); display: grid; place-items: center; }
.recap-row:hover .recap-go { color: var(--fire); }
.recap-row:last-child { border-bottom: none; }
.recap-check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: var(--fire); box-shadow: 0 0 12px -2px rgba(228,106,85,0.8);
}
.recap-num { font-family: var(--font-head); font-weight: 800; font-size: 13px; color: rgba(196,190,188,0.5); }
.recap-t { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: #fff; }
.recap-d { font-size: 12.5px; color: rgba(196,190,188,0.62); margin-top: 1px; }
.conclusion-actions { margin-top: 22px; padding-top: 4px; display: flex; flex-direction: column; gap: 10px; }
