.btn-options-fixed {
    top: 12px;
    right: 12px;
    z-index: 50;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    background: rgba(42, 32, 21, 0.7);
    border: 1px solid var(--color-gold-dark);
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
}

.options-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 90vw;
    height: 100%;
    box-sizing: border-box;
    background: var(--color-surface);
    z-index: 100;
    overflow-y: auto;
    padding: 20px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

.options-panel--open {
    display: block;
}

.options-panel h3 {
    color: var(--color-gold);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.options-panel label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.options-background-sound-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0.25rem;
}

.options-background-sound-row label {
    margin-bottom: 0;
    flex: 1;
}

.btn-background-sound-preview {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border: 1px solid var(--color-gold-dark);
    border-radius: 4px;
    cursor: pointer;
}

.btn-background-sound-preview:hover:not(:disabled) {
    color: var(--color-gold);
}

.btn-background-sound-preview:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-background-sound-preview--playing {
    color: var(--color-gold);
    /* ■ (U+25A0) draws smaller than ▶ in most fonts; nudge size to match visually */
    font-size: 1rem;
}

.options-panel input[type="number"] {
    width: 100%;
    padding: 6px 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-gold-dark);
    color: var(--color-text);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.875rem;
}

.options-panel select {
    width: 100%;
    padding: 6px 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-gold-dark);
    color: var(--color-text);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.875rem;
}

.options-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.options-toggle input[type="checkbox"] {
    accent-color: var(--color-gold);
}

.options-panel input[type="range"] {
    width: 100%;
    margin-bottom: 0.75rem;
    accent-color: var(--color-gold);
}

.btn-close-options {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    font-family: var(--font-ui);
}

.options-random-filter {
    margin-top: 0.5rem;
    margin-left: 1rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--color-gold-dark);
}

.options-random-filter-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
    .options-panel {
        width: 100%;
        max-width: 100%;
    }
}