/* ===================================================================
   /headphone-test

   --lvl (0..1) on each cup is written by headphone-test.js from the
   analyser on that output channel; --pan (-1..1) on the image dot is
   computed from the two levels. Nothing here animates on its own
   except the rings, whose strength still follows --lvl.
   Scoped under .hp.
   =================================================================== */

.hp {
    --hp-accent: #3d8bff;
    --hp-l: #38bdf8;
    --hp-r: #fb7185;
    --hp-ink: #10162b;
    --hp-muted: #5b6275;
    --hp-line: #e4e7ef;
    --hp-volume: 25%;

    margin: 18px auto 24px;
    padding: 0;                       /* WebsiteTemplate gives <section> 60px */
    max-width: 1080px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--hp-line);
    box-shadow: 0 30px 60px -32px rgb(16 22 43 / 45%);
    overflow: hidden;
    text-align: left;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--hp-ink);
}
.hp *, .hp *::before, .hp *::after { box-sizing: border-box; }
.hp button, .hp select { font: inherit; }
.hp svg { display: block; }
.hp :where(p, ul, dl, dd, h3) { margin: 0; }

.hp-visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- top bar ---------- */

.hp-topbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
    padding: 14px 20px;
    background: linear-gradient(180deg, #151b33, #10162b);
    color: #cdd5ee;
}
.hp-detected { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; }
.hp-detected svg { width: 18px; height: 18px; color: #22d3ee; flex: none; }
.hp-styles { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / 8%); }
.hp-styles button {
    border: 0; border-radius: 999px; padding: 6px 14px; min-height: 32px;
    background: transparent; color: #aeb8d6; font-size: .8rem; font-weight: 600; cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.hp-styles button:hover { color: #fff; }
.hp-styles button[aria-checked="true"] { background: #fff; color: var(--hp-ink); }

/* ---------- stage ---------- */

.hp-stage {
    position: relative;
    padding: clamp(22px, 4vw, 44px) clamp(12px, 4vw, 48px) clamp(18px, 3vw, 28px);
    background:
        radial-gradient(45% 60% at 18% 70%, rgb(56 189 248 / calc(8% + var(--glow-l, 0) * 30%)), transparent 70%),
        radial-gradient(45% 60% at 82% 70%, rgb(251 113 133 / calc(8% + var(--glow-r, 0) * 30%)), transparent 70%),
        radial-gradient(60% 70% at 50% 120%, rgb(61 139 255 / 24%), transparent 70%),
        linear-gradient(180deg, #10162b 0%, #1a2142 100%);
    isolation: isolate;
}

.hp-rig {
    position: relative;
    width: min(100%, 620px);
    aspect-ratio: 600 / 330;
    margin: 0 auto;
}
.hp-band { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 14px 16px rgb(0 0 0 / 40%)); }
.hp[data-style="earbuds"] .hp-band-overear { display: none; }


/* ---------- cups ---------- */

.hp-cup {
    --lvl: 0;
    --side: var(--hp-l);
    position: absolute; top: 36%; width: 27%; height: 60%;
    padding: 0; border: 0; background: none; cursor: pointer; color: #fff;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .25s ease, filter .25s ease;
}
.hp-cup--left { left: 2%; }
.hp-cup--right { right: 2%; --side: var(--hp-r); }
.hp-cup:focus-visible { outline: 3px solid #22d3ee; outline-offset: 6px; border-radius: 40px; }

.hp-art {
    position: relative; z-index: 1;
    width: 100%; height: 100%;
    filter: drop-shadow(0 18px 18px rgb(0 0 0 / 45%)) drop-shadow(0 0 calc(var(--lvl) * 22px) var(--side));
    transform: scale(calc(1 + var(--lvl) * .03));
    transition: transform .12s ease;
}
.hp .hp-art--earbud { display: none; }
.hp[data-style="earbuds"] .hp-art--overear { display: none; }
.hp[data-style="earbuds"] .hp-art--earbud { display: block; }
.hp-cup:hover .hp-art { transform: translateY(-3px) scale(calc(1 + var(--lvl) * .03)); }

.hp-driver, .hp-cap { transform-box: fill-box; transform-origin: center; }
.hp-driver { transform: scale(calc(1 + var(--lvl) * .08)); }
.hp-cap { transform: scale(calc(1 + var(--lvl) * .35)); }
.hp-ring { stroke: var(--side); stroke-opacity: calc(var(--lvl) * 1.2); }
.hp-led { fill: #3a4163; transition: fill .2s ease; }
.hp-cup.is-sounding .hp-led { fill: var(--side); }

.hp-halo {
    position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; z-index: 0;
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, var(--side) 0%, transparent 62%);
    opacity: calc(var(--lvl) * .75);
    transform: translate(-50%, -50%) scale(calc(.6 + var(--lvl) * .5));
}

.hp-waves { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 0; }
.hp-waves i {
    position: absolute; left: 0; top: 0;
    width: 180px; height: 180px; margin: -90px 0 0 -90px;
    border-radius: 50%; border: 2px solid var(--side);
    opacity: 0; transform: scale(.5);
}
.hp-cup.is-sounding .hp-waves i { animation: hp-ring 1.6s cubic-bezier(.2, .6, .3, 1) infinite; }
.hp-cup.is-sounding .hp-waves i:nth-child(2) { animation-delay: .53s; }
.hp-cup.is-sounding .hp-waves i:nth-child(3) { animation-delay: 1.06s; }
@keyframes hp-ring {
    0%   { opacity: calc(.1 + var(--lvl) * .9); transform: scale(.45); }
    100% { opacity: 0; transform: scale(1.5); }
}

.hp-cup-tag {
    position: absolute; z-index: 2; left: 50%; bottom: -6px; transform: translateX(-50%);
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--side); color: #0b1020; font-weight: 800; font-size: .9rem;
    box-shadow: 0 6px 14px -4px rgb(0 0 0 / 60%);
}

.hp[data-channel="left"]:not([data-test="imaging"]):not([data-test="polarity"]):not([data-test="blind"]) .hp-cup--right,
.hp[data-channel="right"]:not([data-test="imaging"]):not([data-test="polarity"]):not([data-test="blind"]) .hp-cup--left { opacity: .45; filter: grayscale(.7) brightness(.85); }

/* ---------- centre: play + image position ---------- */

.hp-center {
    position: absolute; left: 31%; right: 31%; top: 38%; bottom: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 18px);
}
.hp-play {
    position: relative; display: grid; place-items: center;
    width: clamp(58px, 11vw, 96px); aspect-ratio: 1;
    border: 0; border-radius: 50%; cursor: pointer; color: #fff;
    background: radial-gradient(circle at 35% 30%, #6aa9ff, var(--hp-accent) 55%, #2254c9);
    box-shadow: 0 16px 34px -10px rgb(61 139 255 / 70%), inset 0 -4px 10px rgb(0 0 0 / 22%), inset 0 3px 8px rgb(255 255 255 / 25%);
    transition: transform .15s ease;
}
.hp-play:hover { transform: translateY(-2px) scale(1.03); }
.hp-play:active { transform: scale(.95); }
.hp-play:focus-visible { outline: 3px solid #22d3ee; outline-offset: 5px; }
.hp-play svg { width: 36%; height: 36%; grid-area: 1 / 1; }
.hp-icon-stop { opacity: 0; }
.hp.is-playing .hp-icon-play { opacity: 0; }
.hp.is-playing .hp-icon-stop { opacity: 1; }
.hp-play-ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgb(106 169 255 / 55%); opacity: 0; }
.hp.is-playing .hp-play-ring { animation: hp-pulse 1.8s ease-out infinite; }
@keyframes hp-pulse { 0% { opacity: .8; transform: scale(.94); } 100% { opacity: 0; transform: scale(1.35); } }

.hp-image { width: 100%; display: flex; flex-direction: column; gap: 5px; color: #aeb8d6; }
.hp-image-label { text-align: center; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-image-track {
    --pan: 0;
    position: relative; height: 10px; border-radius: 999px;
    background: linear-gradient(90deg, rgb(56 189 248 / 45%), rgb(255 255 255 / 12%) 50%, rgb(251 113 133 / 45%));
}
.hp-image-tick { position: absolute; top: -3px; width: 2px; height: 16px; background: rgb(255 255 255 / 25%); border-radius: 2px; }
.hp-image-tick:nth-child(1) { left: 0; }
.hp-image-tick:nth-child(2) { left: calc(50% - 1px); }
.hp-image-tick:nth-child(3) { right: 0; }
.hp-image-dot {
    position: absolute; top: 50%; left: calc(50% + var(--pan) * 50%);
    width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / 18%), 0 0 16px rgb(255 255 255 / 70%);
    opacity: .25; transition: opacity .2s ease;
}
.hp.is-live .hp-image-dot { opacity: 1; }
.hp-image-ends { display: flex; justify-content: space-between; font-size: .66rem; }
.hp-image-ends b { font-weight: 600; }

/* ---------- meters ---------- */

.hp-meters {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px clamp(16px, 5vw, 60px);
    width: min(100%, 620px); margin: clamp(14px, 2.5vw, 24px) auto 0;
}
.hp-meter { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; color: #dfe5f7; font-size: .8rem; }
.hp-meter-name { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hp-meter-bar { height: 8px; border-radius: 999px; background: rgb(255 255 255 / 10%); overflow: hidden; }
.hp-meter-fill { display: block; height: 100%; border-radius: inherit; transform-origin: left center; transform: scaleX(0); }
.hp-meter--left .hp-meter-fill { background: linear-gradient(90deg, #0ea5e9, var(--hp-l)); }
.hp-meter--right .hp-meter-fill { background: linear-gradient(90deg, #e11d48, var(--hp-r)); }
.hp-meter-db { min-width: 54px; text-align: right; font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #aeb8d6; }

.hp-blind-veil {
    position: absolute; inset: 0; z-index: 5; display: none; place-items: center;
    background: rgb(16 22 43 / 82%); backdrop-filter: blur(10px);
    color: #fff; font-weight: 700; font-size: 1.05rem; text-align: center; padding: 20px;
}
.hp.is-blind .hp-blind-veil { display: grid; }

/* ---------- body ---------- */

.hp-body { padding: 18px clamp(14px, 3.5vw, 34px) 24px; }

.hp-tabs {
    display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
    border-radius: 16px; background: #f1f3f8; border: 1px solid var(--hp-line);
    overflow-x: auto; scrollbar-width: none;
}
.hp-tabs::-webkit-scrollbar { display: none; }
.hp-tabs button {
    flex: 1 0 auto; min-height: 42px; padding: 0 14px; border: 0; border-radius: 12px; cursor: pointer;
    background: transparent; color: var(--hp-muted); font-weight: 600; font-size: .9rem; white-space: nowrap;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.hp-tabs button:hover { color: var(--hp-ink); }
.hp-tabs button[aria-selected="true"] { background: #fff; color: var(--hp-ink); box-shadow: 0 1px 2px rgb(16 22 43 / 10%), 0 6px 14px -8px rgb(16 22 43 / 35%); }

.hp-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 20px; align-items: start; }

.hp-panel { display: flex; flex-direction: column; gap: 14px; animation: hp-fade .22s ease; }
.hp-panel[hidden] { display: none; }
@keyframes hp-fade { from { opacity: 0; transform: translateY(4px); } }
.hp-panel-title { font-size: 1.15rem; font-weight: 700; }
.hp-panel p { color: #3c4459; font-size: .95rem; line-height: 1.55; }
.hp-panel p.hp-small, .hp-small { font-size: .84rem; color: var(--hp-muted); }

.hp-checks { list-style: none; padding: 0; display: grid; gap: 8px; }
.hp-checks li { position: relative; padding: 10px 12px 10px 40px; border-radius: 14px; background: #f6f8fc; border: 1px solid var(--hp-line); font-size: .9rem; line-height: 1.5; color: #3c4459; }
.hp-checks li::before { content: ""; position: absolute; left: 13px; top: 13px; width: 16px; height: 16px; border-radius: 50%; background: #22c55e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.hp-list { padding-left: 20px; color: #3c4459; font-size: .93rem; line-height: 1.55; display: grid; gap: 6px; }

.hp-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hp-group-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hp-muted); }
.hp-safe { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #fff4e0; color: #9a5b00; letter-spacing: .02em; text-transform: none; font-size: .72rem; }

.hp-segmented { display: inline-flex; flex-wrap: wrap; align-self: flex-start; padding: 4px; gap: 4px; border-radius: 16px; background: #f1f3f8; border: 1px solid var(--hp-line); }
.hp-segmented button, .hp-chips button, .hp-positions button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 40px; padding: 0 14px; border: 0; border-radius: 12px; cursor: pointer;
    background: transparent; color: var(--hp-muted); font-weight: 600; font-size: .9rem; white-space: nowrap;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.hp-segmented button:hover, .hp-chips button:hover, .hp-positions button:hover { color: var(--hp-ink); }
.hp-segmented button[aria-checked="true"] { background: #fff; color: var(--hp-ink); box-shadow: 0 1px 2px rgb(16 22 43 / 10%), 0 6px 14px -8px rgb(16 22 43 / 35%); }
.hp-segmented button:disabled { opacity: .45; cursor: not-allowed; }

.hp-chips, .hp-positions { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-chips button, .hp-positions button { background: #fff; border: 1px solid var(--hp-line); color: var(--hp-ink); box-shadow: 0 3px 8px -6px rgb(16 22 43 / 40%); }
.hp-chips button[aria-checked="true"], .hp-positions button[aria-checked="true"] {
    background: linear-gradient(180deg, #5b9dff, var(--hp-accent)); border-color: transparent; color: #fff;
    box-shadow: 0 8px 18px -8px rgb(61 139 255 / 80%);
}
.hp-chips button:active, .hp-positions button:active { transform: scale(.95); }

.hp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hp-btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 42px; padding: 0 16px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--hp-line); background: #fff; color: var(--hp-ink); font-weight: 600; font-size: .9rem;
    box-shadow: 0 4px 10px -8px rgb(16 22 43 / 45%);
    transition: background-color .15s ease, transform .1s ease;
}
.hp-btn:hover { background: #f4f7ff; }
.hp-btn:active { transform: translateY(1px); }
.hp-btn svg { width: 18px; height: 18px; }
.hp-btn--primary { background: linear-gradient(180deg, #5b9dff, var(--hp-accent)); border-color: transparent; color: #fff; }
.hp-btn--primary:hover { background: linear-gradient(180deg, #4b90fb, #2f7af0); }
.hp-btn[aria-pressed="true"] { background: #10162b; color: #fff; border-color: #10162b; }
.hp-btn--small { min-height: 34px; padding: 0 12px; font-size: .8rem; }

.hp-result:empty { display: none; }
.hp-panel .hp-result { padding: 12px 14px; border-radius: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; font-weight: 600; }
.hp-panel .hp-result.is-bad { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }

.hp-quiz { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: #f6f8fc; border: 1px solid var(--hp-line); }
.hp-quiz[hidden] { display: none; }

/* frequency */
.hp-freq-read { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hp-freq-read output { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.hp-freq-read span { font-size: .85rem; font-weight: 600; color: var(--hp-muted); }
.hp-freq-slider { position: relative; padding: 0 0 26px; }
.hp-freq-slider input[type="range"] {
    -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 0; border-radius: 999px; cursor: pointer;
    background: linear-gradient(90deg, #7c3aed, #3d8bff 35%, #22d3ee 65%, #fbbf24 85%, #fb7185);
}
.hp-freq-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border-radius: 50%;
    background: #fff; border: 3px solid var(--hp-ink); box-shadow: 0 6px 14px -4px rgb(16 22 43 / 55%);
}
.hp-freq-slider input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--hp-ink); }
.hp-freq-slider input[type="range"]:focus-visible { outline: 3px solid var(--hp-accent); outline-offset: 6px; }
.hp-freq-scale { position: absolute; left: 15px; right: 15px; bottom: 0; height: 18px; }
.hp-freq-scale i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: .72rem; font-weight: 600; color: var(--hp-muted); }
.hp-freq-marker {
    position: absolute; top: -8px; bottom: 20px; width: 0; border-left: 2px dashed #f59e0b; pointer-events: none;
}
.hp-freq-marker b { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); margin-bottom: 2px; padding: 2px 7px; border-radius: 6px; background: #f59e0b; color: #fff; font-size: .7rem; white-space: nowrap; }

/* ---------- analyser ---------- */

.hp-scope {
    display: flex; flex-direction: column; gap: 12px; padding: 14px;
    border-radius: 20px; background: linear-gradient(180deg, #151b33, #10162b); color: #dfe5f7;
    box-shadow: 0 18px 34px -24px rgb(16 22 43 / 70%);
}
.hp-scope .hp-group-label { color: #93a0c4; }
.hp-scope-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hp-scope-badge { padding: 3px 10px; border-radius: 999px; background: rgb(255 255 255 / 10%); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.hp-scope-badge.is-in { background: rgb(52 245 166 / 18%); color: #6ff7bd; }
.hp-scope-badge.is-out { background: rgb(251 191 36 / 20%); color: #fcd34d; }
.hp-scope-row { display: grid; grid-template-columns: minmax(110px, 150px) 1fr; gap: 14px; align-items: center; }
.hp-gonio { position: relative; }
.hp-gonio canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; background: #0b0f1e; display: block; }
.hp-gonio-l, .hp-gonio-r { position: absolute; top: 6px; font-size: .7rem; font-weight: 800; }
.hp-gonio-l { left: 8px; color: var(--hp-l); }
.hp-gonio-r { right: 8px; color: var(--hp-r); }
.hp-readouts { display: grid; gap: 8px; }
.hp-readouts dt { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #93a0c4; }
.hp-readouts dd { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hp-spectrum { width: 100%; height: auto; aspect-ratio: 640 / 150; border-radius: 12px; background: #0b0f1e; display: block; }
.hp.is-blind .hp-scope canvas, .hp.is-blind .hp-readouts { filter: blur(12px); opacity: .5; }

/* ---------- controls ---------- */

.hp-controls {
    display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(200px, 280px); gap: 16px 26px; align-items: start;
    margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hp-line);
}
.hp-volume { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.hp-step {
    display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--hp-line); background: #fff; color: var(--hp-ink); box-shadow: 0 4px 10px -6px rgb(16 22 43 / 40%);
    transition: transform .12s ease, background-color .15s ease;
}
.hp-step svg { width: 18px; height: 18px; }
.hp-step:hover { background: #f4f7ff; }
.hp-step:active { transform: scale(.9); }
.hp-volume input[type="range"] {
    -webkit-appearance: none; appearance: none; flex: 1; min-width: 80px; height: 12px; margin: 0; border-radius: 999px; cursor: pointer;
    background: linear-gradient(90deg, #22c55e, #eab308 60%, #ef4444) 0 / var(--hp-volume) 100% no-repeat, #e3e7f1;
}
.hp-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%;
    background: #fff; border: 3px solid var(--hp-accent); box-shadow: 0 6px 14px -4px rgb(61 139 255 / 70%);
}
.hp-volume input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--hp-accent); }
.hp-volume input[type="range"]:focus-visible { outline: 3px solid var(--hp-accent); outline-offset: 6px; }
.hp-volume-value { min-width: 50px; text-align: right; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hp.is-loud .hp-volume-value { color: #c2410c; }

.hp-output { display: flex; gap: 8px; align-items: center; min-height: 48px; }
.hp-output select {
    flex: 1; min-width: 0; min-height: 42px; padding: 0 10px; border-radius: 12px;
    border: 1px solid var(--hp-line); background: #fff; color: var(--hp-ink); font-size: .88rem;
}
.hp-output select:disabled { background: #f4f6fa; color: var(--hp-muted); }
.hp-output-note { font-size: .78rem; color: var(--hp-muted); line-height: 1.4; }

.hp-tabs button:focus-visible, .hp-segmented button:focus-visible, .hp-chips button:focus-visible, .hp-positions button:focus-visible,
.hp-btn:focus-visible, .hp-step:focus-visible, .hp-styles button:focus-visible, .hp-output select:focus-visible { outline: 3px solid var(--hp-accent); outline-offset: 2px; }

.hp-status {
    margin-top: 18px; padding: 12px 16px; border-radius: 14px;
    background: #f4f7ff; border: 1px solid #dce6fb; font-weight: 600; color: #1d3a7a;
}
.hp-safety { display: flex; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: #fffaf0; border: 1px solid #fde7c2; color: #7a4a00; font-size: .86rem; line-height: 1.5; }
.hp-safety svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: #d97706; }
.hp-hint { margin-top: 10px; font-size: .9rem; color: var(--hp-muted); }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
    .hp-main { grid-template-columns: 1fr; }
    .hp-scope-row { grid-template-columns: 150px 1fr; }
    .hp-controls { grid-template-columns: 1fr 1fr; }
    .hp-group--volume { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 575.98px) {
    .hp { border-radius: 22px; margin-inline: -4px; }
    .hp-topbar { padding: 12px 14px; }
    .hp-styles { width: 100%; }
    .hp-styles button { flex: 1; }
    .hp-tabs { mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
    .hp-cup-tag { width: 24px; height: 24px; font-size: .75rem; bottom: -4px; }
    .hp-waves i { width: 110px; height: 110px; margin: -55px 0 0 -55px; }
    .hp-image-label { font-size: .58rem; }
    .hp-image-ends { font-size: .58rem; }
    .hp-meters { grid-template-columns: 1fr; gap: 8px; }
    .hp-controls { grid-template-columns: 1fr; }
    .hp-group--volume { grid-row: auto; }
    .hp-segmented { display: flex; align-self: stretch; }
    .hp-segmented button { flex: 1 1 auto; padding: 0 8px; }
    .hp-scope-row { grid-template-columns: 120px 1fr; }
    .hp-actions .hp-btn { flex: 1 1 auto; justify-content: center; }
}
@media (pointer: coarse) {
    .hp-segmented button, .hp-chips button, .hp-positions button, .hp-tabs button, .hp-btn, .hp-output select { min-height: 44px; }
    .hp-step { width: 44px; height: 44px; }
    .hp-styles button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .hp *, .hp *::before, .hp *::after { animation: none !important; transition: none !important; }
}
