body   { margin: 0; overflow: hidden; background: #000; }
.section   { padding: 0 !important; }
.container { max-width: none !important; padding: 0 !important; }

#c {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#no-webgl:not([hidden]) {
    position: fixed;
    inset: 0;
    background: #111;
    color: #ccc;
    font-family: monospace;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Controls panel ──────────────────────────────────────────────────────── */
#ui {
    position: fixed;
    bottom: 1.2rem;
    right: 1.2rem;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ddd;
    font-family: monospace;
    font-size: 0.78rem;
    padding: 0.85rem 1rem;
    min-width: 230px;
    user-select: none;
}

#ui h3 {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    color: #fff;
    letter-spacing: 0.08em;
}

.row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.lbl {
    min-width: 5.5rem;
    color: #999;
}

#palettes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

#palettes button, .ub {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ccc;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: monospace;
    transition: background 0.12s;
}
#palettes button:hover, .ub:hover { background: rgba(255, 255, 255, 0.18); }
#palettes button.active {
    background: rgba(180, 180, 255, 0.3);
    border-color: rgba(180, 180, 255, 0.6);
    color: #fff;
}

input[type=range] {
    flex: 1;
    accent-color: #99aaff;
    cursor: pointer;
}

input[type=number] {
    width: 6rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 4px;
    color: #ffcc44;
    font-family: monospace;
    font-size: 0.78rem;
    padding: 0.15rem 0.35rem;
    text-align: right;
}
input[type=number]:focus {
    outline: none;
    border-color: rgba(255,204,68,0.6);
}
/* Hide browser spinner arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }

#unit-circle {
    display: block;
    margin: 0.4rem 0;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: crosshair;
    width: 150px;
    height: 150px;
}

#c-display {
    font-size: 0.72rem;
    color: #aaddff;
    margin-bottom: 0.3rem;
    word-break: break-all;
}

/* ── Hints ───────────────────────────────────────────────────────────────── */
#hints {
    position: fixed;
    top: 1rem;
    left: 1rem;
    color: rgba(255, 255, 255, 0.35);
    font-family: monospace;
    font-size: 0.7rem;
    pointer-events: none;
    line-height: 1.7;
}
