:root { color-scheme: dark; font-family: Inter, "Segoe UI", Arial, sans-serif; background: #131313; color: #e6e5e2; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
#rive { display: block; position: absolute; width: min(100vw, 133.333333vh); height: min(75vw, 100vh); left: 50%; top: 50%; transform: translate(-50%, -50%); touch-action: none; }
#surface { position: fixed; inset: 0; z-index: 1; touch-action: none; }
@media (pointer: fine) { #surface { cursor: none; } }
#floating-controls { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.floating-panel { position: fixed; z-index: 5; width: 220px; max-height: calc(100dvh - 24px); overflow: auto; padding: 13px 14px; background: #1b1b1b; border: 1px solid #ffffff1b; border-radius: 10px; box-shadow: 0 12px 36px #0003; font-size: 13px; pointer-events: auto; }
.floating-panel.numeric { min-height: 70px; }
.panel-handle { height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 5px; cursor: move; touch-action: none; user-select: none; }
.panel-handle strong, .panel-handle label { font-size: 12px; font-weight: 600; color: #dedbd4; pointer-events: none; }
.grip { color: #73716d; font: 12px ui-monospace, Consolas, monospace; letter-spacing: -3px; pointer-events: none; }
.floating-panel.moving { border-color: #d9bfa070; }
#panel { width: 235px; }
#record-panel { width: 260px; }
header, footer, .control-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
header { padding-bottom: 9px; border-bottom: 1px solid #ffffff14; }
header strong { font-size: 13px; letter-spacing: .02em; font-weight: 600; }
button { border: 0; background: transparent; color: #afafad; padding: 5px 0; cursor: pointer; font: inherit; }
button:hover { color: #fff; }
kbd { font: 11px ui-monospace, Consolas, monospace; color: #777; margin-left: 5px; }
#status { color: #858582; font-size: 11px; line-height: 1.45; margin: 10px 0; }
.control { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.control label { color: #c9c9c6; font-size: 12px; }
.control.numeric { display: block; min-height: 34px; margin: 0; }
.control-head { height: 28px; }
input { accent-color: #dedbd4; font: 12px ui-monospace, Consolas, monospace; }
input[type=number] { width: 73px; padding: 4px 6px; text-align: right; color: #eeedea; background: #ffffff0b; border: 1px solid #ffffff18; border-radius: 5px; font-variant-numeric: tabular-nums; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { appearance: none; margin: 0; }
input[type=number]:hover, input[type=number]:focus { border-color: #ffffff50; }
.scrub { --progress: 0%; position: relative; height: 20px; cursor: ew-resize; touch-action: none; outline: none; }
.scrub::before, .scrub-fill { content: ""; position: absolute; top: 9px; left: 0; height: 2px; border-radius: 2px; }
.scrub::before { right: 0; background: #ffffff24; }
.scrub-fill { width: var(--progress); background: #d9bfa0; pointer-events: none; }
.scrub-thumb { position: absolute; top: 4px; left: var(--progress); width: 12px; height: 12px; border: 2px solid #e5d4bf; border-radius: 50%; background: #252421; transform: translateX(-50%); pointer-events: none; transition: box-shadow 120ms; }
.scrub:hover .scrub-thumb, .scrub.dragging .scrub-thumb, .scrub:focus-visible .scrub-thumb { box-shadow: 0 0 0 4px #d9bfa024; }
.scrub[aria-disabled=true] { opacity: .3; pointer-events: none; }
.scrub[aria-disabled=true] .scrub-thumb { display: none; }
.control-note { display: block; margin-top: 2px; color: #8a8884; font-size: 10px; }
.floating-panel.numeric input[type=number] { width: 82px; }
input[type=checkbox] { width: 15px; height: 15px; margin: 0 2px 0 0; cursor: pointer; }
input[type=color] { width: 38px; height: 24px; padding: 2px; background: #ffffff0b; border: 1px solid #ffffff26; border-radius: 4px; cursor: pointer; }
input:disabled { opacity: .3; cursor: not-allowed; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #ffffff14; font-size: 10px; color: #777; }
.record-button { display: block; width: 100%; padding: 9px; color: #ece9e4; background: #ffffff12; border: 1px solid #ffffff30; border-radius: 6px; text-align: center; }
.record-button.recording { color: #fff; background: #9d3a3428; border-color: #c85a51; }
.record-options { display: grid; gap: 7px; margin: 11px 0 9px; }
.record-options label { display: flex; align-items: center; gap: 7px; color: #bbb9b5; font-size: 11px; cursor: pointer; }
.record-options input { flex: none; }
#record-detail { margin: 8px 0; font-size: 10px; line-height: 1.4; color: #8c8a86; }
.shortcut-note { margin: 5px 0 0; color: #777; font-size: 10px; text-align: center; }
#loading { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: #131313; color: #8b8985; font: 13px ui-monospace, Consolas, monospace; letter-spacing: .08em; }
body.ready #loading { display: none; }
body:not(.ready) #rive, body:not(.ready) #surface, body:not(.ready) #actions, body:not(.ready) #floating-controls, body:not(.ready) #panel, body:not(.ready) #record-panel, body:not(.ready) #cursor { visibility: hidden; }
#hint { position: fixed; z-index: 20; right: 20px; bottom: 20px; padding: 8px 11px; border: 1px solid #ffffff28; border-radius: 6px; background: #222; color: #ddd; font: 11px ui-monospace, Consolas, monospace; opacity: 0; pointer-events: none; transition: opacity 180ms; }
#hint.visible { opacity: 1; }
:focus-visible { outline: 1px solid #d9bfa0; outline-offset: 2px; }
#cursor { position: fixed; top: 0; left: 0; width: 24px; height: 24px; margin: -12px; pointer-events: none; z-index: 10; opacity: 0; transition: opacity 120ms; }
#cursor.visible { opacity: 1; }
#cursor i { position: relative; display: block; width: 100%; height: 100%; border: 1.25px solid #f3f0e9; border-radius: 50%; transform: scale(1); transition: transform 260ms cubic-bezier(.22,1.5,.4,1), background-color 120ms; }
#cursor i::after { content: ""; position: absolute; inset: 6px; background: #fff; border-radius: 50%; opacity: 0; transform: scale(.4); transition: opacity 100ms, transform 140ms; }
#cursor.over i { transform: scale(1.13); }
#cursor.down i { transform: scale(.78); background: #ffffff24; transition-duration: 65ms; }
#cursor.down i::after { opacity: .7; transform: scale(1); }
#actions { position: fixed; z-index: 2; left: 50%; top: max(24px, calc(50% - min(28vw, 28vh) - 60px)); width: 160px; height: 25px; transform: translateX(-50%); text-align: center; pointer-events: none; font: 18px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .18em; color: #6B6D72; }
#actions span { position: absolute; inset: 0; opacity: 0; transition: opacity 140ms; }
#actions span.active { opacity: 1; }
body.controls-hidden #floating-controls, body.controls-hidden #panel, body.controls-hidden #record-panel, body.clean-mode #actions { display: none; }
body.controls-half .floating-panel { opacity: .5; }
@media (pointer: coarse) { #cursor { display: none; } }
@media (max-height: 680px) { .floating-panel { max-height: calc(100dvh - 16px); } }
@media (prefers-reduced-motion: reduce) { #cursor i, #cursor i::after, #actions span, .scrub-thumb { transition: none; } }
