.fm-program-shell{min-height:100vh;background:#faf5ef;color:#171717}.fm-program-top{display:flex;align-items:center;gap:10px;padding:14px 20px;background:#fff;border-bottom:1px solid #eadfd8}.fm-program-top img{width:130px;max-width:30%;margin-right:auto}.fm-program-main{max-width:1100px;margin:auto;padding:24px 18px 50px}.fm-program-grid,.fm-program-sections{display:grid;gap:16px}.fm-program-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}.fm-program-tile img,.fm-program-hero img{width:100%;max-height:280px;object-fit:cover;border-radius:16px}.fm-program-hero progress{width:100%;accent-color:#927397}.fm-program-lessons{list-style:none;padding:0;margin:0}.fm-program-lessons a{display:flex;justify-content:space-between;gap:12px;padding:14px 0;border-top:1px solid #eadfd8;color:inherit;text-decoration:none}.fm-program-lessons small{flex-shrink:0;color:#66506b}.fm-program-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:18px 0}.fm-program-player{background:#171717;border-radius:16px;overflow:hidden;margin:20px auto}.fm-program-player.horizontal{aspect-ratio:16/9}.fm-program-player.vertical{aspect-ratio:9/16;width:min(100%,360px)}.fm-program-player.document{height:75vh;min-height:320px}.fm-program-player iframe{width:100%;height:100%;border:0}.fm-program-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.fm-program-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.fm-program-form label{display:block;min-width:0}.fm-program-form .wide{grid-column:1/-1}.fm-program-node{padding:14px;border:1px solid #eadfd8;border-radius:14px;margin:12px 0;background:#fff}.fm-program-node h3{margin:0}.fm-program-access{margin-top:16px}.fm-program-access article{padding:16px;border-bottom:1px solid #eadfd8}.fm-program-access .fm-input{max-width:220px}.fm-product-switch{font-size:.85rem;color:#66506b}.fm-program-top a,.fm-program-top button{white-space:normal}.fm-program-main h1,.fm-program-main h2,.fm-program-node{overflow-wrap:anywhere}@media(min-width:800px){.fm-program-sections{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.fm-program-form{grid-template-columns:1fr}.fm-program-lessons a{flex-direction:column;gap:4px}.fm-program-main{padding:18px 14px 36px}}

.fm-program-lesson-label{display:flex;gap:10px;align-items:center}.fm-program-lesson-label img{width:88px;height:50px;object-fit:cover;border-radius:8px;flex-shrink:0}

/* YouTube only: inert poster, then official player and own external controls. */
.fm-youtube{margin:20px auto;--fm-yt-ratio:1.77777778}.fm-youtube.vertical{max-width:360px;--fm-yt-ratio:.5625}.fm-youtube .fm-program-player{margin:0 auto 10px}.fm-youtube iframe{display:block}
.fm-youtube-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.fm-youtube-controls .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:46px;padding:10px 14px;font-size:14px}.fm-youtube-controls .btn:disabled{opacity:.55;cursor:wait}.fm-youtube-controls .btn:focus-visible,.fm-youtube-poster:focus-visible{outline:3px solid #18706d;outline-offset:3px}.fm-youtube-status{margin:8px 0;text-align:center}.fm-youtube-status:empty{display:none}.fm-youtube [hidden]{display:none!important}
.fm-youtube-poster{display:block;position:relative;width:100%;height:100%;border:0;padding:0;background:#171717;color:#fff;cursor:pointer;font:inherit}.fm-youtube-poster img{display:block;width:100%;height:100%;object-fit:contain}.fm-youtube-poster>span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:24px;padding:12px 20px;min-height:44px;box-sizing:border-box;background:#66506b;color:#fff;font-weight:600;white-space:nowrap}
/* Fullscreen controls use their own 44px area, never an overlay on YouTube. */
.fm-youtube.fm-youtube-native{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;max-width:none;height:100vh;height:100dvh;margin:0;padding:12px;box-sizing:border-box;background:#171717;color:#fff;overflow:auto}
.fm-youtube.fm-youtube-native .fm-program-player{flex:none;aspect-ratio:var(--fm-yt-ratio);width:min(100%,calc((100dvh - 88px)*var(--fm-yt-ratio)));height:auto;max-height:none;margin:0;border-radius:0}
.fm-youtube-native .fm-youtube-controls{flex:none;gap:8px;margin-top:8px}.fm-youtube-native .fm-youtube-controls .btn{width:44px;height:44px;min-height:44px;padding:0;border:1px solid #666;background:#292929;color:white;font-size:18px;border-radius:50%}.fm-youtube-native .fm-yt-label{display:none}.fm-youtube-native .fm-youtube-status{color:#fff;font-size:12px;margin:4px 0}
.fm-youtube.fm-youtube-expanded{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;max-width:none;height:100vh;height:100dvh;margin:0;padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));background:#faf5ef;overflow:auto;box-sizing:border-box}
.fm-youtube-expanded .fm-program-player{flex:none;width:min(100%,calc((100dvh - 150px)*var(--fm-yt-ratio)));max-height:calc(100dvh - 150px)}.fm-youtube-expanded .fm-youtube-controls{flex:none}

/* Section index and lesson resources; video styles remain unchanged. */
.fm-program-section-card{display:flex;flex-direction:column;gap:8px;text-decoration:none;color:inherit;padding:18px}
.fm-program-section-card h2,.fm-program-section-card p{margin:0}.fm-program-section-card:not(.locked):hover{border-color:#927397}.fm-program-section-card:focus-visible{outline:3px solid #18706d;outline-offset:3px}.fm-program-card-cta{display:block;color:#66506b;font-weight:700;margin-top:auto;padding-top:8px}.fm-program-section-card.locked{background:#f6f3f1}
.fm-program-section-lessons{display:grid;gap:12px;list-style:none;padding:0;margin:20px 0}.fm-program-section-lessons li{margin:0}.fm-program-section-lessons a{display:flex;flex-direction:column;gap:10px;color:inherit;text-decoration:none;min-height:48px}.fm-program-section-lessons strong{overflow-wrap:anywhere;min-width:0}
.fm-program-materials{margin-top:28px}.fm-program-material-grid{display:grid;gap:12px}.fm-program-material h3{font-size:18px;margin:0;overflow-wrap:anywhere}.fm-program-material .btn{min-height:46px}.fm-program-material-view{height:65vh;min-height:260px;margin-top:12px}.fm-program-material-view iframe{width:100%;height:100%;border:1px solid #eadfd8;border-radius:12px}.fm-program-material [data-material-view]:empty{display:none}
.fm-material-editor{border:1px solid #eadfd8;border-radius:12px;padding:12px;margin:10px 0}.fm-material-editor .fm-program-actions{align-items:center}.fm-material-editor input,.fm-material-editor select{max-width:100%}

/* 1.27.4: programme homepage cards only. */
.fm-program-sections{grid-template-columns:minmax(0,1fr);gap:16px;margin-top:20px}
.fm-program-sections .fm-program-section-card{min-width:0;margin:0;padding:20px;gap:12px;border:1px solid #eee3dc;border-radius:20px;background:#fff;box-shadow:0 4px 14px #57404b08;transition:box-shadow .15s}
.fm-program-sections a.fm-program-section-card:hover{box-shadow:0 6px 20px #57404b18;border-color:#927397}
.fm-program-sections .fm-program-section-card h2{font-family:inherit;font-size:1.1rem;line-height:1.4;font-weight:600;color:#66506b;overflow-wrap:anywhere}
.fm-program-sections .fm-section-state{align-self:flex-start;border-radius:20px;padding:4px 10px;background:#faf5ef;color:#66506b;font-size:.8rem;line-height:1.4;font-weight:600}
.fm-program-sections .fm-section-state.started{background:#f2eaf5;color:#70527b}.fm-program-sections .fm-section-state.done{background:#e5f3eb;color:#166e69}
.fm-program-sections .fm-section-count,.fm-program-sections .fm-section-unlock{font-size:.9rem;line-height:1.5;color:#66506b}
.fm-program-sections .fm-section-action{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin-top:auto;padding:8px 12px;background:#f2eaf5;color:#70527b;border-radius:12px;font-weight:600;font-size:.9rem;box-sizing:border-box}
.fm-program-sections .fm-section-action>span{font-size:1.2rem}
.fm-program-sections .fm-program-section-card.locked{background:#f6f3f1;box-shadow:none;border-color:#e5dfda;cursor:default}
.fm-program-sections .locked .fm-section-state{background:#eae6e2;color:#625c58}.fm-program-sections .locked h2,.fm-program-sections .locked .fm-section-unlock{color:#625c58}
@media(min-width:600px){.fm-program-sections{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1000px){.fm-program-sections{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}}

/* 1.27.5: mobile density only; keep titles, actions and column rules. */
@media(max-width:599px){
 .fm-program-hero{padding:16px 18px}.fm-program-hero h1{margin:0 0 8px}.fm-program-hero p{margin:6px 0;line-height:1.45}.fm-program-hero progress{display:block;margin:8px 0;height:8px}.fm-program-hero p:last-child{margin:10px 0 0}
 .fm-program-sections{gap:12px;margin-top:16px}.fm-program-sections .fm-program-section-card{padding:16px 20px;gap:8px}
}

/* 1.27.6: mobile catalogue; no player lifecycle or business-rule changes. */
.fm-program-mobile-only,.fm-program-description-toggle{display:none}
.fm-program-lesson-order{font-size:.8rem;color:#66506b;margin:12px 0 4px}
.fm-program-description-toggle{font:inherit;border:0;background:transparent;color:#66506b;text-decoration:underline;cursor:pointer;min-height:44px;min-width:44px}
.fm-program-description-toggle:focus-visible{outline:3px solid #18706d;outline-offset:2px}
@media(max-width:599px){
 .fm-program-main{padding:12px 12px 28px}
 .fm-program-hero{padding:12px;border-radius:18px}
 .fm-program-hero-heading{display:flex;align-items:center;gap:10px;min-width:0}
 .fm-program-hero-heading>img{width:52px;height:52px;max-height:52px;object-fit:contain;border-radius:10px;flex:none}
 .fm-program-hero-heading>div{min-width:0;flex:1}
 .fm-program-hero h1{font-size:1.25rem;line-height:1.2;margin:0;font-weight:500}
 .fm-program-hero .fm-program-duration{font-size:.8rem;line-height:1.3;margin:4px 0 0}
 .fm-program-description{display:flex;align-items:center;gap:8px;margin:4px 0}
 .fm-program-description>p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;flex:1;min-width:0;font-size:.85rem;line-height:1.35;margin:0}
 .fm-program-description.expanded{align-items:flex-start}.fm-program-description.expanded>p{display:block;overflow:visible;-webkit-line-clamp:unset}
 .fm-program-description-toggle{display:block;flex:0 0 98px;padding:4px;font-size:.78rem;line-height:1.25}
 .fm-program-hero .fm-program-summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 8px;font-size:.75rem;line-height:1.4;margin:4px 0}
 .fm-program-mobile-only{display:inline}.fm-program-desktop-only{display:none!important}
 .fm-program-hero progress{margin:5px 0;height:6px}.fm-program-hero p:last-child{margin:6px 0 0}
 .fm-program-hero p:last-child>.btn{min-height:44px;padding:10px 14px;font-size:.85rem}
 .fm-program-sections{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
 .fm-program-sections .fm-program-section-card{padding:12px;gap:8px;border-radius:18px;position:relative}
 .fm-program-sections .fm-program-section-card h2{font-size:.95rem;line-height:1.35;font-weight:600}
 .fm-program-sections .fm-section-state{font-size:.7rem;padding:3px 7px;line-height:1.35}
 .fm-program-sections .fm-section-count{font-size:.8rem;padding-right:28px;margin-top:auto;min-height:24px;display:flex;align-items:center}
 .fm-program-sections .fm-section-unlock{font-size:.8rem;line-height:1.4}
 .fm-program-sections .fm-section-action{position:absolute;bottom:12px;right:12px;min-height:24px;width:24px;height:24px;padding:0;justify-content:center;border-radius:50%;margin:0;font-size:1rem}
 .fm-program-view-title{font-size:1.4rem;line-height:1.25;margin:8px 0 10px}
 .fm-program-lesson-order{margin:8px 0 2px;font-size:.75rem}
 .fm-program-section-lessons{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
 .fm-program-section-lessons li.card{padding:0;min-width:0;overflow:hidden;border-radius:18px}
 .fm-program-section-lessons li>a{padding:12px;box-sizing:border-box;height:100%;gap:8px;min-width:0}
 .fm-program-section-lessons .fm-program-lesson-label{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0}
 .fm-program-section-lessons .fm-program-lesson-label img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:10px}
 .fm-program-section-lessons strong{font-size:.95rem;line-height:1.35;font-weight:600}.fm-lesson-card-order{display:none}
 .fm-program-section-lessons .muted{font-size:.75rem;line-height:1.4;margin-top:auto}
 .fm-program-section-lessons .fm-program-card-cta{font-size:1rem;align-self:flex-end;margin:0;padding:0;color:#70527b}
 .fm-program-section-lessons li:only-child{max-width:100%}
 .fm-youtube:not(.fm-youtube-native):not(.fm-youtube-expanded){margin:12px auto}
 .fm-youtube:not(.fm-youtube-native):not(.fm-youtube-expanded) .fm-youtube-controls{gap:4px}
 .fm-youtube:not(.fm-youtube-native):not(.fm-youtube-expanded) .fm-youtube-controls .btn{padding:6px 8px;min-width:44px;min-height:44px;font-size:12px;gap:4px}
 .fm-youtube:not(.fm-youtube-native):not(.fm-youtube-expanded) .fm-youtube-status{margin:4px 0}
}
@media(max-width:339px){.fm-program-section-lessons{grid-template-columns:minmax(0,1fr)}}


/* 1.28.8: client Program presentation only. */
.fm-program-shell .fm-content-row{display:flex;flex-direction:row;align-items:center;gap:14px;text-decoration:none;color:inherit;min-width:0}
.fm-program-shell .fm-content-icon{display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;object-fit:cover;border-radius:10px;background:#faf5ef;font-size:1.35rem}
.fm-program-shell .fm-content-copy{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.fm-program-shell .fm-content-copy strong,.fm-program-shell .fm-content-copy h2{font-size:1.05rem;font-weight:600;line-height:1.4;margin:0;overflow-wrap:anywhere;color:#66506b}
.fm-program-shell .fm-content-meta,.fm-program-shell .fm-content-status,.fm-program-shell .fm-section-summary{font-size:.87rem;line-height:1.45;color:#625c58}
.fm-program-shell .fm-content-status{align-self:flex-start;font-weight:600}
.fm-program-shell .fm-content-status.done{color:#18706d;background:#e5f3eb;padding:2px 6px;border-radius:5px}
.fm-program-shell .fm-content-status.started{color:#70527b}
.fm-program-shell .fm-content-arrow{flex:none;color:#70527b;font-size:1.3rem}
.fm-program-shell .fm-program-section-lessons li.card{padding:0;overflow:hidden}
.fm-program-shell .fm-program-section-lessons a.fm-content-row{padding:16px;min-height:76px;box-sizing:border-box;height:100%}
.fm-program-shell .fm-content-row:focus-visible,.fm-program-shell .pm-recipe-card:focus-visible{outline:3px solid #18706d;outline-offset:3px}
.fm-program-shell [data-complete][aria-pressed="true"]{background:#e5f3eb;border-color:#e5f3eb;color:#18706d}
.fm-program-shell .fm-program-back{min-height:44px}
.fm-program-shell .fm-program-hero progress{appearance:none;border:0;border-radius:6px;background:#eee8e3;overflow:hidden;height:8px}
.fm-program-shell .fm-program-hero progress::-webkit-progress-bar{background:#eee8e3;border-radius:6px}
.fm-program-shell .fm-program-hero progress::-webkit-progress-value{background:#927397;border-radius:6px}
.fm-program-shell .fm-program-hero progress::-moz-progress-bar{background:#927397;border-radius:6px}
@media(max-width:599px){
 .fm-program-shell .fm-program-sections,.fm-program-shell .fm-program-section-lessons{grid-template-columns:minmax(0,1fr);gap:12px}
 .fm-program-shell .fm-program-sections .fm-program-section-card{padding:16px;gap:14px;border-radius:16px;box-shadow:none}
 .fm-program-shell .fm-program-sections .fm-program-section-card.locked{background:#f1eeeb}
 .fm-program-shell .fm-program-hero{padding:18px;border-radius:18px}
 .fm-program-shell .fm-program-hero h1{font-size:1.5rem;line-height:1.3}
 .fm-program-shell .fm-program-hero .fm-program-duration{font-size:.95rem;margin-top:6px}
 .fm-program-shell .fm-program-description{display:block;margin:12px 0}
 .fm-program-shell .fm-program-description>p{font-size:.95rem;line-height:1.5;-webkit-line-clamp:3}
 .fm-program-shell .fm-program-description-toggle{font-size:.85rem;padding:4px 0;text-align:left}
 .fm-program-shell .fm-program-hero .fm-program-summary{font-size:.95rem;margin:12px 0 8px}
 .fm-program-shell .fm-program-hero progress{height:8px;margin:8px 0 14px}
 .fm-program-shell .fm-program-hero p:last-child>.btn{display:flex;justify-content:center;align-items:center;width:100%;min-height:48px;font-size:.95rem;box-sizing:border-box}
 .fm-program-shell .fm-program-main>.fm-program-view-title{font-size:1.5rem;line-height:1.3;margin-top:16px}
 .fm-program-shell .fm-program-section-lessons strong{font-size:1.05rem}
 .fm-program-shell .pm-recipe-grid{grid-template-columns:minmax(0,1fr)}
 .fm-program-shell .pm-recipe-card{display:flex;flex-direction:row;align-items:center;gap:14px;padding:16px;border-radius:16px;width:100%;box-sizing:border-box}
 .fm-program-shell .pm-recipe-card>img{width:60px;height:60px;flex:0 0 60px;object-fit:cover;border-radius:10px;aspect-ratio:auto}
 .fm-program-shell .pm-recipe-card .pm-recipe-cta{font-size:.87rem;font-weight:600;color:#705477}
 .fm-program-shell .fm-program-main>.fm-program-actions>a.ghost{background:transparent;border-color:transparent;padding:10px 4px;min-height:44px}
 .fm-program-shell .fm-program-main>.fm-program-actions>[data-complete]{min-height:48px}
}
