/* Privacy control stays in document flow, above footer padding and app tabs. */
button.privacy-settings{position:static!important;display:inline-flex;margin:14px 10px;padding:10px 14px;max-width:calc(100% - 20px);float:none!important;transform:none!important;z-index:auto!important}.privacy-panel{bottom:calc(88px + env(safe-area-inset-bottom))!important;max-height:calc(100dvh - 180px);overflow:auto}
.star-picker{display:flex!important;gap:8px!important;flex-wrap:wrap;border:0;padding:14px 0}.star-picker legend{font-size:18px;font-weight:700}.star-picker label{display:flex!important;position:relative;flex-direction:column;align-items:center;min-width:52px;border:2px solid #b3c6a8;border-radius:12px;padding:10px;cursor:pointer}.star-picker input{position:static!important;opacity:1!important;width:18px!important;height:18px!important;appearance:auto!important}.star-picker label>span{font-size:28px;color:#7b826c;background:none!important}.star-picker label:has(input:checked){border-color:#335b42;background:#e8f2dd}.star-picker label:has(input:checked)>span{color:#925600}.star-picker small{font-size:10px}.editor-score{color:#7d5400;font-weight:650}.blog-cover{width:100%;max-height:520px;object-fit:cover;border-radius:16px;margin:12px 0 24px}.rich-article img{max-width:100%;height:auto}.rich-article{overflow-wrap:anywhere;line-height:1.8}.rich-article pre{overflow:auto;padding:18px;background:#eef3e8}.usage-chart{display:block;width:100%;height:auto;min-height:150px}.editor-tools{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}.editor-tools button{padding:7px 12px;border:1px solid #b3c6a8;border-radius:7px;background:#f4f8ef;color:#345139;cursor:pointer}.keyword-hint{padding:12px;background:#eef4e7;border-radius:8px}.html-preview{width:100%;height:360px;background:white;border:1px solid #dce5d4;border-radius:12px}
@media(max-width:760px){.privacy-panel{left:12px!important;right:12px!important;width:auto!important}.star-picker label{min-width:42px;padding:8px}.star-picker{gap:5px!important}.usage-chart{min-height:120px}}
.editor-tools[hidden]{display:none}

/* v15: viewport drawers are portalled outside sticky/clipped headers. */
.drawer-heading,.drawer-backdrop{display:none}.drawer-backdrop[hidden]{display:none!important}
@media(max-width:760px){
 html.drawer-open,html.drawer-open body{overflow:hidden!important;overscroll-behavior:none}
 .drawer-backdrop{display:block;position:fixed;inset:0;width:100%;height:100%;border:0;border-radius:0;background:rgb(12 25 20 / .58);z-index:20000;cursor:pointer;margin:0;padding:0}
 .drawer-panel,.owner-admin .drawer-panel{display:flex!important;position:fixed!important;inset:0 0 0 auto!important;width:min(340px,88vw)!important;height:100vh!important;height:100dvh!important;max-height:none!important;box-sizing:border-box;flex-direction:column!important;align-items:stretch!important;flex-wrap:nowrap!important;gap:18px!important;padding:calc(18px + env(safe-area-inset-top)) 20px calc(30px + env(safe-area-inset-bottom))!important;margin:0!important;border:0!important;background:#f8faf4;color:#294434;z-index:20001;overflow-y:auto!important;overscroll-behavior:contain;box-shadow:-12px 0 45px #10241830;transform:translateX(105%);visibility:hidden;transition:transform .22s ease,visibility .22s}
 .drawer-panel[data-open=true]{transform:translateX(0);visibility:visible}
 .drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-bottom:17px;border-bottom:1px solid #d9e3d2;font:600 18px system-ui;flex-shrink:0}
 .drawer-close{display:grid;place-items:center;width:44px;height:44px;min-height:44px;border:1px solid #bbcdb2;background:white;color:#274936;border-radius:12px;font:24px system-ui;cursor:pointer}
 .drawer-panel nav{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;width:100%;margin:0!important;overflow:visible!important}
 .drawer-panel nav a,.drawer-panel .header-docs{display:block!important;padding:13px 12px!important;border-radius:10px;font:500 15px/1.5 system-ui!important;color:#294434;text-decoration:none;white-space:normal!important}
 .drawer-panel nav a:hover,.drawer-panel nav a:focus-visible{background:#e3ecda;outline:2px solid #789967;outline-offset:-2px}
 .drawer-panel .account{display:flex;flex-wrap:wrap;border-top:1px solid #d9e3d2;padding-top:18px;gap:16px}
 .drawer-panel .rail-caption{font:11px system-ui;letter-spacing:1px;margin:0}.drawer-panel .rail-bottom{display:flex;flex-direction:column;gap:15px;border-top:1px solid #d9e3d2;padding-top:20px;margin-top:auto}
 .owner-admin .drawer-panel{background:#18382d;color:#f0f6e9}.owner-admin .drawer-panel nav a,.owner-admin .drawer-panel .rail-bottom a{color:#eff5e8}.owner-admin .drawer-panel nav a.selected,.owner-admin .drawer-panel nav a:hover{background:#365b43}.owner-admin .drawer-panel .rail-caption{color:#bdceb0}
}
@media(prefers-reduced-motion:reduce){.drawer-panel{transition:none!important}}

/* v16: contain intrinsic grid widths and keep phone content in the viewport. */
.premium-home,.premium-home section,.premium-home section>*,.premium-home .board-discussion>div,.premium-home .home-editor{min-width:0}
.premium-home .premium-landing{grid-template-columns:minmax(0,1.12fr) minmax(0,1fr)}
.premium-home .premium-lab{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}
.premium-home .board-code pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:760px){
 html,body{max-width:100%;overflow-x:clip}
 .site-header .header-inner,.community-page .top-inner,.owner-admin .admin-rail{flex-wrap:nowrap!important;justify-content:space-between;min-width:0}
 .mobile-menu-button,.owner-admin .admin-rail>.mobile-menu-button{margin-left:auto!important;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0!important;justify-content:center;gap:0}
 .site-header .brand,.community-page .top-inner>.brand,.owner-admin .admin-brand{min-width:0;max-width:calc(100% - 60px);overflow-wrap:anywhere}
 .premium-home{width:100%;max-width:100%;overflow-wrap:anywhere}
 .premium-home .wrap{width:calc(100% - 32px)!important;max-width:calc(100% - 32px)}
 .premium-home .premium-landing,.premium-home .premium-lab{grid-template-columns:minmax(0,1fr)}
 .premium-home .landing-promise{flex-wrap:wrap}
 .premium-home .discovery-strip{flex-wrap:wrap!important;white-space:normal!important;overflow:visible!important}
 .premium-home .premium-tool-grid{display:grid!important;grid-template-columns:minmax(0,1fr);overflow:visible!important;max-width:100%}
 .premium-home .premium-tool{min-width:0!important;max-width:100%;scroll-snap-align:none}
 .premium-home .recipe-grid{grid-template-columns:minmax(0,1fr)}
 .premium-home .primary-link{max-width:100%;white-space:normal}
 .premium-home .board-top{gap:8px}
 .premium-home .board-discussion>svg{flex-shrink:0}
 .premium-home .code-area{grid-template-columns:34px minmax(0,1fr)}
 .premium-home .code-input{min-width:0;width:100%}
 .premium-home iframe,.premium-home img{max-width:100%}
}
