/* TASK171: presentation only. Progress comes from the shared image pool. */
.asset-loading { position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; color: var(--cream-hi); background: var(--ink); }
.asset-loading[hidden] { display: none; }
.asset-loading::before { content: ""; position: absolute; inset: 18px; pointer-events: none; border: 2px solid var(--wood-mid); box-shadow: inset 0 0 0 5px var(--ink), inset 0 0 0 7px var(--wood-deep); }
.loading-card { position: relative; box-sizing: border-box; width: min(640px, 88%); max-height: 100%; overflow: auto; padding: 24px; text-align: center; background: var(--ink); border: 4px solid; border-color: var(--cream) var(--wood-deep) var(--wood-deep) var(--cream); box-shadow: inset 4px 4px 0 var(--wood-mid), inset -4px -4px 0 var(--ink-deep), 8px 8px 0 var(--ink-deep); }
.loading-kicker { color: var(--amber); font-size: 14px; letter-spacing: 3px; }
.loading-heading h2 { margin: 10px 0 12px; font-size: 48px; font-weight: 400; line-height: 1.1; color: var(--tomato-hi); text-shadow: 4px 4px 0 var(--ink-deep); }
.loading-rule { display: block; width: 64px; height: 4px; margin: auto; background: var(--amber); box-shadow: -76px 0 0 var(--wood-mid), 76px 0 0 var(--wood-mid); }
.loading-kitchen { position: relative; height: 192px; margin: 14px 0 18px; overflow: hidden; border-bottom: 5px solid var(--ink-deep); }
.loading-window { position: absolute; width: 100px; height: 74px; left: 13%; top: 30px; border: 5px solid var(--wood-mid); background: var(--wood-deep); box-shadow: inset 0 0 0 3px var(--ink); }
.loading-window::after { content: ""; position: absolute; width: 5px; height: 100%; left: 46%; background: var(--wood-mid); }
.loading-service-sign { position: absolute; right: 13%; top: 35px; padding: 6px 10px; border: 3px solid var(--wood-mid); color: var(--amber); font-size: 16px; letter-spacing: 3px; transform: rotate(-3deg); }
.loading-counter { position: absolute; bottom: 0; left: 6%; right: 6%; height: 29px; border: 3px solid var(--ink-deep); border-top: 5px solid var(--cream); background: var(--wood-mid); box-shadow: inset 0 4px 0 var(--wood-deep); }
.loading-chef { position: absolute; left: 29%; bottom: 25px; width: 140px; height: 140px; display: grid; place-items: end center; animation: loading-chef-bob 1.6s steps(4,end) infinite; }
.loading-chef img { max-width: 100%; height: 130px; object-fit: contain; image-rendering: pixelated; }
.loading-wok { position: absolute; right: 25%; bottom: 34px; width: 98px; height: 56px; display: grid; align-items: end; z-index: 1; animation: loading-wok-toss 1.6s steps(6,end) infinite; transform-origin: right bottom; }
.loading-wok img { width: 100%; max-height: 56px; object-fit: contain; image-rendering: pixelated; }
.loading-stove { position: absolute; right: 27%; bottom: 29px; display: flex; align-items: end; gap: 6px; height: 15px; }
.loading-stove i { width: 8px; height: 9px; background: var(--tomato-hi); box-shadow: 0 -4px 0 var(--amber); animation: loading-fire 800ms steps(2,end) infinite; }
.loading-stove i:nth-child(2) { height: 13px; animation-delay: -400ms; }
.loading-steam { position: absolute; width: 5px; height: 20px; bottom: 87px; right: 33%; background: var(--cream-hi); opacity: 0; box-shadow: 5px -7px 0 var(--cream-hi); animation: loading-steam-rise 2.4s steps(8,end) infinite; }
.loading-steam-two { right: 29%; animation-delay: -800ms; }
.loading-steam-three { right: 37%; animation-delay: -1600ms; }
.loading-progress-heading { display: flex; align-items: baseline; justify-content: space-between; color: var(--cream); font-size: 18px; margin-bottom: 10px; }
#assetLoadPercent { font-size: 28px; font-weight: 400; color: var(--cream-hi); font-variant-numeric: tabular-nums; }
#assetLoadPercent span { font-size: 16px; padding-left: 3px; color: var(--cream); }
.loading-progress { height: 25px; padding: 4px; border: 3px solid var(--cream); background: var(--wood-deep); box-shadow: 4px 4px 0 var(--ink-deep); }
.loading-progress-fill { display: block; width: 0; height: 100%; background: repeating-linear-gradient(to right, var(--amber) 0, var(--amber) 18px, var(--wood-deep) 18px, var(--wood-deep) 22px); }
.loading-status-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 14px; color: var(--cream-hi); font-size: 15px; text-align: left; }
#assetLoadStatus { margin: 0; line-height: 1.5; }
#assetLoadCount { white-space: nowrap; color: var(--cream); font-variant-numeric: tabular-nums; }
.loading-note { color: var(--cream); font-size: 14px; line-height: 1.4; margin: 16px 0 0; }
#assetLoadRetry { min-width: 180px; min-height: 48px; margin: 14px auto 0; font-size: 18px; }
.asset-loading[data-state="failed"] #assetLoadStep { color: var(--tomato-hi); }
.asset-loading[data-state="failed"] .loading-progress { border-color: var(--tomato-hi); }
.asset-loading[data-state="failed"] .loading-kitchen { height: 150px; }
.asset-loading[data-state="failed"] .loading-kitchen *, .asset-loading[data-background="true"] .loading-kitchen * { animation-play-state: paused; }
@keyframes loading-chef-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes loading-wok-toss { 0%,65%,100% { transform: rotate(0); } 80% { transform: translateY(-6px) rotate(-8deg); } }
@keyframes loading-steam-rise { 0% { transform: translate(0,5px); opacity: 0; } 25% { opacity: .5; } 100% { transform: translate(5px,-22px); opacity: 0; } }
@keyframes loading-fire { to { transform: scaleY(.65); } }
@container game-stage (max-height: 600px) {
  .loading-card { width: min(600px, 88%); padding: 12px 20px; box-shadow: inset 4px 4px 0 var(--wood-mid), inset -4px -4px 0 var(--ink-deep), 4px 4px 0 var(--ink-deep); }
  .loading-kitchen { height: 160px; margin: 10px 0 14px; }
  .loading-heading h2 { font-size: 42px; }
  #assetLoadRetry { min-height: 64px; }
  .asset-loading[data-state="failed"] .loading-kitchen { height: 115px; }
  .asset-loading[data-state="failed"] .loading-chef img { height: 98px; }
}
@media (prefers-reduced-motion: reduce) { .loading-kitchen * { animation: none !important; } .loading-steam { opacity: .3; } }
html[data-reduced-motion="true"] .loading-kitchen * { animation: none !important; }
html[data-reduced-motion="true"] .loading-steam { opacity: .3; }
