/* Generated artwork supplies the bodies and window identities. All cells,
   controls, text, values and transactions remain the real component DOM. */
.kitchen-storage[data-container-kind="fridge"],
.zfui-container[data-container-kind="fridge"] {
  --storage-frame: url('../art/ui/storage/fridge-frame-v1.png');
  --storage-icon: url('../art/ui/storage/fridge-icon-v1.png');
  --storage-slices: 12% 23% 16% 23%;
  --storage-border: 24px 34px 34px;
  --storage-side: 34px;
  --storage-inside: #dcebe5;
}
.kitchen-storage[data-container-kind="cupboard"],
.zfui-container[data-container-kind="cupboard"] {
  --storage-frame: url('../art/ui/storage/cupboard-frame-v1.png');
  --storage-icon: url('../art/ui/storage/cupboard-icon-v1.png');
  --storage-slices: 22% 19% 22% 19%;
  --storage-border: 34px 32px 36px;
  --storage-side: 32px;
  --storage-inside: #ead8af;
}
.kitchen-storage[data-container-id="legendary-fridge"],
.zfui-container[data-container-id="legendary-fridge"] {
  --storage-frame: url('../art/ui/storage/legendary-fridge-frame-v1.png');
  --storage-icon: url('../art/ui/storage/legendary-fridge-icon-v1.png');
  --storage-slices: 24% 19% 21% 19%;
  --storage-border: 38px 32px 34px;
  --storage-side: 32px;
  --storage-inside: #f2ddb0;
}
body .kitchen-storage .ks-window {
  width: min(520px, 100%);
  padding: 16px 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  scrollbar-color: #80956b #153d39;
}
body .kitchen-storage .ks-window::after,
.zfui .zfui-container::before,
.zfui .zfui-container::after { display: none; }
body .kitchen-storage .ks-window > header {
  padding: 10px 12px;
  border: 2px solid #153d39;
  border-radius: 12px;
  background: #fff4d5;
  box-shadow: 0 3px 0 #08282d73;
}
body .kitchen-storage .ks-window h2 {
  position: relative;
  padding-left: 56px;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: clamp(21px, 2.4vw, 26px);
  overflow-wrap: anywhere;
}
body .kitchen-storage .ks-window h2::before,
.zfui .zfui-container h3::before {
  content: '';
  width: 48px;
  height: 48px;
  background: var(--storage-icon) center / contain no-repeat;
  pointer-events: none;
}
body .kitchen-storage .ks-window h2::before { position: absolute; left: 0; top: 0; }
.zfui .zfui-container h3 { display: flex; gap: 8px; align-items: center; }
.zfui .zfui-container h3::before { flex: 0 0 44px; width: 44px; height: 44px; }
body .kitchen-storage .ks-grid,
.zfui .zfui-container .zfui-grid-scroll {
  border-style: solid;
  border-color: transparent;
  border-width: var(--storage-border);
  border-image-source: var(--storage-frame);
  border-image-slice: var(--storage-slices);
  border-image-repeat: stretch;
  border-radius: 0;
  background-color: var(--storage-inside);
  background-origin: padding-box;
  background-clip: padding-box;
}
body .kitchen-storage .ks-grid {
  --cell: min(44px, calc((100vw - 68px - var(--storage-side) * 2) / var(--cols)));
  width: calc(var(--cols) * var(--cell) + var(--storage-side) * 2);
  max-width: 100%;
  margin: 10px auto 12px;
}
.zfui .zfui-container .zfui-grid-scroll { width: max-content; max-width: 100%; margin: 10px auto; padding: 0; }
body .kitchen-storage :is(.ks-policy, .ks-inspect-hint, .ks-hand, .ks-controls) {
  color: #35584f;
  background: #fff4d5;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.4;
}
body .kitchen-storage .ks-policy { margin: 10px 0; font-size: 12px; }
body .kitchen-storage .ks-inspect-hint { margin: 8px 0; font-size: 12px; }
body .kitchen-storage .ks-actions-toggle {
  min-height: 44px;
  padding: 10px 12px;
  color: #153d39;
  background: #eadfb7;
  border: 2px solid #153d39;
  border-radius: 9px;
  font-weight: 800;
}
body .kitchen-storage .ks-window > footer { margin-top: 10px; }
body .kitchen-storage .ks-controls { display: inline-block; margin-top: 8px; }
body .kitchen-storage .ks-selection { background: #fff4d5; border-radius: 8px; padding: 8px 10px; }
body .kitchen-storage :is(.ks-feedback, .ks-error):empty { display: none; }
body .kitchen-storage .ks-feedback { background: #fff4d5; border-radius: 8px; padding: 8px 10px; }
body .kitchen-storage .ks-item[aria-disabled="true"] { opacity: .72; }
body .kitchen-storage .ks-item[aria-disabled="true"] .ks-take { visibility: hidden; }
.kitchen-storage .ks-grid .ks-item,
.zfui .zfui-grid .zfui-item { transform: none; transition: filter .14s; }

/* A specific hovered/focused/touched item owns this attached scrollport. */
body .kitchen-storage .ks-detail,
.zfui .zfui-hover-detail {
  background: #fff4d5;
  border: 2px solid #153d39;
  border-radius: 14px;
  box-shadow: 0 6px 0 #08282d73, 0 14px 36px #0005;
  padding: 0;
  pointer-events: auto;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #7c946d #fff4d5;
}
body .kitchen-storage .ks-detail[hidden],
.zfui .zfui-hover-detail[hidden] { display: none !important; }
body .kitchen-storage .ks-tooltip-content > .zf-food-tooltip,
.zfui .zfui-hover-detail > .zf-food-tooltip { border: 0; box-shadow: none; width: 100%; max-width: none; margin: 0; }
body .kitchen-storage .ks-tooltip-actions,
.zfui .zfui-inspect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  bottom: 0;
  padding: 9px;
  border-top: 1px solid #b5bb95;
  background: #fff4d5;
  z-index: 1;
}
body .kitchen-storage :is(.ks-inspect-take, .ks-inspect-dismiss) {
  min-height: 44px;
  flex: 1 1 112px;
  padding: 9px 10px;
  border: 2px solid #153d39;
  border-radius: 9px;
  color: #153d39;
  background: #d3ed83;
  font-size: 13px;
  font-weight: 900;
}
body .kitchen-storage .ks-inspect-dismiss { background: #eaddb6; }
.zfui .zfui-inspect-actions > button { min-height: 44px; flex: 1 1 140px; }

/* Existing windows get their own materials and imagery, without new UI state. */
body .zf-recipe-book .rb-book {
  background: #fff4d5;
  border: solid transparent;
  border-width: 32px 30px 28px 44px;
  border-image: url('../art/ui/windows/recipe-book-frame-v1.png') 16% 12% 16% 15% stretch;
  border-radius: 0;
  box-shadow: 0 16px 55px #0007;
}
body .zf-recipe-book .rb-brand { display: grid; grid-template-columns: 44px auto; column-gap: 9px; align-items: center; }
body .zf-recipe-book .rb-brand > span { grid-column: 2; }
body .zf-recipe-book .rb-brand::before {
  content: '';
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  grid-row: 1 / span 2;
  background: url('../art/ui/windows/recipe-book-icon-v1.png') center / contain no-repeat;
}
body .companion-feed-ui .cf-window {
  border: solid transparent;
  border-width: 46px 24px 32px 30px;
  border-image: url('../art/ui/windows/companion-tray-frame-v1.png') 20% 11% 15% 15% stretch;
  border-radius: 0;
  background: #eee0f2;
  box-shadow: 0 16px 55px #0007;
  padding: 12px 16px 16px;
}
body .companion-feed-ui h2::before {
  content: '';
  display: inline-block;
  width: 46px;
  height: 46px;
  vertical-align: middle;
  margin-right: 8px;
  background: url('../art/ui/windows/companion-hand-icon-v1.png') center / contain no-repeat;
}
body .rr-overlay:not([data-stage="carving"]) .rr-panel {
  border: solid transparent;
  border-width: 40px 24px 38px;
  border-image: url('../art/ui/windows/vip-crate-frame-v1.png') 17% 11% 19% 12% stretch;
  border-radius: 0;
  background: #293b3c;
  box-shadow: 0 16px 55px #0007;
  padding: 16px 18px;
}
body .rr-overlay:not([data-stage="carving"]) .rr-eyebrow > i {
  display: inline-block;
  font-size: 0;
  width: 44px;
  height: 44px;
  background: url('../art/ui/windows/vip-cargo-icon-v1.png') center / contain no-repeat;
  vertical-align: middle;
}
body #pause-dialog { border-radius: 18px; background: #e2ead2; padding: 18px 24px 24px; }
body #pause-dialog::before {
  content: '';
  display: block;
  width: min(240px, 100%);
  height: 122px;
  margin: 0 auto 10px;
  background: url('../art/ui/windows/pause-grill-v1.png') center / contain no-repeat;
  pointer-events: none;
}
body #end-dialog {
  border: solid transparent;
  border-width: 60px 28px 36px;
  border-image: url('../art/ui/windows/shift-summary-frame-v1.png') 20% 12% 12% 12% stretch;
  border-radius: 0;
  background: #fff4d5;
  padding: 14px 18px 18px;
  box-shadow: 0 16px 55px #0007;
}
body #stage-panel {
  background: #fff4d5;
  color: #153d39;
  border: solid transparent;
  border-width: 30px 22px 32px 90px;
  border-image: url('../art/ui/windows/stage-route-frame-v1.png') 28% 8% 22% 34% stretch;
  border-radius: 0;
  padding: 10px 12px;
  box-shadow: 0 12px 35px #0005;
}
body #stage-panel:has(.zf-menu-controls) { padding-top: 48px; }
body #start-screen .scene-caption { top: 32%; }
body #start-screen::after {
  content: '';
  position: absolute;
  right: 8%;
  bottom: 30%;
  width: min(430px, 36vw);
  height: 240px;
  background: url('../art/ui/windows/start-foodtruck-v1.png') center / contain no-repeat;
  pointer-events: none;
}
body #fatal {
  inset: 20px;
  width: min(520px, calc(100% - 40px));
  height: fit-content;
  max-height: calc(100dvh - 40px);
  margin: auto;
  overflow: auto;
}
body #fatal::before {
  content: '';
  display: block;
  width: 156px;
  height: 156px;
  flex: 0 0 156px;
  background: url('../art/ui/windows/fatal-repair-v1.png') center / contain no-repeat;
}
body #fatal p { color: #35584f; line-height: 1.5; }
body .physical-intro:has(#overflow-btn.hidden) { display: none; }
body :is(.zf-recipe-book .rb-book, .companion-feed-ui .cf-window, .rr-overlay:not([data-stage="carving"]) .rr-panel, #end-dialog, #stage-panel) { background-clip: padding-box; }

@media (max-width: 640px) {
  body .kitchen-storage .ks-window { padding: 8px 6px; }
  body .kitchen-storage .ks-window h2 { font-size: 20px; padding-left: 42px; }
  body .kitchen-storage .ks-window h2::before { width: 36px; height: 42px; }
  body .kitchen-storage .ks-grid { --storage-side: 26px; --cell: min(44px, calc((100vw - 44px - var(--storage-side) * 2) / var(--cols))); border-left-width: 26px; border-right-width: 26px; }
  body .zf-recipe-book .rb-book { border-width: 24px 14px 20px 20px; }
  body .zf-recipe-book .rb-header { padding: 10px 12px; gap: 8px; }
  body .zf-recipe-book .rb-brand::before { flex-basis: 32px; width: 32px; height: 32px; }
  body .zf-recipe-book .rb-brand { grid-template-columns: 32px auto; }
  body .companion-feed-ui .cf-window { border-width: 38px 14px 26px 18px; padding: 10px 12px; }
  body .rr-overlay:not([data-stage="carving"]) .rr-panel { border-width: 30px 14px 28px; padding: 12px; }
  body #end-dialog { border-width: 44px 16px 28px; padding: 12px 10px 14px; }
  body #pause-dialog { padding: 14px 16px 18px; }
  body #stage-panel { border-left-width: 60px; padding: 8px; }
  body #start-screen::after { display: none; }
  body #start-screen .intro::before {
    content: '';
    float: right;
    width: 112px;
    height: 80px;
    margin: 0 0 4px 8px;
    background: url('../art/ui/windows/start-foodtruck-v1.png') center / contain no-repeat;
  }
}
@media (max-width: 440px) {
  body .kitchen-storage .ks-grid { --cell: min(44px, calc((100vw - 28px - var(--storage-side) * 2) / var(--cols))); }
  body .kitchen-storage:has(.zf-menu-controls) .ks-window > header { padding-right: 88px; }
  body .kitchen-storage .ks-close { flex: 0 0 44px; }
}
@media (max-height: 520px) {
  body #pause-dialog::before { height: 64px; margin-bottom: 4px; }
  body #start-screen::after { height: 150px; bottom: 15%; }
}
@media (max-height: 700px) and (min-width: 641px) {
  body #start-screen .scene-caption { top: 18%; }
}
@media (forced-colors: active) {
  body .kitchen-storage .ks-grid,
  .zfui .zfui-container .zfui-grid-scroll,
  body .zf-recipe-book .rb-book,
  body .companion-feed-ui .cf-window,
  body .rr-overlay:not([data-stage="carving"]) .rr-panel,
  body #end-dialog,
  body #stage-panel { border-image: none; border: 2px solid CanvasText; background: Canvas; }
}
