:root {
    --gold: #D4AF37;
    --gold-light: #F4E4B0;
    --gold-dark: #B8941F;
    --black: #0A0A0A;
    --black-light: #1A1A1A;
    --glass-bg: rgba(26, 26, 26, 0.7);
    --glass-border: rgba(212, 175, 55, 0.3);
    --font-main: 'Canela Text Trial', serif;
    --font-display: 'Canela Trial', serif;
}

/* Apply main font globally and to specific elements */
.numeric,
.state-value,
.prob-value,
.decomp-value,
.expectation-value,
.fidelity-display,
input[type="text"],
input[type="number"],
.matrix-input,
.angle-label,
.slider-value,
.control-value {
    font-family: var(--font-main);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #0A0A0A 0%, #222 50%, #0F0F0F 100%);
    min-height: 100vh;
    padding: 100px 24px 32px 24px;
    position: relative;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-overflow-scrolling: touch;
}

/* Touch action for better mobile scroll/gesture handling */
.visualization-panel {
    touch-action: none;
    /* Allow Three.js to handle all touch */
}

.controls-panel,
.right-panel {
    touch-action: pan-y;
    /* Allow vertical scroll only */
}

input[type="range"] {
    touch-action: pan-x;
    /* Allow horizontal drag for sliders */
}


body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1680px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

