:root {
    color-scheme: dark;
    --scene-bg: #06172a;
    --panel-bg: rgba(5, 22, 40, 0.91);
    --panel-border: rgba(210, 224, 237, 0.18);
    --text: #f3f6f8;
    --muted: #aebdca;
    --quiet: #7f93a5;
    --active: #e0b454;
    --active-dark: #123b63;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #030507;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
}

body {
    display: grid;
    place-items: center;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

#scene-shell {
    position: relative;
    width: min(100vw, calc(100vh * 16 / 9));
    height: min(100vh, calc(100vw * 9 / 16));
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--scene-bg);
}

#interaction-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.panel {
    position: absolute;
    top: 40px;
    z-index: 2;
    width: 276px;
    padding: 22px;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: var(--panel-bg);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(14px);
}

#feedback-panel {
    left: 40px;
    min-height: 208px;
}

#instrument-panel {
    right: 40px;
}

.eyebrow {
    margin: 0 0 9px;
    color: var(--active);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    margin-bottom: 8px;
    font-size: 20px;
    line-height: 1.2;
}

#feedback-body {
    min-height: 51px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

#observation {
    margin-bottom: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

.instrument-list {
    display: grid;
    gap: 10px;
}

button,
.file-button {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(184, 204, 224, 0.20);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font: inherit;
    font-weight: 650;
    text-align: left;
    padding: 0 15px;
    cursor: default;
}

button:focus-visible,
.file-button:focus-visible {
    outline: 3px solid rgba(224, 180, 84, 0.70);
    outline-offset: 2px;
}

button[aria-pressed="true"] {
    border-color: rgba(224, 180, 84, 0.72);
    background: var(--active-dark);
}

#reset-button {
    margin-top: 12px;
    color: var(--muted);
}

.panel-divider {
    height: 1px;
    margin: 18px 0;
    background: rgba(190, 209, 226, 0.13);
}

.file-button {
    display: flex;
    align-items: center;
    color: var(--muted);
}

#background-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

#scene-title {
    position: absolute;
    top: 43px;
    left: 50%;
    z-index: 2;
    width: 600px;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
}

#scene-title .eyebrow {
    margin-bottom: 4px;
    color: var(--quiet);
}

#scene-title h1 {
    font-size: 25px;
}

#scene-title p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-aspect-ratio: 4 / 3) {
    .panel {
        top: 26px;
    }
}

@media (max-width: 1100px) {
    #scene-title {
        width: 360px;
    }

    #scene-title .eyebrow {
        display: none;
    }

    #scene-title h1 {
        margin-bottom: 7px;
        font-size: 23px;
    }

    #scene-title p {
        font-size: 13px;
    }
}
