.jh-speaker-region { position: absolute; z-index: 4; pointer-events: none; }
.jh-speaker-toggle {
  position: absolute; inset: 0; width: 100%; height: 100%; min-width: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: 12%; background: transparent; color: #111; cursor: pointer;
  pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.jh-speaker-toggle:focus-visible { outline: 2px solid #2b3bff; outline-offset: 5px; }
.jh-speaker-region .jh-speaker-indicator {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: auto; min-width: 38px; height: 34px;
  box-sizing: border-box; padding: 7px 9px; border-radius: 8px; max-width: none; line-height: 1; bottom: calc(100% + 18px);
}
.jh-speaker-indicator svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.jh-speaker-indicator .jh-music-note { display: none; width: 17px; height: 19px; }
.jh-music-note ellipse { fill: currentColor; stroke: none; }
.jh-speaker-indicator .jh-speaker-waves { display: none; }
.jh-speaker-region:is(:hover, :focus-within, [data-audio-state="playing"], [data-audio-state="starting"], [data-audio-state="paused"], [data-audio-state="error"]) .jh-speaker-indicator { opacity: 1; visibility: visible; }
.jh-speaker-region[data-audio-state="playing"] .jh-music-note,
.jh-speaker-region[data-audio-state="playing"] .jh-speaker-waves { display: block; }
.jh-speaker-region[data-audio-state="playing"] .jh-speaker-off { display: none; }
.jh-speaker-region[data-audio-state="starting"] .jh-speaker-indicator { opacity: .65; }
.jh-music-settings-toggle {
  position: absolute; right: -24px; top: -23px; z-index: 5; width: 44px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: #333;
  cursor: pointer; pointer-events: auto; touch-action: manipulation; opacity: .62;
}
.jh-music-settings-toggle svg { width: 14px; height: 14px; }
.jh-music-settings-toggle:hover, .jh-music-settings-toggle:focus-visible, .jh-music-settings-toggle[aria-expanded="true"] { opacity: 1; }
.jh-music-settings-toggle:focus-visible, .jh-music-settings button:focus-visible,
.jh-volume:focus-visible, .jh-music-file:focus-visible, .jh-music-save:focus-visible { outline: 2px solid #2b3bff; outline-offset: 3px; }
.jh-speaker-toggle:disabled { cursor: default; opacity: .5; }
.jh-music-settings {
  position: absolute; z-index: 60; left: clamp(152px, 81%, calc(100% - 152px)); top: 75%;
  transform: translate(-50%, -100%); width: 280px; max-width: calc(100% - 24px); max-height: min(470px, 70vh);
  box-sizing: border-box; overflow: auto; padding: 15px; border: 1px solid #d6dce1; border-radius: 12px;
  background: #fff; color: #24282b; box-shadow: 0 8px 25px rgba(35, 45, 55, .15);
  font: 400 13px/1.55 'IBM Plex Sans KR', 'Apple SD Gothic Neo', sans-serif;
}
.jh-music-settings[hidden] { display: none !important; }
.jh-music-settings-heading { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.jh-music-settings-heading h2 { margin: 0; color: #24282b; font: 500 14px/1.4 'IBM Plex Sans KR', sans-serif; }
.jh-music-settings-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -10px -10px -6px 0; padding: 0; border: 0; background: transparent; color: #555; cursor: pointer; }
.jh-music-settings-close svg { width: 16px; height: 16px; }
.jh-music-scope { margin: 10px 0 0; color: #71777b; font-size: 11px; }
.jh-music-current { margin: 1px 0 9px; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.jh-volume-label { display: flex; align-items: center; gap: 12px; }
.jh-volume { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: #333; cursor: pointer; }
.jh-music-file-label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 7px 0 6px; border: 1px solid #d9dee1; border-radius: 5px; background: #f7f9fa; cursor: pointer; }
.jh-music-file-label small { margin-left: 5px; color: #72787c; font-size: 11px; }
.jh-music-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.jh-music-file-label:focus-within { outline: 2px solid #2b3bff; outline-offset: 3px; }
.jh-music-save-label { display: flex; align-items: center; gap: 7px; min-height: 34px; cursor: pointer; }
.jh-music-save { width: 16px; height: 16px; margin: 0; accent-color: #333; }
.jh-music-local-note { margin: 3px 0 7px; color: #70767b; font-size: 11px; line-height: 1.65; }
.jh-music-reset { min-height: 40px; padding: 4px 0; border: 0; background: transparent; color: #333; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.jh-music-feedback { margin: 5px 0; font-size: 12px; color: #4c5f69; overflow-wrap: anywhere; }
.jh-music-feedback:empty { display: none; }
.jh-music-network { margin: 7px 0 0; font-size: 11px; color: #70767b; }
.jh-music-network[hidden] { display: none; }
.jh-music-credit { margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf0f2; color: #787d81; font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.jh-music-credit p { margin: 0; }
.jh-music-credit a { color: inherit; text-underline-offset: 2px; }
.jh-hero-scene.is-playing [data-speaker-pulse] { transform-box: fill-box; transform-origin: center; animation: jh-speaker-breathe 2.8s ease-in-out infinite; }
@keyframes jh-speaker-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.018); } }
@media (max-width: 640px) {
  .jh-music-settings { position: fixed; left: 50%; top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-height: calc(100dvh - 32px); }
}
@media (prefers-reduced-motion: reduce) { .jh-hero-scene.is-playing [data-speaker-pulse] { animation: none; } }
