@font-face {
  font-family: BoldPixels;
  src: url('./assets/boldpixels.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: BoldPixels, ui-monospace, monospace;
  background: #161321;
  color: #f6dfba;
  --gold: #ffc878;
  --peach: #f5a784;
  --violet: #b7a4be;
  --dark: #201929;
  --shadow: #0e101b;
  --pixel-corners: polygon(0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 280px;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 52% 28%, #392739 0%, #201a2e 49%, #131321 81%),
    #161321;
}
button, input, kbd { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: #a999ad; text-decoration: none; }
a:hover { color: var(--gold); }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px dashed var(--gold);
  outline-offset: 5px;
}

.cabinet {
  width: min(1400px, calc(100% - 52px), calc((100svh - 118px) * 16 / 9));
  min-width: min(440px, calc(100vw - 28px));
  margin: 16px auto;
}
.cabinet-top, .cabinet-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 45px;
  gap: 12px;
}
.cabinet-top {
  text-transform: uppercase;
  letter-spacing: .095em;
  font-size: clamp(14px, 1.4vw, 21px);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #f2d3a7;
}
.brand-flame {
  width: 13px;
  height: 18px;
  background: linear-gradient(#ffe5a0 45%, #e88b6b 46% 68%, #ffe1a1 69%);
  clip-path: polygon(38% 0, 62% 0, 62% 17%, 77% 17%, 77% 29%, 93% 29%, 93% 58%, 76% 58%, 76% 69%, 59% 69%, 59% 82%, 84% 82%, 84% 100%, 15% 100%, 15% 82%, 41% 82%, 41% 69%, 22% 69%, 22% 58%, 6% 58%, 6% 40%, 21% 40%, 21% 24%, 38% 24%);
}
.settings-link {
  padding: 5px 10px;
  border: 1px solid #564359;
  border-bottom: 3px solid #3f3048;
  background: #221b2c;
  font-size: .82em;
  text-transform: uppercase;
}
.settings-link span { padding-left: 4px; color: #f6b779; }
.settings-link:hover { border-color: #ab7b76; background: #362639; }
.frame {
  padding: 5px;
  background: linear-gradient(145deg, #9a6a68, #4c3b54 37%, #43354e 75%, #885765);
  border: 1px solid #211724;
  box-shadow: 0 0 0 1px #3d3044, 0 8px 0 -2px #100f1d, 0 26px 70px #0e0e1c8f;
}
.stage {
  overflow: hidden;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  aspect-ratio: 16 / 9;
  background: #302337;
  user-select: none;
}
#view {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.stage-texture {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, #18122312 0 1px, transparent 1px 4px);
  box-shadow: inset 0 0 0 1px #201725, inset 0 0 2.5cqw #1b152b43;
}
.title-screen {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  inset: 0;
  background: linear-gradient(90deg, #211729 0%, #211729f2 21%, #211729cd 38%, #22182a58 55%, #251a2c05 74%);
}
.title-copy {
  padding-left: 6.45cqw;
  position: relative;
  z-index: 1;
  padding-bottom: 3cqw;
}
.title-kicker {
  display: flex;
  align-items: center;
  gap: .8cqw;
  color: #f3b184;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 1.7cqw;
  line-height: 1.1;
}
.title-kicker i {
  width: .75cqw;
  height: .75cqw;
  background: #ffb87a;
  transform: rotate(45deg);
  box-shadow: 0 0 1.4cqw #fcb0798f;
}
h1, h2, p { margin: 0; }
h1 {
  margin: 1.4cqw 0 1.7cqw;
  font-size: 8.4cqw;
  line-height: .78;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -.015em;
  color: #f9dfbd;
  text-shadow: .3cqw .31cqw #724357, .52cqw .57cqw #171123;
}
h1 em { font-style: normal; color: #ffc078; }
.title-copy p {
  margin: 0 0 2.3cqw;
  color: #e3bead;
  font-size: 2.02cqw;
  line-height: 1.23;
  letter-spacing: .023em;
}
.action {
  position: relative;
  min-width: 17.4cqw;
  border: 0;
  padding: .9cqw 1.5cqw 1.08cqw;
  background-color: #f4b572;
  color: #2c1b30;
  box-shadow: inset 0 2px #ffe0a0, inset 0 -4px #bb725d, inset 0 -5px #ed9e71;
  text-transform: uppercase;
  font-size: 1.92cqw;
  letter-spacing: .06em;
  clip-path: var(--pixel-corners);
}
.action span { margin-left: .6cqw; }
.action:hover, .action:focus-visible {
  background-color: #ffcc89;
  color: #331b2e;
}
.action:active { transform: translateY(2px); box-shadow: inset 0 2px #cf9070; }
.title-inventory {
  position: absolute;
  bottom: 5.5cqw;
  left: 6.45cqw;
  display: flex;
  gap: .65cqw;
}
.title-inventory span {
  height: 1.05cqw;
  width: .6cqw;
  margin-top: .35cqw;
  background: var(--c);
  box-shadow: inset -.17cqw 0 #34204461;
  position: relative;
}
.title-inventory span::after {
  width: .24cqw;
  height: .4cqw;
  background-color: #fce2ad;
  position: absolute;
  content: '';
  bottom: calc(100% + .13cqw);
  left: calc(50% - .11cqw);
}
.cabinet-bottom {
  font-size: clamp(13px, 1.13vw, 17px);
  color: #ccbac8;
  padding-top: 7px;
}
.controls {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  align-items: center;
  list-style: none;
}
kbd {
  display: inline-block;
  color: #f6d6a9;
  background: #322739;
  border: 1px solid #59445b;
  box-shadow: 0 2px 0 #120f1d;
  padding: 0 4px 1px;
  margin-right: 2px;
}
.play-hud { z-index: 2; position: absolute; inset: 0; pointer-events: none; }
.hud-top { position: absolute; inset: 1.6cqw 1.75cqw auto; display: flex; align-items: flex-start; justify-content: space-between; }
.area {
  text-transform: uppercase;
  font-size: 1.65cqw;
  color: #ffdea4;
  padding: .33cqw .75cqw .45cqw;
  background-color: #21192ad9;
  border-left: .22cqw solid #ad776b;
  text-shadow: 1px 1px #24182b;
}
.toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: .55cqw 1.35cqw .62cqw;
  background-color: #211828e8;
  border-top: 2px solid var(--toast, #ffe2a3);
  min-width: 22cqw;
  box-shadow: 0 .24cqw #110e1a80;
}
.toast strong {
  display: block;
  font-size: 2.18cqw;
  color: var(--toast, #ffe2a3);
  font-weight: 400;
}
.toast small { display: block; font-size: 1.42cqw; color: #e8c7b1; }
.danger {
  margin-left: auto;
  color: #ffd3c2;
  background: #542a45ed;
  border: 1px solid #be657b;
  box-shadow: 0 .25cqw #251627;
  font-size: 1.55cqw;
  display: flex;
  align-items: center;
  gap: .7cqw;
  text-transform: uppercase;
  padding: .44cqw .78cqw;
}
.danger-arrow {
  width: 1.27cqw;
  height: 1.56cqw;
  clip-path: polygon(40% 0, 60% 0, 60% 15%, 80% 15%, 80% 33%, 100% 33%, 100% 50%, 65% 50%, 65% 100%, 35% 100%, 35% 50%, 0 50%, 0 33%, 20% 33%, 20% 15%, 40% 15%);
  background: #fc9f99;
  transform: rotate(var(--bearing, 180deg));
}
.crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.2cqw;
  height: 1.2cqw;
  transform: translate(-50%, -50%);
  color: #ffeac2bb;
}
.crosshair::before, .crosshair::after, .crosshair i {
  position: absolute;
  inset: 44% 0;
  content: '';
  background: linear-gradient(90deg, currentColor 25%, transparent 25% 75%, currentColor 75%);
}
.crosshair::after { transform: rotate(90deg); }
.crosshair i { inset: 44%; background: currentColor; }
.interaction {
  position: absolute;
  left: 50%;
  bottom: 13.15cqw;
  transform: translateX(-50%);
  background: #211929ef;
  color: #fbd59d;
  font-size: 2cqw;
  line-height: 1;
  padding: .5cqw .83cqw;
  text-transform: uppercase;
  border-top: 1px solid #98586c;
  border-bottom: 2px solid #a87466;
  box-shadow: 0 .25cqw #0b111b99;
  white-space: nowrap;
}
.interaction kbd { margin-right: .55cqw; padding: .1cqw .46cqw; color: #211829; background: #f2b981; }
.status-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11.1cqw minmax(0, 1fr);
  align-items: center;
  gap: 2cqw;
  height: 9.2cqw;
  padding: 0 3cqw;
  background: linear-gradient(0deg, #21192b 0%, #2b2033 85%, #382638 86%);
  border-top: .25cqw solid #ac7868;
  box-shadow: 0 -.28cqw #24192d, inset 0 -.26cqw #171221;
}
.vitals, .inventory { justify-self: stretch; max-width: 28cqw; width: 100%; }
.inventory { justify-self: end; }
.status-label {
  display: flex;
  gap: 1cqw;
  justify-content: space-between;
  text-transform: uppercase;
  color: #dfb8a8;
  font-size: 1.62cqw;
  margin-bottom: .45cqw;
}
.status-label strong { color: #ffe1b2; font-weight: 400; }
.health-meter {
  height: 1.62cqw;
  max-height: 23px;
  background: #21172b;
  border: .13cqw solid #624454;
  padding: .2cqw;
  box-shadow: inset 0 .16cqw #171124;
}
.health-meter span {
  display: block;
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(90deg, #d46e7d 0 calc(2cqw - 1px), #76475b calc(2cqw - 1px) 2cqw);
  box-shadow: inset 0 .15cqw #f7a094;
  transition: width .14s linear;
}
.chef {
  position: relative;
  margin-top: -2cqw;
  height: 9.8cqw;
  background-color: #291d30;
  border: .21cqw solid #a67167;
  border-bottom-color: #674659;
  box-shadow: 0 .24cqw #160f1b;
}
.chef canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  image-rendering: pixelated;
}
.combo {
  position: absolute;
  bottom: -.02cqw;
  left: -1px;
  right: -1px;
  display: grid;
  gap: .32cqw;
  grid-template-columns: repeat(3, 1fr);
  padding: .32cqw;
  background-color: #221929;
}
.combo i { height: .49cqw; background-color: #51384d; }
.combo i.filled { background: #ffc982; box-shadow: inset 0 .12cqw #ffe4a0, 0 0 .4cqw #ebac7993; }
.candle-slots { display: grid; grid-template-columns: repeat(8, 1fr); gap: .4cqw; }
.candle-slot {
  display: grid;
  position: relative;
  aspect-ratio: 1.4;
  place-items: center;
  color: var(--c);
  border: 1px solid #553c52;
  background-color: #201829;
}
.candle-slot canvas { width: 55%; aspect-ratio: 1; image-rendering: pixelated; opacity: .35; }
.candle-slot[data-status='1'] { border-color: var(--c); }
.candle-slot[data-status='1'] svg { opacity: .9; }
.candle-slot[data-status='2'] { background-color: color-mix(in srgb, var(--c) 26%, #211827); border-color: var(--c); }
.candle-slot[data-status='2'] svg { opacity: 1; filter: drop-shadow(0 0 .32cqw var(--c)); }
.candle-slot[data-status='2']::after {
  position: absolute;
  content: '';
  width: .22cqw;
  height: .33cqw;
  background: #fff3ba;
  left: calc(50% - .11cqw);
  top: -.43cqw;
  box-shadow: 0 0 .41cqw var(--c);
}
.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #1b1426bd;
  display: grid;
  place-items: center;
  text-align: center;
}
.dialog {
  width: 32cqw;
  min-width: 220px;
  padding: 1.9cqw 2.5cqw;
  border: .2cqw solid #a47569;
  background: #2c2134;
  box-shadow: 0 .6cqw #140f1c, inset 0 0 0 .35cqw #48334a;
}
.dialog h2, .result h2 {
  font-size: 5.6cqw;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  color: #ffcc8d;
  text-shadow: .28cqw .28cqw #814b61;
  margin-bottom: 1.3cqw;
}
.range-label {
  display: grid;
  grid-template-columns: 1fr auto;
  text-align: left;
  gap: .4cqw;
  font-size: 1.82cqw;
  color: #e5c2ad;
  margin-bottom: 1.2cqw;
}
.range-label input {
  appearance: none;
  grid-column: span 2;
  width: 100%;
  margin: 0;
  height: max(10px, 1.15cqw);
  background-color: #211727;
  box-shadow: inset 0 0 0 1px #6f4b5c;
  cursor: pointer;
}
.range-label input::-webkit-slider-thumb {
  appearance: none;
  width: max(12px, 1.35cqw);
  height: max(12px, 1.35cqw);
  background: #f6ba80;
  border: 2px solid #c28373;
  border-top-color: #ffe1a8;
}
.range-label input::-moz-range-thumb {
  width: max(9px, 1.05cqw);
  height: max(9px, 1.05cqw);
  border-radius: 0;
  background: #f6ba80;
  border: 2px solid #c28373;
  border-top-color: #ffe1a8;
}
.range-label output { color: var(--gold); }
.dialog .action { margin-top: .9cqw; }
.text-button { display: block; background: none; border: 0; margin: .6cqw auto 0; padding: .3cqw 1cqw; font-size: 1.62cqw; color: #d9b4ad; }
.text-button:hover { color: var(--gold); }
.result { background-color: #21172d70; padding-top: 2.6cqw; }
.result h2 { font-size: 9cqw; margin-bottom: .38cqw; }
.result p { color: #f3d8b1; font-size: 3cqw; margin: 0 0 2.2cqw; letter-spacing: .09em; }
.result-ornament { color: #ffad76; font-size: 2.7cqw; letter-spacing: .2em; margin-bottom: .9cqw; }
.result-ornament span { color: #ffde9d; }
.cinematic { position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 3.2cqw #191523, inset 0 -3.2cqw #191523; }

@media (max-width: 740px) {
  .cabinet { width: calc(100% - 28px); }
  .cabinet-bottom { align-items: flex-start; }
  .cabinet-bottom a { text-align: right; min-width: 60px; }
  .controls { gap: 5px 8px; }
  .dialog h2 { font-size: max(22px, 5.6cqw); }
  .range-label, .dialog .action, .text-button { font-size: max(13px, 1.82cqw); }
}
