/* The engine's own styles: the stage, the scene layers, the TV safe-area
   guides and the review HUD. Nothing here is brand; that is brand/kit.css. */

html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body.kr-idle, body.kr-idle * { cursor: none !important; }

/* The picture is always 1920 x 1080 and scaled to fit, letterboxed in black,
   so a scene is authored once in px and looks the same on a laptop and on a
   4K panel. runner.js sets the transform. */
.kr-stage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  contain: strict;
}
.kr-ground, .kr-scenes, .kr-scene, .kr-guides { position: absolute; inset: 0; }
.kr-scenes { z-index: 1; pointer-events: none; } /* a picture: a click must never reach a live component and change its state behind the clock's back */
.kr-scene { overflow: hidden; }
.kr-chrome { z-index: 5; }
.kr-guides { z-index: 9; pointer-events: none; }
.kr-broken { margin: 200px; font: 700 32px/1.4 sans-serif; color: #fff; background: #b00e17; padding: 24px; }

/* TV safe areas. Many panels still overscan a few percent by default, so
   keep anything that must be read inside the inner box. */
.kr-guides i { position: absolute; border: 2px dashed rgba(0, 255, 200, .8); }
.kr-guides i::after { position: absolute; left: 8px; top: 4px; font: 700 18px/1 sans-serif; color: rgba(0, 255, 200, .9); }
.kr-guides .kr-guides__action { inset: 37.8px 67.2px; }                 /* 93% */
.kr-guides .kr-guides__action::after { content: 'action safe 93%'; }
.kr-guides .kr-guides__title { inset: 54px 96px; }                      /* 90% */
.kr-guides .kr-guides__title::after { content: 'title safe 90%'; }

/* ---------- review HUD ---------- */
.kr-hud {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  padding: 28px 20px 12px;
  background: linear-gradient(to top, rgba(10, 10, 20, .92), rgba(10, 10, 20, .75) 70%, transparent);
  color: #e8e8f2; font: 13px/1.3 'Century Gothic', 'Segoe UI', Tahoma, sans-serif;
  transition: opacity .25s, transform .25s;
  user-select: none;
}
.kr-hud.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
.kr-hud button {
  font: inherit; color: inherit; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px; padding: 5px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.kr-hud button:hover { background: rgba(255, 255, 255, .16); }
.kr-hud button svg { width: 16px; height: 16px; fill: currentColor; }
/* Both icons live in the button and an attribute picks one, so its contents
   never change under the pointer (see paintHud). */
.kr-hud [data-k="play"] span { display: inline-flex; pointer-events: none; }
.kr-hud [data-k="play"] .kr-hud__ico-pause,
.kr-hud [data-k="play"][data-playing] .kr-hud__ico-play { display: none; }
.kr-hud [data-k="play"][data-playing] .kr-hud__ico-pause { display: inline-flex; }

.kr-hud__track { position: relative; height: 34px; cursor: pointer; touch-action: none; }
.kr-hud__chs { position: absolute; inset: 14px 0 0; display: flex; gap: 3px; }
.kr-hud__ch { position: relative; min-width: 0; background: rgba(255, 255, 255, .16); border-radius: 2px; height: 6px; }
.kr-hud__ch span {
  position: absolute; bottom: 10px; left: 0; right: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 11px; color: rgba(255, 255, 255, .6);
}
.kr-hud__ch i { position: absolute; top: -2px; width: 2px; height: 10px; background: rgba(10, 10, 20, .9); }
.kr-hud__fill { position: absolute; left: 0; top: 14px; height: 6px; background: #5a58d8; border-radius: 2px; mix-blend-mode: screen; pointer-events: none; }
.kr-hud__head { position: absolute; top: 9px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(90, 88, 216, .6); pointer-events: none; }
.kr-hud__tip {
  position: absolute; bottom: 30px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  background: #000; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 12px;
}
.kr-hud__bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.kr-hud__time { font-variant-numeric: tabular-nums; margin: 0 10px 0 6px; min-width: 120px; }
.kr-hud__where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255, 255, 255, .85); }
.kr-hud__where b { color: #5a58d8; margin: 0 4px; }
.kr-hud__where i { font-style: normal; color: rgba(255, 255, 255, .5); margin-left: 6px; }
.kr-hud__gap { flex: 1; }
.kr-hud .kr-hud__errors { background: #b00e17; border-color: #de121c; font-weight: 700; }
.kr-hud__help {
  position: absolute; right: 20px; bottom: 84px; width: 440px; padding: 16px 18px;
  background: rgba(10, 10, 20, .96); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px;
}
.kr-hud__help dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0 0 12px; }
.kr-hud__help dt { font-weight: 700; color: #fff; }
.kr-hud__help dd { margin: 0; color: rgba(255, 255, 255, .8); }
.kr-hud__help p { margin: 0; color: rgba(255, 255, 255, .7); }
.kr-hud__errlist { margin: 12px 0 0; padding-left: 18px; color: #ff8a8f; }
.kr-hud__errlist:empty { display: none; }
[hidden] { display: none !important; }
