/* Reflow instead of suppressing Android's accessibility text scaling. */
.fhg,.fhg *,.fhg *::before,.fhg *::after{box-sizing:border-box}
.fhg :is(header,section,article,nav,form,label,div){min-width:0}
.fhg :is(h1,h2,h3,h4,h5,h6,p,label,button,a,strong,small,span){overflow-wrap:anywhere}
.fhg :is(input,select,textarea){max-width:100%;min-width:0}
.fhg button{height:auto;white-space:normal;line-height:1.65;flex-shrink:1}
.fhg :is(svg,img,canvas){max-width:100%}
.fhg :is(.fhg-hero-content,.fhg-hero-bottom,.fhg-current-head,.fhg-section-title,.fhg-filters,.fhg-prog-actions,.fhg-melody-actions){flex-wrap:wrap;gap:12px}
.fhg :is(.fhg-families,.fhg-scale-types,.fhg-chord-tabs){display:flex;flex-wrap:wrap;white-space:normal;overflow:visible}
.fhg :is(.fhg-scale-card,.fhg-chord-card){min-width:0;height:auto}
.fhg .fhg-dialog{width:min(760px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;margin:auto}
.fhg .fhg-dialog[data-mode=auth] .fhg-modal-content h3{white-space:normal}
.fhg .fhg-user-sidebar{width:min(360px,calc(100vw - 24px));max-height:100dvh;overflow-y:auto}
.fhg .fhg-user-sidebar:not(.is-open){pointer-events:none}
.fhg .fhg-hero-content>div{min-width:0;max-width:100%}
.fhg .fhg-hero-content h2{white-space:normal}
.fhg .fhg-bottom-nav{width:min(340px,calc(100vw - 52px));grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:7px;border-radius:23px;overflow:visible}
.fhg .fhg-bottom-nav button{width:min(100%,52px);height:auto;min-width:0;min-height:0;aspect-ratio:1;justify-self:center}
.fhg .fhg-bottom-nav button{position:relative;transition:transform .25s ease,background .25s ease,color .25s ease,border-radius .25s ease}
.fhg .fhg-bottom-nav button.is-active{transform:translateY(-14px);border-radius:50%;background:var(--fhg-accent,#5b4bdb);color:#fff;box-shadow:0 8px 18px color-mix(in srgb,var(--fhg-accent,#5b4bdb) 38%,transparent)}
.fhg .fhg-bottom-nav button.is-active::after{content:"";position:absolute;inset:-4px;border:2px solid color-mix(in srgb,var(--fhg-accent,#5b4bdb) 48%,transparent);border-radius:50%;pointer-events:none}
.fhg .fhg-bottom-nav button:hover:not(.is-active){transform:translateY(-3px)}
html[data-theme=dark] .fhg .fhg-bottom-nav button.is-active{background:var(--fhg-accent,#5b4bdb);color:#fff}
.fhg .fhg-guitar-dot.is-open{fill:var(--panel,#fff);stroke:var(--fhg-accent,#5b4bdb);stroke-width:2}
.fhg .fhg-guitar-note.is-open{fill:var(--text,#172420)}
.fhg .fhg-device-table{max-width:100%;overflow-wrap:anywhere}
.fhg .fhg-device-table table{width:100%;min-width:0;table-layout:fixed}
.fhg .fhg-device-table :is(td,th){white-space:normal;overflow-wrap:anywhere}
.fhg .fhg-otp{min-width:0;gap:clamp(2px,1vw,8px);grid-template-columns:repeat(var(--otp-digits,6),minmax(0,1fr))}
.fhg .fhg-otp input{min-width:0;width:100%;padding-inline:0}
.fhg .fhg-modal-actions,.fhg .fhg-account-actions{flex-wrap:wrap;max-width:100%}
.fhg .fhg-dialog[data-mode=account]{max-height:calc(100dvh - 24px);overflow-y:auto}
.fhg .fhg-guitar-positions{flex-wrap:wrap;max-width:100%}
.fhg .fhg-guitar-picker{flex-wrap:wrap}
.fhg .fhg-view-scale-chords{display:flex;align-items:center;justify-content:center;gap:12px;width:min(100%,360px);margin:22px auto 4px;border-radius:16px}
.fhg-guitar-drawer{margin:18px 0;border:1px solid var(--line);border-radius:17px;background:var(--panel);overflow:hidden}
.fhg-guitar-drawer>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 17px;color:var(--text);font-weight:700;cursor:pointer;list-style:none}
.fhg-guitar-drawer>summary::-webkit-details-marker{display:none}
.fhg-guitar-drawer>summary span{font-size:22px;line-height:1;transition:transform .2s}
.fhg-guitar-drawer[open]>summary span{transform:rotate(180deg)}
.fhg-guitar-drawer .fhg-guitar{margin:0 12px 12px}
.fhg-chord-piano{margin:18px 0;padding:14px;border:1px solid var(--line);border-radius:17px;background:var(--panel)}
.fhg-chord-piano h4{margin:0 0 12px;color:var(--text);font-size:14px}
.fhg-chord-piano p{margin:9px 0 0!important;color:var(--muted)!important;font-size:11px!important;text-align:right!important}
.fhg-chord-keyboard{position:relative;display:block;width:100%;height:116px;border:3px solid var(--line);border-radius:10px;overflow:hidden;background:var(--line)}
.fhg-chord-key{position:absolute;left:calc(var(--pos)*100%/var(--white-count));display:flex;align-items:flex-end;justify-content:center;padding:0 1px;border-radius:0 0 4px 4px;overflow:hidden}
.fhg-chord-key.is-white{z-index:1;width:calc(100%/var(--white-count));height:100%;border:1px solid #899b9b;background:#f7faf9;color:#254d48}
.fhg-chord-key.is-black{z-index:2;width:calc(100%/var(--white-count)*.62);height:64%;border:1px solid #14242b;background:#25323a;color:#fff}
.fhg-chord-key.is-note.is-white{background:color-mix(in srgb,var(--fhg-accent,#5b4bdb) 44%,white)}
.fhg-chord-key.is-note.is-black{background:var(--fhg-accent,#5b4bdb)}
.fhg-chord-key.is-bass{background:#e9a445!important;color:#17222b!important}
.fhg-chord-quarter-marker{position:absolute;z-index:4;top:4px;display:grid;place-items:center;width:16px;height:16px;transform:translateX(-50%);border:1px solid #fff;border-radius:50%;background:var(--fhg-accent,#5b4bdb);color:#fff;font-size:10px;line-height:1}
.fhg-chord-quarter-marker.is-bass{background:#e9a445;color:#17222b}
.fhg-chord-key>span{font-size:clamp(8px,2.2vw,11px);font-weight:700;line-height:1.1;margin-bottom:7px;white-space:nowrap}
.fhg-update-backdrop{position:fixed;z-index:99998;inset:0;display:grid;place-items:center;padding:18px;background:#07121ac2;backdrop-filter:blur(5px)}
.fhg-update-dialog{position:relative;z-index:99999;width:min(420px,100%);padding:24px;border:1px solid var(--line);border-radius:22px;background:var(--panel);color:var(--text);box-shadow:0 24px 70px #0005;text-align:center}
.fhg-update-dialog h3{margin:0 0 10px;font-size:20px!important}.fhg-update-dialog p{margin:0 0 22px;white-space:pre-wrap;line-height:1.9;color:var(--muted)}
.fhg-update-dialog .fhg-update-close{position:absolute;top:10px;left:10px;display:grid;place-items:center;width:32px;height:32px;min-height:0;padding:0;border-radius:50%;font-size:21px}
.fhg-update-dialog .fhg-update-action{display:block;width:100%;padding:10px 14px;border-radius:12px;text-decoration:none;background:var(--fhg-accent,#5b4bdb);color:#fff}
.fhg-update-dialog .fhg-update-action:hover{filter:brightness(1.1)}
@media(max-width:900px), (max-height:500px){
 .fhg h1{font-size:min(var(--fhg-h1-size,34px),clamp(22px,4.8vw,28px))!important}
 .fhg h2{font-size:min(var(--fhg-h2-size,30px),clamp(20px,4.5vw,25px))!important}
 .fhg h3{font-size:min(var(--fhg-h3-size,25px),clamp(18px,4vw,22px))!important}
 .fhg h4{font-size:min(var(--fhg-h4-size,21px),20px)!important}
 .fhg h5{font-size:min(var(--fhg-h5-size,18px),18px)!important}
 .fhg h6{font-size:min(var(--fhg-h6-size,16px),16px)!important}
 .fhg :is(.fhg-prog-controls,.fhg-melody-controls){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:12px}
 .fhg :is(.fhg-prog-controls,.fhg-melody-controls) label{width:auto}
 .fhg :is(.fhg-scale-grid,.fhg-chord-grid){grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}
 .fhg .fhg-body{padding:12px}
 .fhg :is(.fhg-picker,.fhg-detail,.fhg-progression,.fhg-melody){padding:16px}
 .fhg .fhg-hero-content{padding-top:16px}
 .fhg .fhg-plan{display:flex;flex-direction:column;align-items:stretch;text-align:start}
 .fhg .fhg-plan button{width:100%}
 .fhg .fhg-plans-grid{grid-template-columns:minmax(0,1fr)}
 .fhg .fhg-account-overview{grid-template-columns:minmax(0,1fr)}
}
@media(max-height:500px){
 .fhg .fhg-dialog{max-height:calc(100dvh - 16px)}
 .fhg .fhg-hero{padding-top:12px}
}
@media(max-width:600px){
 .fhg .fhg-note-row{display:grid;grid-template-columns:repeat(var(--fhg-note-count,7),minmax(0,1fr));gap:clamp(2px,.7vw,5px);width:100%;min-width:0;overflow:visible}
 .fhg .fhg-note-row button{min-width:0;width:100%;padding:5px 1px;font-size:clamp(8px,2.4vw,11px)}
 .fhg .fhg-chord-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .fhg .fhg-chord-grid .fhg-chord{min-width:0;padding:7px 4px;font-size:clamp(8px,2.45vw,11px)}
 .fhg .fhg-chord-grid .fhg-chord-meta{flex-wrap:wrap}
 .fhg .fhg-bottom-nav{width:min(330px,calc(100vw - 48px));grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;padding:6px}
 .fhg .fhg-bottom-nav button{width:min(100%,48px);height:auto;min-height:0;aspect-ratio:1}
 .fhg .fhg-scale-types,.fhg .fhg-chord-tabs,.fhg .fhg-guitar-positions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;max-width:100%;overflow:visible;padding:4px 0 8px}
 .fhg .fhg-scale-types button,.fhg .fhg-chord-tabs button,.fhg .fhg-guitar-position{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-width:0;min-height:44px;padding:8px 6px;border:1px solid var(--line);border-radius:13px;background:var(--panel);font-size:clamp(10px,2.7vw,12px);text-align:center;white-space:normal;line-height:1.45}
 .fhg .fhg-chord-tabs button[aria-pressed=true],.fhg .fhg-scale-types button[aria-pressed=true],.fhg .fhg-guitar-position.is-active{border-color:var(--fhg-accent,#5b4bdb);background:color-mix(in srgb,var(--fhg-accent,#5b4bdb) 17%,var(--panel));color:var(--text);box-shadow:0 3px 12px #0002}
 .fhg .fhg-guitar-picker{display:block}
 .fhg .fhg-guitar-picker>span{display:block;margin-bottom:7px}
 .fhg .fhg-filters{display:grid;grid-template-columns:1fr;gap:10px}
 .fhg .fhg-filters label{width:100%;justify-content:space-between}
 .fhg .fhg-filters select{flex:1;max-width:68%}
 .fhg-chord-keyboard{height:95px}
}
@media(prefers-reduced-motion:reduce){.fhg .fhg-bottom-nav button{transition:none}}
.fhg-submode-drawer,.fhg-chord-types-drawer{margin:12px 0;border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:0 12px}
.fhg-submode-drawer>summary,.fhg-chord-types-drawer>summary{padding:12px 2px;cursor:pointer;font-weight:700;list-style:none;display:flex;justify-content:space-between;align-items:center}
.fhg-submode-drawer>summary::-webkit-details-marker,.fhg-chord-types-drawer>summary::-webkit-details-marker{display:none}
.fhg-submode-drawer[open]>summary span,.fhg-chord-types-drawer[open]>summary span{transform:rotate(180deg)}
.fhg-guitar-stepper{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:8px;text-align:center;margin:14px 0}
.fhg-guitar-stepper button{min-height:44px;padding:0;font-size:22px}.fhg-guitar-stepper strong{font-size:13px}
.fhg-chord-key.is-bass{background:inherit!important;color:inherit!important}.fhg-chord-quarter-marker.is-bass{background:var(--fhg-accent,#5b4bdb);color:#fff}
.fhg .fhg-modal-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}.fhg .fhg-modal-actions>:is(button,a){display:grid;place-items:center;min-height:44px;text-decoration:none;font-size:20px;padding:6px!important}
.fhg-payment-section{margin:16px 0 24px}.fhg-payment-section h4{margin:0 0 12px}.fhg-payment-list{display:grid;gap:10px}.fhg-payment-card{min-width:0;display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:15px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}.fhg-payment-card>div{display:flex;flex-direction:column;gap:5px}.fhg-payment-card small{color:var(--muted);font-size:11px}.fhg-payment-status{display:inline-block;border-radius:20px;background:#6b7280;color:#fff;padding:3px 9px;font-size:11px}.fhg-payment-status.is-paid,.fhg-payment-status.is-completed{background:#167a4a}.fhg-payment-status.is-failed,.fhg-payment-status.is-cancelled{background:#ad3f4a}.fhg-payment-status.is-pending,.fhg-payment-status.is-created{background:#a87012}
.fhg-device-remove{font-size:24px!important;min-width:38px;min-height:38px!important;padding:0!important;border-radius:50%!important;color:#f47b8e!important}
@media(max-width:600px){.fhg .fhg-plans-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.fhg .fhg-plan{min-width:0;margin:0;padding:10px;display:flex;flex-direction:column;gap:6px}.fhg .fhg-plan h4{font-size:clamp(12px,3.1vw,15px)!important;line-height:1.5}.fhg .fhg-plan-price strong{font-size:clamp(12px,3.2vw,16px)}.fhg .fhg-plan>button[data-buy]{width:100%;min-width:0;margin-top:auto}.fhg .fhg-chord-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.fhg .fhg-chord-grid .fhg-chord{min-height:0;display:grid;place-items:center;padding:7px 3px;aspect-ratio:1.4;overflow:hidden}.fhg .fhg-chord-grid .fhg-symbol{font-size:clamp(10px,2.9vw,16px);line-height:1.2;text-align:center}.fhg .fhg-payment-card{display:grid;grid-template-columns:minmax(0,1fr) auto}.fhg .fhg-payment-card>small{grid-column:1/-1}}
@media(max-width:350px){.fhg .fhg-chord-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.fhg .fhg-plans-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 1.1.1: keep scale variants visible and the selected scale unmistakable. */
.fhg-submode-picker{display:flex;align-items:center;gap:12px;margin:12px 0;color:var(--text);font-weight:700}
.fhg-submode-picker[hidden]{display:none}
.fhg-submode-picker>span{flex:0 0 auto}
.fhg .fhg-scale-type-select{flex:1;max-width:360px;min-width:0;border:1px solid var(--line);border-radius:13px;background:var(--panel);color:var(--text);font-weight:700}
.fhg .fhg-scale-type-select[hidden]{display:none!important}
.fhg .fhg-submode-menu{position:relative;flex:1;min-width:0;max-width:360px}
.fhg .fhg-submode-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:46px;padding:9px 13px;border:1px solid var(--line);border-radius:13px;background:var(--panel);color:var(--text);cursor:pointer;list-style:none}
.fhg .fhg-submode-trigger::-webkit-details-marker{display:none}
.fhg .fhg-submode-trigger>span{display:flex;align-items:center;gap:8px;min-width:0}
.fhg .fhg-submode-trigger>svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;flex:none;transition:transform .2s}
.fhg .fhg-submode-menu[open] .fhg-submode-trigger>svg{transform:rotate(180deg)}
.fhg .fhg-submode-options{position:absolute;z-index:120;top:calc(100% + 6px);right:0;left:0;max-height:min(50vh,330px);overflow-y:auto;padding:6px;border:1px solid var(--line);border-radius:13px;background:var(--panel);box-shadow:0 14px 34px #0003}
.fhg .fhg-submode-options>button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:42px;padding:7px 10px;border:0;border-radius:9px;background:transparent;color:var(--text);text-align:right;font:inherit;cursor:pointer}
.fhg .fhg-submode-options>button:hover,.fhg .fhg-submode-options>button[aria-selected=true]{background:color-mix(in srgb,var(--fhg-accent,#5b4bdb) 12%,var(--panel))}
.fhg .fhg-submode-options .fhg-lock,.fhg .fhg-submode-trigger .fhg-lock{flex:none}
.fhg .fhg-scale-card[aria-pressed="true"]{background:var(--fhg-accent,#5b4bdb)!important;border-color:var(--fhg-accent,#5b4bdb)!important;color:#fff!important;box-shadow:0 7px 20px color-mix(in srgb,var(--fhg-accent,#5b4bdb) 32%,transparent)}
.fhg .fhg-scale-card[aria-pressed="true"] :is(b,span,small,em){color:#fff!important}
.fhg .fhg-scale-card[aria-pressed="true"]>b{background:#ffffff22!important;border-color:#ffffff72!important}

/* The scale piano uses one highlight and one neutral key color, regardless of tonic. */
.fhg .fhg-keyboard :is(.fhg-white,.fhg-black,.fhg-white.fhg-key-root,.fhg-black.fhg-key-root){background:var(--fhg-key-neutral,#d3d9de);color:#18313b}
.fhg .fhg-keyboard :is(.fhg-white,.fhg-black).fhg-in-scale{background:var(--fhg-accent,#5b4bdb);color:#fff}
.fhg .fhg-keyboard .fhg-key:hover,.fhg .fhg-keyboard .fhg-key:active{filter:brightness(.9)}
html[data-theme="dark"] .fhg{--fhg-key-neutral:#4b5964}
html[data-theme="dark"] .fhg .fhg-keyboard :is(.fhg-white,.fhg-black):not(.fhg-in-scale){color:#fff}

.fhg .fhg-hero-content{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:clamp(9px,2vw,20px)}
.fhg .fhg-menu-toggle{position:static!important;flex:0 0 44px;margin:0;align-self:center}
.fhg .fhg-hero-content>div:first-of-type{flex:1;min-width:0}
.fhg .fhg-hero-content h2{margin:0;white-space:normal!important;overflow-wrap:normal}
.fhg .fhg-hero-mark{margin-right:auto}
.fhg .fhg-modal-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.fhg .fhg-modal-actions>:is(button,a){width:100%!important;height:48px!important;min-height:48px!important;margin:0!important;box-sizing:border-box;border-radius:12px}
.fhg .fhg-modal-actions .fhg-midi-download svg{width:29px;height:29px;display:block}
.fhg .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.fhg .fhg-search:focus-within{outline:0!important;box-shadow:none!important;border-color:var(--line)!important}
.fhg .fhg-search input:focus,.fhg .fhg-search input:focus-visible{outline:0!important;box-shadow:none!important;border:0!important}
@media(max-width:600px){
 .fhg .fhg-scale-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .fhg .fhg-scale-card{min-height:66px;padding:7px 5px;gap:4px;flex-direction:column;justify-content:center;text-align:center}
 .fhg .fhg-scale-card>b{width:auto;height:auto;min-height:27px;padding:1px 5px;font-size:clamp(12px,3.5vw,18px)}
 .fhg .fhg-scale-card>span{font-size:clamp(9px,2.4vw,11px)}
 .fhg .fhg-scale-card small{font-size:clamp(8px,2.1vw,10px);line-height:1.3}
 .fhg .fhg-hero-content{padding-top:0;gap:10px}
 .fhg .fhg-hero-content h2{font-size:clamp(16px,4.2vw,24px)!important;line-height:1.45}
 .fhg .fhg-hero-mark{display:none}
 .fhg-submode-picker{display:grid;gap:5px}
 .fhg .fhg-submode-menu{max-width:none;width:100%}
}
@media(max-width:340px),(min-resolution:2dppx) and (max-width:370px){.fhg .fhg-scale-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 1.1.2: scroll-aware header, accessible controls and compact transport. */
.fhg .fhg-hero{z-index:80;transition:transform .22s ease,box-shadow .22s ease}
.fhg .fhg-hero.is-scroll-hidden{transform:translateY(-110%)}
.fhg .fhg-hero.is-scroll-compact{position:fixed;top:0;inset-inline:0;width:100%;min-height:0!important;padding-top:8px!important;padding-bottom:8px!important;box-shadow:0 8px 24px #0003}
.fhg .fhg-hero.is-scroll-compact :is(.fhg-header-spacer,.fhg-tool-nav,.fhg-hero-bottom,.fhg-hero-mark){display:none!important}
.fhg .fhg-hero.is-scroll-compact .fhg-hero-content{padding:0!important}
.fhg .fhg-hero.is-scroll-compact h2{font-size:clamp(15px,3vw,21px)!important;line-height:1.4}
.fhg :is(button,input,select,textarea,a,summary):focus,.fhg :is(button,input,select,textarea,a,summary):focus-visible,.fhg :is(button,input,select,textarea,a,summary):active{outline:none!important;box-shadow:none!important}
.fhg .fhg-scale-type-select:focus,.fhg .fhg-scale-type-select:focus-visible{border-color:var(--line)!important}
.fhg .fhg-keyboard :is(.fhg-white,.fhg-black).fhg-in-scale{background:#fff!important;color:#17212b!important}
.fhg .fhg-keyboard :is(.fhg-white,.fhg-black):not(.fhg-in-scale){background:#c8ced3!important;color:#26323b!important}
.fhg .fhg-only-label{justify-content:flex-start!important;gap:3px!important}
.fhg .fhg-only-label input{margin:0!important}
.fhg .fhg-families button[aria-pressed="true"]{background:var(--fhg-accent,#5b4bdb)!important;color:#fff!important;border-color:var(--fhg-accent,#5b4bdb)!important;font-weight:800}
.fhg .fhg-scale-card{min-width:0}.fhg .fhg-scale-card>b{padding-inline:8px}.fhg .fhg-scale-card span,.fhg .fhg-scale-card small{min-width:0}.fhg .fhg-scale-card small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fhg .fhg-modal-actions button.fhg-audio-loading::after{display:none!important}
.fhg .fhg-inversion-buttons{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}.fhg .fhg-inversion-buttons button{min-height:38px;padding:6px 12px}.fhg .fhg-inversion-buttons button[aria-pressed="true"]{background:var(--fhg-accent,#5b4bdb);color:#fff;border-color:var(--fhg-accent,#5b4bdb)}
.fhg .fhg-melody-transport{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;margin-bottom:10px}.fhg .fhg-melody-transport>:is(button,a){display:grid;place-items:center;height:48px;min-height:48px!important;padding:6px!important;border-radius:12px;text-decoration:none;font-size:20px}
.fhg .fhg-melody-transport svg{width:25px;height:25px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fhg .fhg-payment-card{font-size:clamp(11px,2.8vw,15px);overflow-wrap:anywhere}.fhg .fhg-payment-card>*{min-width:0}.fhg .fhg-payment-card b{font-size:clamp(11px,2.8vw,15px)}
.fhg .fhg-account-overview article{min-width:0;overflow-wrap:anywhere}.fhg .fhg-account-overview strong{min-width:0;max-width:100%;font-size:clamp(12px,3vw,17px);line-height:1.6;overflow-wrap:anywhere}
@media(max-width:600px){.fhg .fhg-scale-card>b{padding:2px 9px}.fhg .fhg-payment-card{grid-template-columns:minmax(0,1fr)!important}.fhg .fhg-payment-card>small{grid-column:auto}}
@media(prefers-reduced-motion:reduce){.fhg .fhg-hero{transition:none}}

/* 1.1.5: natural piano colors, deliberate highlights and stable controls. */
.fhg .fhg-keyboard :is(.fhg-white,.fhg-white.fhg-key-root,.fhg-white.fhg-in-scale){background:#fff!important;color:#17212b!important;border-color:#b8c2c7!important}
.fhg .fhg-keyboard :is(.fhg-black,.fhg-black.fhg-key-root,.fhg-black.fhg-in-scale){background:#171b22!important;color:#fff!important;border-color:#090c10!important}
.fhg .fhg-keyboard .fhg-key.fhg-in-scale{box-shadow:inset 0 -9px 0 rgba(91,75,219,.5)!important}
.fhg .fhg-keyboard .fhg-key.fhg-key-root{box-shadow:inset 0 -9px 0 rgba(91,75,219,.62)!important}
.fhg .fhg-note-row b{white-space:nowrap;overflow-wrap:normal;word-break:keep-all;max-width:100%;font-size:clamp(12px,4vw,20px)}
.fhg .fhg-scale-card{position:relative}
.fhg .fhg-scale-card>.fhg-lock{position:absolute;top:5px;left:5px;z-index:1;font-style:normal;font-size:10px;line-height:1;padding:4px 5px;border-radius:7px;background:color-mix(in srgb,var(--fhg-accent,#5b4bdb) 12%,var(--panel));color:var(--text);white-space:nowrap}
.fhg .fhg-scale-card[aria-pressed="true"]>.fhg-lock{background:#ffffff30;color:#fff}
.fhg .fhg-melody-controls label:has(.fhg-melody-density),.fhg .fhg-melody-controls label:has(.fhg-melody-rhythm),.fhg .fhg-melody-controls label:has(.fhg-melody-range){display:none!important}
.fhg .fhg-melody-transport{align-items:stretch}
.fhg .fhg-melody-transport>:is(button,a){width:100%!important;box-sizing:border-box;margin:0!important;align-self:stretch;line-height:1;vertical-align:middle}
.fhg .fhg-device-limit-list.fhg-device-table{margin:12px 0;max-height:40dvh;overflow:auto}
.fhg .fhg-device-limit-list.fhg-device-table table{min-width:0;width:100%;table-layout:fixed}
.fhg .fhg-device-limit-list.fhg-device-table :is(td,th){padding:8px 5px;font-size:clamp(10px,2.6vw,13px);overflow-wrap:anywhere}
.fhg .fhg-device-limit-list.fhg-device-table th:nth-child(2),.fhg .fhg-device-limit-list.fhg-device-table td:nth-child(2){width:34%}
.fhg .fhg-email-verification{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:12px;border:1px solid #63b499;border-radius:12px;background:#e8f7f0}
.fhg .fhg-email-verification>div{display:grid;gap:4px;min-width:0}.fhg .fhg-email-verification strong{font-size:12px;overflow-wrap:anywhere}.fhg .fhg-email-verification small{color:#467665;line-height:1.7}.fhg .fhg-email-verification button{flex:0 0 auto}
html[data-theme=dark] .fhg .fhg-email-verification{background:#12362d;border-color:#367c65}html[data-theme=dark] .fhg .fhg-email-verification small{color:#b7d9ca}
.fhg .fhg-user-sidebar>.fhg-sidebar-account{padding:18px;background:linear-gradient(135deg,#f2faff,#ebf8f1);border:1px solid #cbe6d7;box-shadow:0 12px 28px #1b62531a;gap:13px}
html[data-theme=dark] .fhg .fhg-user-sidebar>.fhg-sidebar-account{background:linear-gradient(135deg,#172b3b,#102e27);border-color:#2b6253;box-shadow:0 12px 28px #0005}
.fhg .fhg-sidebar-identity{display:flex;align-items:center;gap:12px;min-width:0}.fhg .fhg-sidebar-identity>div{display:grid;gap:3px;min-width:0}.fhg .fhg-sidebar-identity strong{font-size:clamp(14px,3.6vw,18px);line-height:1.5;overflow-wrap:anywhere}.fhg .fhg-sidebar-identity small{font-size:12px;color:#6a827b;text-align:right}.fhg .fhg-sidebar-avatar{flex:0 0 48px;width:48px;height:48px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(135deg,#5b4bdb,#208d77);color:#fff;font-size:25px;box-shadow:0 8px 16px #5b4bdb33}
html[data-theme=dark] .fhg .fhg-sidebar-identity small{color:#c0d3ce}
.fhg .fhg-sidebar-membership{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 11px;border-radius:10px;background:#ffffff88;font-size:11px}.fhg .fhg-sidebar-membership strong{font-size:12px;white-space:nowrap}
html[data-theme=dark] .fhg .fhg-sidebar-membership{background:#ffffff12}
.fhg .fhg-sidebar-subscription{padding:12px;border-radius:13px;background:linear-gradient(110deg,#dbf8e5,#bbebd0);color:#146846}.fhg .fhg-sidebar-subscription>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px}.fhg .fhg-sidebar-subscription strong{font-size:12px;white-space:nowrap}.fhg .fhg-sidebar-progress{height:9px;margin-top:11px;border-radius:999px;background:#12784d33;overflow:hidden}.fhg .fhg-sidebar-progress>span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#179963,#78de9b,#179963);background-size:200% 100%;animation:fhg-subscription-glow 3s linear infinite;transition:width .4s ease}
html[data-theme=dark] .fhg .fhg-sidebar-subscription{background:linear-gradient(110deg,#18472d,#26603f);color:#e4fff1}html[data-theme=dark] .fhg .fhg-sidebar-progress{background:#ffffff25}
.fhg .fhg-sidebar-no-sub{font-size:11px;color:#7a5c3e;padding:8px 0}.fhg .fhg-resume-purchase{width:100%;white-space:normal;line-height:1.7}
@keyframes fhg-subscription-glow{to{background-position:200% 0}}
@media(prefers-reduced-motion:reduce){.fhg .fhg-sidebar-progress>span{animation:none}}
.fhg .fhg-scale-card>b{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;word-break:keep-all;overflow-wrap:normal;min-width:42px;width:max-content;height:auto;min-height:40px;padding:4px 7px;line-height:1.15}
@media(max-width:600px){.fhg .fhg-scale-card>b{min-width:35px;min-height:30px;padding:2px 6px}}
.fhg .fhg-profile-form>label:has([name=email]){grid-column:1/-1}
.fhg .fhg-dialog[data-mode=auth][open]{position:fixed;inset:auto!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%);width:min(420px,calc(100vw - 28px));height:min-content!important;min-height:0!important;max-height:calc(100dvh - 28px);margin:0!important;padding:clamp(18px,4vw,28px);border:1px solid color-mix(in srgb,var(--fhg-accent,#5b4bdb) 35%,transparent);border-radius:26px;box-shadow:0 30px 90px #06101c78;background:linear-gradient(160deg,color-mix(in srgb,var(--fhg-accent,#5b4bdb) 9%,var(--panel)),var(--panel))}
.fhg .fhg-dialog[data-mode=auth] .fhg-modal-top{direction:rtl;display:flex;justify-content:space-between;min-height:42px;margin-bottom:8px}
.fhg .fhg-dialog[data-mode=auth] .fhg-modal-top span{display:none!important}
.fhg .fhg-dialog[data-mode=auth] .fhg-modal-top :is(.fhg-auth-back,.fhg-close){width:40px;height:40px;min-height:40px;padding:0;display:grid;place-items:center;border-radius:13px;background:color-mix(in srgb,var(--fhg-accent,#5b4bdb) 10%,var(--panel));border:1px solid color-mix(in srgb,var(--fhg-accent,#5b4bdb) 20%,transparent);color:var(--text);font-size:24px;line-height:1}
.fhg .fhg-dialog[data-mode=auth] .fhg-auth-back svg{width:26px;height:26px}
.fhg .fhg-dialog[data-mode=auth] .fhg-auth-back[hidden]{visibility:hidden!important;display:grid!important;pointer-events:none}
.fhg .fhg-dialog[data-mode=auth] .fhg-modal-content>h3{margin:4px 0 24px;text-align:right;font-size:clamp(22px,5vw,29px);font-weight:800;color:var(--text)}
.fhg .fhg-dialog[data-mode=auth] .fhg-auth-form{display:grid;gap:15px}.fhg .fhg-dialog[data-mode=auth] .fhg-auth-form label{display:grid;gap:8px;font-size:12px;font-weight:700;color:var(--text)}
.fhg .fhg-dialog[data-mode=auth] .fhg-auth-form input:not(.fhg-otp-digit){width:100%;min-height:56px;padding:17px 15px 8px;border-radius:14px;background:color-mix(in srgb,var(--panel) 90%,var(--text));border:1px solid color-mix(in srgb,var(--fhg-accent,#5b4bdb) 20%,var(--line));font-size:15px}
.fhg .fhg-dialog[data-mode=auth] .fhg-auth-form .fhg-floating-field{position:relative;display:block;margin:0;font-weight:400}
.fhg .fhg-dialog[data-mode=auth] .fhg-floating-field>input{margin:0;font-weight:400}
.fhg .fhg-dialog[data-mode=auth] .fhg-floating-field>span{position:absolute;right:15px;top:50%;transform:translateY(-50%);max-width:calc(100% - 30px);padding:0;background:transparent;color:var(--muted);font-size:13px;font-weight:400;pointer-events:none;transition:top .18s,transform .18s,font-size .18s,color .18s;white-space:nowrap}
.fhg .fhg-dialog[data-mode=auth] .fhg-floating-field:focus-within>span,.fhg .fhg-dialog[data-mode=auth] .fhg-floating-field>input:not(:placeholder-shown)+span{top:8px;transform:none;font-size:10px;color:var(--fhg-accent,#5b4bdb)}
.fhg .fhg-dialog[data-mode=auth] .fhg-password-field>input{padding-right:48px}
.fhg .fhg-dialog[data-mode=auth] .fhg-password-toggle{position:absolute;z-index:2;right:7px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:38px;height:38px;min-height:38px;padding:0;border:0;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer}
.fhg .fhg-dialog[data-mode=auth] .fhg-password-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.fhg .fhg-dialog[data-mode=auth] .fhg-password-toggle[aria-pressed=true]{color:var(--fhg-accent,#5b4bdb)}
.fhg .fhg-dialog[data-mode=auth] .fhg-password-field>span{right:49px}
.fhg .fhg-dialog[data-mode=auth] .fhg-auth-form input:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--fhg-accent,#5b4bdb) 22%,transparent);border-color:var(--fhg-accent,#5b4bdb)}
.fhg .fhg-dialog[data-mode=auth] .fhg-auth-submit{width:100%;min-height:52px;border:0;border-radius:15px;background:linear-gradient(115deg,var(--fhg-accent,#5b4bdb),#298f91);color:#fff;font-weight:800;box-shadow:0 10px 20px color-mix(in srgb,var(--fhg-accent,#5b4bdb) 25%,transparent)}
.fhg .fhg-dialog[data-mode=auth] .fhg-auth-secondary{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.fhg .fhg-dialog[data-mode=auth] .fhg-auth-secondary button{flex:1 1 150px;min-height:40px;padding:8px;border-radius:12px;border-color:color-mix(in srgb,var(--fhg-accent,#5b4bdb) 24%,var(--line));font-size:11px}
.fhg .fhg-dialog[data-mode=auth] .fhg-device-limit>h3{font-size:20px;color:var(--text)}
@media(prefers-reduced-motion:reduce){.fhg .fhg-dialog[data-mode=auth] *{scroll-behavior:auto}}
.fhg .fhg-scale-next-actions{display:grid;grid-template-columns:1fr;gap:9px;margin:16px 0 4px}.fhg .fhg-scale-next-actions button{width:100%;min-height:46px;padding:10px 14px;text-align:center;font-weight:700}
.fhg .fhg-keyboard .fhg-white.fhg-in-scale{box-shadow:inset 0 0 0 999px rgba(91,75,219,.23)!important}.fhg .fhg-keyboard .fhg-black.fhg-in-scale{box-shadow:inset 0 0 0 999px rgba(139,126,255,.34)!important}.fhg .fhg-keyboard .fhg-white.fhg-key-root{box-shadow:inset 0 0 0 999px rgba(91,75,219,.32)!important}.fhg .fhg-keyboard .fhg-black.fhg-key-root{box-shadow:inset 0 0 0 999px rgba(139,126,255,.44)!important}
.fhg .fhg-email-field>span{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.fhg .fhg-email-verified{padding:3px 9px;border-radius:999px;background:#dff7e9;color:#14734d;font-size:11px}.fhg .fhg-email-change{grid-column:1/-1;justify-self:start;min-height:36px;padding:5px 12px}.fhg .fhg-email-verification{align-items:stretch;flex-direction:column}.fhg .fhg-email-verification button{align-self:start;min-width:180px}.fhg .fhg-email-verification button:disabled{opacity:.65;cursor:not-allowed}.fhg .fhg-email-status{width:100%;margin:0;color:#197555;font-size:12px;line-height:1.8}
.fhg .fhg-feedback-card{display:grid;gap:14px;max-width:670px;margin:22px auto;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--panel)}.fhg .fhg-feedback-card label{display:grid;gap:8px}.fhg .fhg-feedback-card textarea{width:100%;min-height:150px;resize:vertical;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font:inherit}.fhg .fhg-feedback-card button{justify-self:start}.fhg .fhg-feedback-status{min-height:1.6em;font-size:12px;color:var(--fhg-accent,#5b4bdb)}.fhg .fhg-share-status{margin:4px 16px;color:var(--fhg-accent,#5b4bdb);font-size:11px}
.fhg button.fhg-device-remove{display:inline-grid!important;place-items:center!important;flex:0 0 40px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px!important;max-height:40px!important;aspect-ratio:1!important;padding:0!important;border-radius:50%!important;line-height:1!important;text-align:center!important;vertical-align:middle!important;font-size:24px!important}
html[data-theme=dark] .fhg .fhg-email-verified{background:#123d2b;color:#9ef0bc}
.fhg .fhg-page-head-actions{align-items:stretch}.fhg .fhg-page-head-actions>button{box-sizing:border-box;height:42px;min-height:42px;margin:0;display:inline-flex;align-items:center;justify-content:center}.fhg .fhg-page-head-actions>.fhg-support-refresh{width:42px;min-width:42px;padding:0;font-size:20px;line-height:1}
.fhg .fhg-profile-form input[name=username][readonly]{opacity:.78;cursor:default}
.fhg .fhg-sidebar-account .fhg-renew-subscription{width:100%;margin-top:12px}
.fhg .fhg-sidebar-account .fhg-renew-note{display:block;margin-top:8px;color:var(--muted);font-size:11px;line-height:1.8;text-align:center}
.fhg .fhg-lock{display:inline-flex;align-items:center;justify-content:center}
.fhg .fhg-lock svg,.fhg button[data-upgrade] svg{width:17px;height:17px;display:block;flex:none}
