.paxor-sound-dialog { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #52727d; border-radius: 20px; background: #10232b; color: #edf6fa; box-shadow: 0 20px 80px #0008; font: 14px/1.4 system-ui,sans-serif; }
.paxor-sound-dialog::backdrop { background: #0009; backdrop-filter: blur(5px); }
.paxor-sound-dialog[open] { display: block; }
.paxor-sound-card { padding: 18px; overflow: auto; max-height: calc(100dvh - 34px); box-sizing: border-box; }
.paxor-sound-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.paxor-sound-header h2 { font: inherit; font-size: 19px; font-weight: 700; color: inherit; margin: 0; }
.paxor-sound-dialog button,.paxor-sound-dialog select,.paxor-sound-dialog input { font: inherit; }
.paxor-sound-close { width: 44px; height: 44px; padding: 0; flex: none; border: 1px solid #46636e; border-radius: 50%; background: #ffffff08; color: #edf6fa; font-size: 27px !important; cursor: pointer; }
.paxor-sound-toggle { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #ffffff15; font-weight: 600; }
.paxor-sound-toggle input { width: 24px; height: 24px; accent-color: #dce7ed; cursor: pointer; }
.paxor-sound-preset { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; color: #c4d6de; }
.paxor-sound-preset select { max-width: 65%; min-height: 44px; padding: 8px 10px; border: 1px solid #52727d; border-radius: 9px; background: #17343f; color: #edf6fa; }
.paxor-sound-bands { display: grid; gap: 8px; }
.paxor-sound-band { display: grid; grid-template-columns: 58px minmax(0,1fr) 55px; gap: 9px; align-items: center; min-height: 44px; color: #edf6fa; }
.paxor-sound-frequency { font-size: 12px; color: #c4d6de; }
.paxor-sound-range { min-width: 0; width: 100%; height: 36px; margin: 0; accent-color: #e0e9ee; touch-action: pan-y; cursor: pointer; }
.paxor-sound-value { font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; color: #e0e9ee; }
.paxor-sound-status { min-height: 1.4em; margin: 14px 0; color: #b9d0d9; font-size: 12px; }
.paxor-sound-reset { width: 100%; min-height: 44px; padding: 10px; border: 1px solid #52727d; border-radius: 12px; background: #ffffff0c; color: #edf6fa; cursor: pointer; }
.paxor-sound-dialog :disabled { opacity: .45; cursor: default; }
.paxor-sound-dialog :focus-visible { outline: 2px solid #dce7ed; outline-offset: 3px; }
body.light-theme .paxor-sound-dialog { background: #f2f7fa; color: #18333e; border-color: #91b0bc; }
body.light-theme .paxor-sound-dialog :is(.paxor-sound-close,.paxor-sound-reset,.paxor-sound-preset select) { background: #e5eff4; color: #18333e; border-color: #91b0bc; }
body.light-theme .paxor-sound-dialog :is(.paxor-sound-frequency,.paxor-sound-value,.paxor-sound-status,.paxor-sound-preset,.paxor-sound-band) { color: #365a69; }

@media (max-width: 760px) {
    .paxor-sound-dialog,
    body.light-theme .paxor-sound-dialog {
        position: fixed;
        inset: 0;
        box-sizing: border-box;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-width: none;
        max-height: none;
        margin: 0;
        border: 1px solid #e78a3e;
        border-radius: 0;
        overflow: hidden;
        color: #fff4e9;
        background: radial-gradient(ellipse at 12% 0%, #a34b18 0%, transparent 64%), linear-gradient(155deg, #57280f, #20140c 72%);
        box-shadow: none;
        color-scheme: dark;
    }
    .paxor-sound-card {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        padding: max(18px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
        overflow: auto;
        overscroll-behavior: contain;
        scrollbar-color: #dd8947 #3b2517;
    }
    .paxor-sound-header { margin-bottom: 20px; }
    .paxor-sound-header h2 { font-size: 23px; letter-spacing: -.3px; }
    .paxor-sound-toggle { flex: none; min-height: 44px; padding: 10px 0 16px; border-bottom-color: #ffb47540; }
    .paxor-sound-toggle input { width: 26px; height: 26px; accent-color: #ffac62; }
    .paxor-sound-preset { flex: none; margin: 20px 0 14px; }
    .paxor-sound-bands { flex: 1 0 auto; align-content: center; gap: clamp(8px, 1.7dvh, 18px); padding: 12px 0 18px; }
    .paxor-sound-band { grid-template-columns: 52px minmax(0, 1fr) 50px; gap: 10px; min-height: 48px; }
    .paxor-sound-range { height: 44px; accent-color: #ffac62; }
    .paxor-sound-frequency,
    .paxor-sound-value { font-size: 13px; }
    .paxor-sound-dialog :is(.paxor-sound-frequency, .paxor-sound-value, .paxor-sound-status, .paxor-sound-preset, .paxor-sound-band),
    body.light-theme .paxor-sound-dialog :is(.paxor-sound-frequency, .paxor-sound-value, .paxor-sound-status, .paxor-sound-preset, .paxor-sound-band) { color: #ffe4ce; }
    .paxor-sound-dialog :is(.paxor-sound-close, .paxor-sound-preset select),
    body.light-theme .paxor-sound-dialog :is(.paxor-sound-close, .paxor-sound-preset select) { color: #fff4e9; background: #3b210f; border-color: #e78a3e99; }
    .paxor-sound-preset select { border-radius: 12px; }
    .paxor-sound-status { flex: none; margin: 14px 0 18px; }
    .paxor-sound-dialog .paxor-sound-reset,
    body.light-theme .paxor-sound-dialog .paxor-sound-reset { flex: none; min-height: 48px; color: #2e1706; background: #ffac62; border-color: #ffc38f; font-weight: 650; }
    .paxor-sound-dialog :focus-visible { outline-color: #ffd2aa; }
}

@media (max-width: 760px) and (max-height: 700px) {
    .paxor-sound-card { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
    .paxor-sound-header { margin-bottom: 12px; }
    .paxor-sound-toggle { padding: 8px 0; }
    .paxor-sound-preset { margin: 12px 0 8px; }
    .paxor-sound-bands { gap: 4px; padding: 4px 0; }
    .paxor-sound-band { min-height: 44px; }
    .paxor-sound-status { margin: 10px 0 12px; }
}
