/* The metal prep counter and its interactive food illustrations. */
.station {
  --station-ink: #fff0d4;
  --station-gold: #f6ac63;
  position: relative;
  isolation: isolate;
  min-width: 0;
  color: var(--station-ink);
  padding: clamp(12px, 2.8vw, 21px);
  border: 1px solid #76807a;
  border-radius: 13px 13px 21px 21px;
  background:
    repeating-linear-gradient(0deg, #ffffff04 0 1px, transparent 1px 4px),
    linear-gradient(120deg, #364c49, #243631 45%, #44534b 75%, #2a3a35);
  box-shadow: inset 0 1px 0 #fff4ce47, inset 0 -7px 0 #162420, 0 12px 26px #020d0b70;
}

.station-head {
  min-height: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #dfe4ce;
  font-size: 13px;
  font-weight: 700;
}

.station-head em {
  color: var(--station-gold);
  font-style: normal;
}

.cooktop {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  min-height: clamp(140px, 26vh, 230px);
  place-items: center;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  border: 1px solid #87908a;
  border-top-color: #5f706b;
  border-radius: 14px 14px 18px 18px;
  color: inherit;
  background:
    radial-gradient(ellipse at 54% 76%, #8e593a4f, transparent 54%),
    radial-gradient(ellipse at 45% 50%, #56615c 1%, #282e2c 46%, #141c1b 96%);
  box-shadow: inset 0 0 0 4px #18221f, inset 0 0 0 5px #68746e80,
    inset 0 15px 22px #080e0d97, 0 6px 0 #1d2b27, 0 9px 12px #101c19b3;
}

.cooktop::before {
  position: absolute;
  z-index: -1;
  inset: 7px;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(-8deg, #c1d0c416 0 1px, transparent 1px 7px),
    radial-gradient(ellipse at 30% 20%, #e0e8d020, transparent 47%),
    radial-gradient(ellipse at 67% 85%, #b15b2d21, transparent 56%);
}

.cooktop::after {
  position: absolute;
  z-index: -1;
  width: 68%;
  height: 14px;
  bottom: 7px;
  left: 16%;
  border-radius: 100%;
  pointer-events: none;
  content: "";
  opacity: 0;
  background: #f78642;
  filter: blur(10px);
  transition: opacity 220ms ease;
}

.cooktop.is-hot::after,
.cooktop:has(.food[data-stage="egg"])::after,
.cooktop:has(.food[data-stage="flipped"])::after {
  opacity: .6;
}

.gesture-hint {
  position: absolute;
  inset: auto 10px 13px;
  justify-self: center;
  max-width: calc(100% - 20px);
  border: 1px solid #d3ab7161;
  border-radius: 9px;
  padding: 5px 11px;
  color: #fff1d3;
  background: #121c19d9;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

.food {
  --sheet: #ddab5b;
  --sheet-shadow: #764823;
  --sheet-detail: #fff0b16b;
  --sheet-mark: #9250236b;
  display: block;
  position: relative;
  width: 59%;
  height: clamp(69px, 13vh, 125px);
  border: 1px solid #ffe1a68a;
  border-radius: 18% 15% 13% 16% / 20% 16% 15% 13%;
  margin-top: -17px;
  background:
    repeating-linear-gradient(5deg, var(--sheet-detail) 0 1px, var(--sheet-mark) 1px 2px, transparent 2px 4px),
    radial-gradient(ellipse at 48% 20%, #fff0ad, transparent 72%),
    linear-gradient(165deg, var(--sheet), var(--sheet-shadow));
  box-shadow: inset 0 0 9px #914a2759, 0 5px 1px #522d19, 0 7px 11px #0c100e;
  transform: rotate(-7deg) skewX(-9deg);
  transition: width 140ms ease, height 140ms ease, border-radius 140ms ease,
    transform 180ms cubic-bezier(.28, 1.24, .54, 1);
  pointer-events: none;
}

.food[data-stage="empty"],
.food:empty:not([data-stage]) {
  visibility: hidden;
}

.food[data-stage="oiled"] {
  width: 62%;
  height: clamp(42px, 9vh, 76px);
  border: 0;
  border-radius: 47% 62% 48% 62%;
  transform: rotate(-7deg);
  background:
    linear-gradient(165deg, transparent 19%, #fff0ae61 28%, transparent 38%) 43% 44% / 60% 26% no-repeat,
    radial-gradient(ellipse at 58% 53%, #deaf4a68, #a47f4f35 61%, transparent 68%);
  box-shadow: none;
}

.food[data-stage="egg"]::before {
  position: absolute;
  inset: 12% 16%;
  border-radius: 61% 43% 47% 55%;
  content: "";
  background:
    radial-gradient(ellipse at 52% 43%, #ffc956 2% 20%, transparent 22%),
    radial-gradient(ellipse at 38% 50%, #fff2c9 0 51%, #e5aa5e 62%, transparent 70%),
    radial-gradient(ellipse at 62% 59%, #f7da9e 0 51%, #ba7641 60%, transparent 68%);
  filter: drop-shadow(0 2px 1px #75401c7a);
}

.food[data-stage="flipped"],
.food[data-stage="rolled"],
.food[data-stage="cut"] {
  --sheet: #e3a249;
  --sheet-shadow: #7e4420;
  --sheet-detail: #f6bf6764;
  --sheet-mark: #8b52217d;
  transform: rotate(5deg) skewX(-9deg);
}

.food[data-stage="rolled"]::before,
.food[data-stage="cut"]::before,
.food[data-seasoned="true"]::before {
  position: absolute;
  content: "";
  inset: 9% 13%;
  border-radius: 29% 10% 23% 15%;
  background: repeating-linear-gradient(-17deg, #661e0c00 0 8px, #a6481dbd 9px 12px, #5e2115bd 12px 14px, transparent 15px 18px);
  mix-blend-mode: multiply;
}

.food[data-stage="rolled"] {
  width: 62%;
  height: clamp(35px, 7vh, 53px);
  border-radius: 36% 21% 22% 30% / 44% 68% 57% 42%;
  background:
    radial-gradient(ellipse 13% 70% at 93% 53%, #aa4933 0 17%, #ffcb72 23% 39%, #967030 42% 46%, #ecd598 50% 57%, transparent 61%),
    repeating-linear-gradient(8deg, #8a4a2259 0 1px, transparent 1px 4px),
    linear-gradient(171deg, #fff1ac, #da913e 55%, #a35622);
  transform: rotate(10deg) skewX(5deg);
}

.food[data-stage="cut"] {
  width: 71%;
  height: clamp(40px, 8vh, 68px);
  border: 0;
  border-radius: 35% 14% 30% 25%;
  background:
    repeating-linear-gradient(96deg, transparent 0 14%, #34191aee 15%, #080f0fef 16% 17%, transparent 18% 20%),
    repeating-linear-gradient(8deg, #a957325e 0 2px, transparent 2px 4px),
    linear-gradient(175deg, #ffe6a1 7%, #edb452 25%, #b6602a 35%, #e9a35b 54%, #985622 87%);
  box-shadow: inset 0 0 5px #bf7433, 1px 5px 1px #532f1d, 1px 10px 13px #0a110d;
  transform: rotate(-8deg) skewX(3deg);
}

.food[data-garnish="true"]::after {
  position: absolute;
  inset: 4% 10%;
  content: "";
  background:
    radial-gradient(circle at 12% 28%, #7fa341 0 2px, transparent 3px),
    radial-gradient(circle at 16% 51%, #ba79a3 0 3px, transparent 4px),
    radial-gradient(circle at 27% 31%, #3f632a 0 4px, transparent 5px),
    radial-gradient(circle at 33% 50%, #a85187 0 3px, transparent 4px),
    radial-gradient(circle at 39% 62%, #cabc79 0 2px, transparent 3px),
    radial-gradient(circle at 46% 23%, #4d6f2e 0 3px, transparent 4px),
    radial-gradient(circle at 54% 69%, #86a84e 0 2px, transparent 3px),
    radial-gradient(circle at 61% 38%, #84416a 0 3px, transparent 4px),
    radial-gradient(circle at 73% 59%, #557c34 0 4px, transparent 5px),
    radial-gradient(circle at 89% 33%, #e2d29e 0 2px, transparent 3px);
}

.steam {
  position: absolute;
  inset: 11% 20% 32%;
  z-index: 1;
  background:
    radial-gradient(ellipse 9% 54% at 22% 75%, #fffce39c, transparent 90%),
    radial-gradient(ellipse 12% 41% at 55% 89%, #fffad98a, transparent 90%),
    radial-gradient(ellipse 10% 40% at 78% 80%, #fffce35c, transparent 90%);
  filter: blur(8px);
  pointer-events: none;
  opacity: 0;
}

.cooktop.is-hot .steam,
.cooktop:has(.food[data-stage="egg"]) .steam,
.cooktop:has(.food[data-stage="flipped"]) .steam {
  animation: station-steam 2.8s ease-in-out infinite;
}

@keyframes station-steam {
  0% { opacity: .02; transform: translateY(19px) skewX(-12deg) scaleX(.77); }
  47% { opacity: .76; }
  100% { opacity: 0; transform: translateY(-26px) skewX(12deg) scaleX(1.22); }
}

.heat-meter {
  position: relative;
  height: 9px;
  overflow: hidden;
  margin: 11px 2px 0;
  border: 1px solid #aa9d7e69;
  border-radius: 999px;
  background: linear-gradient(90deg, #6c742e 0 42%, #8cbc65 42% 70%, #cb653d 70% 100%);
  box-shadow: inset 0 2px 2px #020b0966;
}

.heat-meter > i, .heat-meter > .pin {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--heat, 0%);
  width: 3px;
  border-radius: 100px;
  background: #fff7e1;
  box-shadow: 0 0 5px #000;
}

.ingredients {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(5px, 1.3vw, 10px);
  margin: 12px 0 0;
}

.ingredient {
  --ingredient-light: #d1ae7d;
  --ingredient-dark: #996e42;
  --ingredient-speck: #ffffe08c;
  --ingredient-field:
    radial-gradient(circle at 25% 40%, var(--ingredient-speck) 0 1.5px, transparent 2px) center / 9px 7px,
    radial-gradient(circle at 70% 80%, var(--ingredient-speck) 0 1px, transparent 1.8px) center / 6px 10px,
    linear-gradient(140deg, var(--ingredient-light), var(--ingredient-dark));
  position: relative;
  display: grid;
  min-width: 0;
  gap: 3px;
  grid-template-rows: auto auto;
  justify-items: center;
  padding: 5px 4px 6px;
  border: 1px solid #8d977a7d;
  border-radius: 10px 10px 9px 9px;
  color: #fff6dd;
  font: inherit;
  font-size: clamp(12px, 3vw, 14px);
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  background: linear-gradient(150deg, #566862, #303b34 81%);
  box-shadow: inset 0 1px 0 #dbcfa343, 0 3px 0 #192826, 0 4px 7px #0b151480;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 150ms ease;
}

.ingredient-art {
  display: block;
  width: 100%;
  height: clamp(29px, 6vh, 42px);
  border: 1px solid #9e966683;
  border-radius: 6px 6px 9px 9px;
  background: var(--ingredient-field);
  box-shadow: inset 0 0 0 2px #1b251d90, inset 0 3px 7px #0a0f0b87;
  pointer-events: none;
}

.ingredient[data-kind="noodle"] {
  --ingredient-field: repeating-linear-gradient(8deg, #f4d383 0 1px, #b38245 1px 2px, #e5b86f 2px 4px);
}

.ingredient[data-kind="oil"] {
  --ingredient-field:
    radial-gradient(ellipse 16% 67% at 50% 57%, #ffe7a1 0 19%, #e4a43e 51%, #9d651f 65%, transparent 71%),
    radial-gradient(ellipse 8% 26% at 51% 20%, #ffffcc 0 26%, #996e31 76%, transparent 85%),
    linear-gradient(145deg, #555d4b, #25332c);
}

.ingredient[data-kind="egg"] {
  --ingredient-field:
    radial-gradient(ellipse 13% 38% at 25% 57%, #fff2d0 0 54%, #b98c56 77%, transparent 82%),
    radial-gradient(ellipse 14% 41% at 49% 49%, #f6ddb0 0 58%, #ac7b50 75%, transparent 81%),
    radial-gradient(ellipse 15% 45% at 73% 55%, #ffe4b5 0 53%, #c49565 71%, transparent 77%),
    repeating-linear-gradient(96deg, #453a2e 0 5px, #695640 6px 10px);
}

.ingredient[data-kind="chili"] {
  --ingredient-light: #c34e2d;
  --ingredient-dark: #6f2318;
  --ingredient-speck: #ef9b5277;
}

.ingredient[data-kind="tomato"] {
  --ingredient-light: #ee6c4a;
  --ingredient-dark: #8c281e;
  --ingredient-speck: #ffb97d91;
}

.ingredient[data-kind="sweet"] {
  --ingredient-field:
    radial-gradient(ellipse at 36% 24%, #d080515f, transparent 48%),
    repeating-linear-gradient(-9deg, transparent 0 5px, #62352a99 6px 7px, transparent 8px 10px),
    linear-gradient(135deg, #a25543, #3b2020);
}

.ingredient[data-kind="onion"] {
  --ingredient-light: #aa7699;
  --ingredient-dark: #593c52;
  --ingredient-speck: #f9d7ea;
}

.ingredient[data-kind="cilantro"] {
  --ingredient-light: #628b43;
  --ingredient-dark: #253c24;
  --ingredient-speck: #a9ce72;
}

.ingredient[data-kind="sausage"] {
  --ingredient-field:
    repeating-linear-gradient(24deg, #704036 0 4px, #d9987f 4px 7px, #b96754 7px 12px, #713c31 12px 15px),
    linear-gradient(90deg, #684238, #aa6554);
}

.ingredient[data-kind="chicken"] {
  --ingredient-field:
    repeating-linear-gradient(23deg, #5e442a 0 5px, #c88e54 5px 8px, #e2b273 8px 13px, #8f6034 13px 15px),
    linear-gradient(90deg, #7c542e, #ae7647);
}

.ingredient:hover:not(:disabled), .ingredient:focus-visible {
  border-color: #ffcb80;
  transform: translateY(-2px);
}

.ingredient:active:not(:disabled) {
  transform: translateY(2px);
}

.ingredient.is-needed:not(:disabled) {
  border-color: #e7bc87;
}

.ingredient[aria-pressed="true"], .ingredient.is-added {
  border-color: #f5b86e;
  color: #fff2c8;
  box-shadow: inset 0 0 0 1px #ffb973, 0 2px 0 #493829, 0 0 13px #f8a45438;
}

.ingredient.is-added::after {
  position: absolute;
  right: 2px;
  top: 2px;
  display: grid;
  width: 15px;
  height: 15px;
  place-content: center;
  border-radius: 50%;
  color: #162e20;
  background: #d2e5a8;
  content: "✓";
  font-size: 11px;
}

.ingredient:disabled {
  cursor: default;
  filter: saturate(.67);
}

.ingredient.is-locked .ingredient-art {
  filter: grayscale(.9) brightness(.62);
}

.station-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 7px;
  margin-top: 13px;
}

.station-actions button {
  min-height: 39px;
  flex: 1 1 auto;
}

.station :where(button):focus-visible {
  outline: 2px solid #ffd195;
  outline-offset: 2px;
}

@media (max-width: 360px) {
  .station { padding: 9px; }
  .ingredients { gap: 4px; }
  .ingredient { padding-inline: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .station *, .station *::before, .station *::after {
    animation: none !important;
    transition: none !important;
  }
}
