html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
body { display: flex; align-items: center; justify-content: center; }
.stage-box { position: relative; width: min(100vw, calc(100vh * 4 / 3)); aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
[hidden] { display: none !important; }
.layer { position: absolute; left: 0; top: 0; width: 480px; height: 360px; transform-origin: 0 0; pointer-events: none; }
.monitor { position: absolute; box-sizing: border-box; display: flex; gap: 4px; align-items: center; max-width: 470px; padding: 3px 6px; border: 1px solid #c4ccd9; border-radius: 4px; background: #e6f0ff; color: #575e75; font-size: 12px; font-weight: bold; white-space: pre; }
.monitor-value { min-width: 32px; min-height: 1.2em; padding: 0 5px; border-radius: 4px; background: #ff8c1a; color: #fff; font-weight: normal; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.monitor-large { padding: 0; border: 0; background: none; }
.monitor-large .monitor-value { padding: 2px 8px; font-size: 16px; }
.monitor-slider { flex-wrap: wrap; }
.monitor .monitor-slider { width: 100%; margin: 2px 0 0; pointer-events: auto; }
.monitor-list { flex-direction: column; gap: 0; padding: 0; overflow: hidden; pointer-events: auto; background: #e6f0ff; }
.monitor-list .monitor-label { width: 100%; padding: 2px 0; background: #fff; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.monitor-list .monitor-value { flex: 1; width: 100%; box-sizing: border-box; margin: 0; padding: 2px 4px 2px 30px; overflow-y: auto; border-radius: 0; background: none; color: #575e75; text-align: left; }
.monitor-list li { margin: 1px 0; padding: 1px 4px; border-radius: 3px; background: #fc662c; color: #fff; min-height: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.monitor-list::after { content: attr(data-length); width: 100%; background: #fff; text-align: center; }
.ask { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; grid-template-columns: 1fr 36px; gap: 4px; padding: 8px; border: 1px solid #c4ccd9; border-radius: 8px; background: #fff; pointer-events: auto; }
.ask label { grid-column: 1 / -1; font-size: 12px; font-weight: bold; color: #575e75; overflow-wrap: anywhere; }
.ask input { min-width: 0; padding: 6px 10px; border: 1px solid #c4ccd9; border-radius: 16px; font-size: 14px; }
.ask button { border: 0; border-radius: 50%; background: #855cd6; color: #fff; font-size: 16px; cursor: pointer; }
.controls { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; opacity: 0.35; transition: opacity 0.2s; }
.stage-box:hover .controls, .controls:focus-within { opacity: 1; }
.controls button { width: 30px; height: 30px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; background: rgba(255, 255, 255, 0.9); font-size: 16px; cursor: pointer; }
#again { color: #3a9d3a; }
#stop { color: #d94b4b; }
.start { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.35); }
.start button { width: 88px; height: 88px; border: 4px solid #fff; border-radius: 50%; background: #4cbf56; color: #fff; font-size: 44px; cursor: pointer; }
.message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 12px; background: #fff; color: #444; text-align: center; }
@media (prefers-reduced-motion: reduce) { .controls { transition: none; } }
