/* P1.4 — the FPS badge (bottom right, 44 px, coloured by health; above /play/'s touch pad through
   --lucid-pad-h) and the profiler panel. /create/ loads this before create.css, which moves the
   badge under the Menu button on a phone (the pad and its latches hold the bottom 190 px). */
#fps-badge { position: absolute; right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(8px + var(--lucid-pad-h, 0px) + env(safe-area-inset-bottom, 0px)); z-index: 40;
  min-width: 64px; min-height: 44px; padding: 0 8px; box-sizing: border-box; border-radius: 8px; border: 1px solid #3a3456;
  background: rgba(10, 8, 24, .82); color: #b9b2d6; font: 11px/1.2 ui-monospace, monospace; cursor: pointer; touch-action: manipulation; }
#fps-badge[data-health="good"] { color: #7dffa8; }
#fps-badge[data-health="warn"] { color: #ffd166; border-color: #6b5a2a; }
#fps-badge[data-health="bad"] { color: #ff6b6b; border-color: #6b2a2a; }
#fps-badge[aria-expanded="true"] { border-color: #b44cff; }
/* P1.6: at least one error or warning since load; copy the report. Decoration, not a control. */
#fps-badge[data-errors]::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; pointer-events: none; }
#profiler-panel { position: absolute; right: 8px; bottom: 60px; z-index: 60; width: min(620px, calc(100% - 16px)); max-height: calc(100% - 76px); overflow: auto;
  box-sizing: border-box; padding: 6px 10px 10px; background: rgba(10, 8, 24, .95); color: #e6e0ff; border: 1px solid #3a3456; border-radius: 8px;
  font: 11px/1.35 ui-monospace, monospace; }
#profiler-panel[hidden] { display: none; }
#profiler-panel header { display: flex; align-items: center; gap: 8px; }
#profiler-panel header b { font-size: 13px; }
#profiler-panel .prof-state { flex: 1; opacity: .7; }
#profiler-panel button { min-height: 44px; min-width: 44px; touch-action: manipulation; }
#profiler-panel .prof-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
#profiler-panel .prof-pipeline { opacity: .8; }
#profiler-panel h4 { margin: 8px 0 2px; font-size: 11px; color: #b9b2d6; }
#profiler-panel table { border-collapse: collapse; width: 100%; }
#profiler-panel th, #profiler-panel td { padding: 1px 6px; text-align: right; white-space: nowrap; }
#profiler-panel th:first-child, #profiler-panel td:first-child { text-align: left; white-space: normal; word-break: break-word; }
#profiler-panel caption { text-align: left; opacity: .6; }
#profiler-panel .prof-errors td:last-child { text-align: left; white-space: normal; word-break: break-word; }
#profiler-panel .prof-more { opacity: .7; }
#profiler-panel .prof-slowest { margin: 0; padding-left: 20px; }
#profiler-panel .prof-copy { width: 100%; height: 120px; box-sizing: border-box; font: 10px ui-monospace, monospace; }
@media (max-width: 700px) {
  #profiler-panel { left: 8px; right: 8px; width: auto; top: calc(60px + env(safe-area-inset-top, 0px)); bottom: 8px; max-height: none; }
}
