.tokenCooker {
  background:
    radial-gradient(circle at 20% 22%, rgba(229, 50, 32, .2), transparent 31%),
    linear-gradient(135deg, rgba(255, 255, 255, .035) 25%, transparent 25%) 0 0 / 18px 18px,
    var(--oxblood);
  border-block: 4px solid var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 16px;
  overflow: hidden;
  position: relative;
}

.tokenCooker::before {
  border: 2px solid rgba(242, 228, 198, .28);
  content: "";
  inset: 18px;
  pointer-events: none;
  position: absolute;
}

.tokenCookerKicker,
.tokenCookerIntro,
.tokenCookerGrid {
  position: relative;
  z-index: 1;
}

.tokenCookerKicker,
.cookerReadoutHeader,
.burnReceiptTop {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.cookerLive {
  align-items: center;
  background: var(--ink);
  border: 2px solid var(--bone);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 9px;
  letter-spacing: .08em;
  padding: 10px 13px;
}

.cookerLive i {
  background: var(--rare);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(204, 255, 0, .7);
  display: block;
  height: 9px;
  width: 9px;
}

.tokenCooker[data-cooker-state="ready"] .cookerLive i {
  animation: cookerPulse 1.7s infinite;
}

.tokenCooker[data-cooker-state="error"] .cookerLive i {
  background: var(--yellow);
}

.tokenCookerIntro {
  align-items: end;
  display: grid;
  gap: 6vw;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr);
  margin-top: 42px;
}

.tokenCookerIntro h2 {
  color: var(--bone);
  font-size: clamp(58px, 7.4vw, 112px);
  line-height: .83;
  margin: 14px 0 0;
}

.tokenCookerIntro h2 em {
  color: var(--rare);
}

.tokenCookerIntro > p {
  border-left: 3px solid var(--rare);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  margin: 0 0 8px;
  padding-left: 20px;
}

.tokenCookerGrid {
  display: grid;
  gap: clamp(28px, 4vw, 64px);
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  margin-top: 58px;
}

.cookerStage {
  background:
    linear-gradient(rgba(11, 17, 18, .1) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--bone);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.cookerStage::after {
  background: var(--ink);
  bottom: 0;
  content: "";
  height: 24px;
  left: 0;
  position: absolute;
  right: 0;
}

.cookerMachine {
  background: #161d1e;
  border: 5px solid var(--ink);
  bottom: 55px;
  box-shadow: 9px 9px 0 rgba(120, 20, 29, .9);
  height: 390px;
  left: 7%;
  position: absolute;
  width: 61%;
  z-index: 2;
}

.cookerMachine::before {
  background: repeating-linear-gradient(90deg, var(--ink) 0 13px, #4b5657 13px 20px);
  border: 4px solid var(--ink);
  content: "";
  height: 28px;
  left: -13%;
  position: absolute;
  top: 42px;
  width: 32%;
}

.cookerStack {
  background: #394445;
  border: 5px solid var(--ink);
  height: 90px;
  left: 24px;
  position: absolute;
  top: -82px;
  width: 64px;
}

.cookerStack::before,
.cookerStack::after {
  background: var(--ink);
  content: "";
  left: -12px;
  position: absolute;
  width: 80px;
}

.cookerStack::before { height: 14px; top: -8px; }
.cookerStack::after { height: 8px; top: 25px; }

.cookerSmoke {
  height: 42px;
  left: calc(7% + 31px);
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 50px;
  z-index: 3;
}

.cookerSmoke i {
  background: rgba(57, 68, 69, .72);
  border: 2px solid rgba(11, 17, 18, .72);
  border-radius: 50%;
  bottom: 0;
  height: 14px;
  left: 18px;
  opacity: 0;
  position: absolute;
  width: 14px;
  will-change: opacity, transform;
}

.hasBurn .cookerSmoke i {
  animation: cookerSmoke 2.7s infinite ease-out;
}

.hasBurn .cookerSmoke i:nth-child(2) { animation-delay: -.9s; }
.hasBurn .cookerSmoke i:nth-child(3) { animation-delay: -1.8s; }

.cookerGauge {
  align-items: center;
  background: var(--bone);
  border: 3px solid var(--ink);
  color: var(--ink);
  display: flex;
  font-size: 11px;
  font-weight: 700;
  gap: 9px;
  padding: 7px 9px;
  position: absolute;
  right: 18px;
  top: 17px;
}

.cookerGauge i {
  background: var(--rare);
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: block;
  height: 18px;
  position: relative;
  width: 18px;
}

.cookerGauge i::after {
  background: var(--ink);
  content: "";
  height: 2px;
  left: 7px;
  position: absolute;
  top: 7px;
  transform: rotate(-35deg);
  transform-origin: left center;
  width: 7px;
}

.cookerDoor {
  background: #05090a;
  border: 4px solid #4b5657;
  color: var(--rare);
  inset: 74px 23px 80px;
  padding: 24px 18px;
  position: absolute;
  text-align: center;
}

.cookerDoor::before {
  border: 2px dashed rgba(204, 255, 0, .28);
  content: "";
  inset: 9px;
  position: absolute;
}

.cookerDoor small,
.cookerDoor strong,
.cookerDoor span {
  display: block;
  position: relative;
}

.cookerDoor small {
  color: var(--bone);
  font-size: 12px;
  letter-spacing: .12em;
}

.cookerDoor strong,
.cookerSupply strong {
  font-family: var(--display);
  font-weight: 400;
  line-height: .85;
}

.cookerDoor strong {
  font-size: clamp(40px, 4.5vw, 66px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin: 25px 0 7px;
  overflow-wrap: normal;
  white-space: nowrap;
}

.cookerDoor span {
  color: var(--bone);
  font-size: 12px;
  font-weight: 700;
}

.cookerVents {
  bottom: 27px;
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(4, 1fr);
  left: 25px;
  position: absolute;
  right: 25px;
}

.cookerVents i {
  background: #4b5657;
  border: 2px solid var(--ink);
  height: 18px;
}

.cookerMeatman {
  bottom: 18px;
  filter: drop-shadow(9px 12px 0 rgba(11, 17, 18, .3));
  height: auto;
  position: absolute;
  right: 0;
  width: 41%;
  z-index: 4;
}

.cookerTicket {
  background: var(--yellow);
  border: 3px solid var(--ink);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  padding: 9px 12px;
  position: absolute;
  text-align: center;
  z-index: 1;
}

.ticketOne { left: 3%; top: 35px; transform: rotate(-8deg); }
.ticketTwo { left: 24%; top: 18px; transform: rotate(5deg); }

.cookedStamp {
  border: 5px double var(--red-bright);
  color: var(--red-bright);
  font-family: var(--display);
  font-size: clamp(36px, 4vw, 58px);
  line-height: .8;
  opacity: 0;
  padding: 8px 11px;
  position: absolute;
  right: 4%;
  text-shadow: 2px 2px 0 var(--bone);
  top: 5%;
  transform: rotate(-8deg) scale(1.25);
  z-index: 8;
}

.hasBurn .cookedStamp {
  opacity: .88;
  transform: rotate(-8deg) scale(1);
}

.burnDetected .cookedStamp { animation: stampHit .6s cubic-bezier(.2, .8, .2, 1); }

.cookerReadout {
  align-self: stretch;
  background: var(--bone);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  color: var(--ink);
  min-width: 0;
  padding: 28px;
}

.cookerReadoutHeader {
  border-bottom: 3px solid var(--ink);
  font-weight: 700;
  letter-spacing: .1em;
  padding-bottom: 17px;
}

.cookerReadoutHeader > span {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: .03em;
  line-height: .9;
}

.cookerReadoutHeader button {
  background: var(--rare);
  border: 2px solid var(--ink);
  cursor: pointer;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .04em;
  padding: 8px 10px;
}

.cookerReadoutHeader button:disabled {
  cursor: wait;
  opacity: .62;
}

.cookerSupply {
  padding: 30px 0 21px;
}

.cookerSupply small,
.cookerSupply strong,
.cookerSupply > span {
  display: block;
}

.cookerSupply small,
.burnReceiptTop small {
  font-size: 12px;
}

.cookerSupply strong {
  font-size: clamp(56px, 5.2vw, 82px);
  font-variant-numeric: tabular-nums;
  margin: 14px 0 9px;
  overflow-wrap: normal;
  white-space: nowrap;
}

.cookerSupply > span {
  font-size: 12px;
  font-weight: 700;
}

.cookerMeter {
  background: #fff;
  border: 3px solid var(--ink);
  height: 24px;
  overflow: hidden;
}

.cookerMeter i {
  background: repeating-linear-gradient(135deg, var(--red-bright) 0 10px, var(--yellow) 10px 20px);
  display: block;
  height: 100%;
  min-width: 0;
  transition: width .6s ease;
  width: 0;
}

.tokenCooker.snapshotBurn .cookerMeter i {
  min-width: 4px;
  width: 1.4322%;
}

.cookerMetrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cookerMetrics p {
  border-bottom: 2px solid var(--ink);
  margin: 0;
  padding: 21px 0;
}

.cookerMetrics p + p {
  border-left: 2px solid var(--ink);
  padding-left: 20px;
}

.cookerMetrics small,
.cookerMetrics b {
  display: block;
}

.cookerMetrics small { font-size: 12px; margin-bottom: 8px; }
.cookerMetrics b { font-family: var(--display); font-size: 23px; font-weight: 400; }

.cookerCold {
  background: var(--ink);
  color: var(--bone);
  margin-top: 22px;
  padding: 20px;
}

.cookerCold b,
.cookerCold span { display: block; }
.cookerCold b { color: var(--rare); font-family: var(--display); font-size: 30px; font-weight: 400; }
.cookerCold span { font-size: 12px; font-weight: 700; margin-top: 7px; }

.burnReceipt {
  background: #fff;
  border: 3px dashed var(--ink);
  margin-top: 22px;
  padding: 20px;
  position: relative;
}

.burnReceipt::after {
  color: rgba(198, 37, 45, .17);
  content: "COOKED";
  font-family: var(--display);
  font-size: 64px;
  position: absolute;
  right: 12px;
  top: 50px;
  transform: rotate(-9deg);
}

.burnReceiptTop b {
  background: var(--rare);
  border: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .04em;
  padding: 5px 7px;
}

.burnReceipt > strong {
  display: block;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 400;
  margin: 21px 0;
  overflow-wrap: anywhere;
  position: relative;
  z-index: 1;
}

.burnReceipt dl { margin: 0; position: relative; z-index: 1; }
.burnReceipt dl div { display: flex; gap: 12px; justify-content: space-between; padding: 7px 0; }
.burnReceipt dt { font-size: 11px; font-weight: 700; }
.burnReceipt dd { font-size: 12px; font-weight: 700; margin: 0; text-align: right; }
.burnReceipt > a { display: inline-block; font-size: 12px; font-weight: 700; margin-top: 16px; text-decoration: underline; text-underline-offset: 4px; }

.cookerActions {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
}

.cookerActions a,
.cookerActions button {
  align-items: center;
  background: var(--ink);
  border: 3px solid var(--ink);
  color: var(--bone);
  cursor: pointer;
  display: flex;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .04em;
  justify-content: center;
  min-height: 48px;
  padding: 12px;
  text-align: center;
}

.cookerActions button { background: var(--red-bright); }

.cookerActions .cookerLedgerLink { grid-column: 1 / -1; }

.cookerStatus {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  margin: 19px 0 0;
}

.cookerSource {
  color: #5f5a51;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  margin: 8px 0 0;
}

@keyframes cookerPulse {
  70% { box-shadow: 0 0 0 8px rgba(204, 255, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(204, 255, 0, 0); }
}

@keyframes cookerSmoke {
  0% { opacity: 0; transform: translate3d(0, 7px, 0) scale(.55); }
  18% { opacity: .62; }
  62% { opacity: .42; }
  100% { opacity: 0; transform: translate3d(12px, -28px, 0) scale(1.75); }
}

@keyframes stampHit {
  0% { opacity: 0; transform: rotate(-8deg) scale(1.35); }
  65% { opacity: 1; transform: rotate(-8deg) scale(.94); }
  100% { opacity: .88; transform: rotate(-8deg) scale(1); }
}

@media (max-width: 1040px) {
  .tokenCookerIntro,
  .tokenCookerGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tokenCookerIntro { gap: 24px; }
  .tokenCookerIntro > p { max-width: 670px; }
  .cookerStage { min-height: 520px; }
}

@media (max-width: 640px) {
  .tokenCooker::before { inset: 9px; }

  .tokenCookerKicker {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .tokenCookerIntro { margin-top: 33px; }
  .tokenCookerIntro h2 { font-size: clamp(47px, 14.3vw, 67px); }
  .tokenCookerIntro > p { font-size: 14px; }
  .tokenCookerGrid { margin-top: 38px; }

  .cookerStage {
    box-shadow: 6px 6px 0 var(--ink);
    min-height: 390px;
  }

  .cookerMachine {
    bottom: 42px;
    height: 270px;
    left: 4%;
    width: 65%;
  }

  .cookerStack { height: 60px; left: 14px; top: -57px; width: 45px; }
  .cookerStack::before { left: -9px; width: 59px; }
  .cookerStack::after { left: -9px; width: 59px; }
  .cookerSmoke { height: 29px; left: calc(4% + 12px); width: 48px; }
  .cookerSmoke i { height: 11px; left: 18px; width: 11px; }
  .cookerMachine::before { height: 20px; top: 33px; }
  .cookerGauge { padding: 5px; right: 9px; top: 8px; }
  .cookerGauge span { display: none; }
  .cookerGauge i { height: 16px; width: 16px; }
  .cookerGauge i::after { left: 6px; top: 6px; }

  .cookerDoor { inset: 54px 13px 61px; padding: 18px 9px; }
  .cookerDoor small { font-size: 10px; }
  .cookerDoor strong { font-size: clamp(30px, 8.8vw, 42px); margin: 17px 0 5px; }
  .cookerVents { bottom: 18px; gap: 5px; left: 14px; right: 14px; }
  .cookerVents i { height: 13px; }
  .cookerMeatman { right: -2%; width: 44%; }
  .cookerTicket { font-size: 9px; padding: 6px 8px; }
  .ticketOne { top: 21px; }
  .ticketTwo { top: 12px; }
  .cookedStamp { border-width: 4px; font-size: 34px; padding: 7px 9px; right: 3%; top: 4%; }

  .cookerReadout {
    box-shadow: 6px 6px 0 var(--ink);
    padding: 21px 17px;
  }

  .cookerReadoutHeader { align-items: flex-start; gap: 12px; }
  .cookerReadoutHeader > span { font-size: 21px; }
  .cookerReadoutHeader button { font-size: 15px; }
  .cookerSupply strong { font-size: clamp(40px, 12vw, 56px); }
  .cookerMetrics { grid-template-columns: 1fr; }
  .cookerMetrics p + p { border-left: 0; padding-left: 0; }
  .cookerActions { grid-template-columns: 1fr; }
  .burnReceipt dl div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .burnReceipt dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .tokenCooker[data-cooker-state="ready"] .cookerLive i,
  .hasBurn .cookerSmoke i,
  .burnDetected .cookedStamp {
    animation: none;
  }

  .cookerMeter i { transition: none; }
}
