.cafe-game {
  background: #302a32;
  color: #fff3dd;
  border: 1px solid #867065;
  border-radius: 14px;
  overflow: hidden;
}
.cafe-banner {
  min-height: 108px;
  gap: 12px;
  padding: 17px 22px;
  display: flex;
  align-items: end;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #623c38;
}
.cafe-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #38252df2, #39252db0 58%, #30202b10),
    var(--panorama, url('./assets/world-panoramas.webp')) center var(--scene-y, 33.3333%) / auto var(--sheet-height, 400%);
  background-size:
    100% 100%,
    auto var(--sheet-height, 400%);
}
.cafe-banner .cafe-avatar {
  width: clamp(45px, 8vw, 86px);
  height: auto;
  aspect-ratio: 4 / 3;
  flex: none;
  align-self: center;
  outline: 2px solid #f4cb85;
  border-radius: 2px;
}
.cafe-banner::after {
  content: '';
  margin-left: auto;
  align-self: flex-end;
  width: min(22%, 135px);
  aspect-ratio: 3 / 2;
  flex: none;
  background: url('./games/block-maze/assets/maze-landmarks.webp') var(--prop, 33.3333% 0) / 400% 500%;
  image-rendering: pixelated;
}
.cafe-game h2,
.cafe-game h3,
.cafe-game p {
  margin: 0;
}
.cafe-banner[data-scene='waterpark'] { --scene-y: 66.6667%; --prop: 66.6667% 0; }
.cafe-banner[data-scene='store'] { --scene-y: 100%; --prop: 33.3333% 75%; }
.cafe-banner[data-scene='castle'], .cafe-banner[data-scene='end'] {
  --panorama: url('./assets/realm-panoramas.webp');
  --sheet-height: 300%;
}
.cafe-banner[data-scene='castle'] { --scene-y: 50%; --prop: 33.3333% 100%; }
.cafe-banner[data-scene='end'] { --scene-y: 100%; --prop: 66.6667% 25%; }
.cafe-banner small,
.cafe-hud {
  color: #ffdc9d;
  font-weight: 700;
}
.cafe-game h2 {
  font-size: clamp(18px, 3.2vw, 30px);
}
.cafe-chef {
  font-size: 0.87rem;
}
.cafe-body {
  padding: clamp(12px, 2vw, 24px);
}
.cafe-note {
  min-height: 2.2em;
  padding: 0.45rem 0;
  color: #f5d5b2;
  line-height: 1.35;
}
.cafe-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.cafe-game h3 {
  font-size: 1rem;
  margin-bottom: 7px;
}
.cafe-stations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.cafe-stove,
.cafe-ticket,
.cafe-next {
  border: 1px solid #9a7967;
  border-radius: 9px;
  background: #493b3d;
  color: #fff5e2;
  padding: 7px;
}
.cafe-stove {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.cafe-stove canvas {
  width: min(100%, 98px);
  height: auto;
  image-rendering: pixelated;
}
.cafe-stove progress,
.cafe-ticket progress {
  accent-color: #edb16c;
  width: 100%;
  height: 8px;
}
.cafe-stove span {
  font-size: 0.8rem;
}
.cafe-stove[data-state='ready'],
.cafe-ticket.can-serve {
  background: #3c594b;
  border-color: #a6dd96;
}
.cafe-stove[data-state='spoiled'] {
  background: #674148;
}
.cafe-tray,
.cafe-orders {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cafe-tray span {
  background: #221f2b;
  border-radius: 5px;
  border-left: 3px solid var(--dish);
  padding: 5px 8px;
  font-size: 0.8rem;
}
.cafe-orders {
  flex-direction: column;
}
.cafe-ticket {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 8px;
}
.cafe-guest {
  width: 43px;
  height: 43px;
  image-rendering: pixelated;
  flex: none;
}
.cafe-ticket > span:last-child {
  display: grid;
  gap: 3px;
  width: 100%;
}
.cafe-next {
  margin-top: 12px;
  background: #ffd394;
  color: #302138;
  min-height: 43px;
  font-weight: 750;
  padding: 8px 16px;
}
@media (max-width: 620px) {
  .cafe-main {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cafe-orders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
  .cafe-ticket {
    font-size: 0.86rem;
  }
  .cafe-guest {
    width: 30px;
    height: 30px;
  }
  .cafe-stove strong {
    font-size: 0.82rem;
  }
  .cafe-note {
    min-height: 2.5em;
  }
  .cafe-banner {
    min-height: 78px;
  }
}

/* Phone held sideways: a slim banner, the shift button beside the score and
   smaller stations leave the kitchen, the tray and the orders on one screen. */
@media (orientation: landscape) and (max-height: 540px) {
  .cafe-banner { min-height: 0; padding: 4px 14px; align-items: center; }
  .cafe-banner .cafe-avatar { width: 36px; }
  .cafe-banner h2 { font-size: 0.95rem; }
  .cafe-banner small, .cafe-banner .cafe-chef { display: none; }
  .cafe-banner::after { width: 52px; }
  .cafe-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    padding-block: 4px;
  }
  .cafe-body > * { grid-column: 1 / -1; }
  .cafe-body .cafe-hud { grid-column: 1; grid-row: 1; }
  .cafe-body .cafe-note { grid-column: 1; grid-row: 2; font-size: 0.76rem; margin: 0 0 4px; }
  .cafe-body .cafe-next { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; padding-block: 6px; }
  .cafe-main { gap: 10px; }
  .cafe-game h3 { font-size: 0.85rem; margin-bottom: 3px; }
  .cafe-stations { margin-bottom: 4px; }
  .cafe-stove { padding: 4px; gap: 2px; }
  .cafe-stove canvas { width: min(100%, 52px); }
  .cafe-ticket { padding: 4px 7px; }
}
