/* Owner-approved compact navigation. All rules are confined to this header. */
.header.header-diy.compact-header { background:rgba(255,255,255,.98); position:sticky; top:0; z-index:80; }
.header.header-diy.compact-header .nav { display:flex; align-items:center; gap:12px; min-height:88px; height:auto; padding-block:14px; position:relative; flex-wrap:nowrap; }
.compact-header .brand-mark { width:56px; height:56px; flex:0 0 56px; margin-right:auto; }
.compact-header .brand-mark svg { width:100%; height:100%; }
.compact-header .compact-tools { display:flex; align-items:center; gap:10px; }
.compact-header .compact-link,.compact-header .compact-control { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:10px 17px; color:#17324d; font:700 15px/1.3 Arial,Helvetica,sans-serif; text-decoration:none; white-space:nowrap; border:1px solid #d6e2eb; border-radius:15px; background:linear-gradient(145deg,#fff,#eff5f8); box-shadow:0 4px 12px #0d244507; cursor:pointer; box-sizing:border-box; }
.compact-header .compact-link:hover,.compact-header .compact-control:hover { background:#eaf3f8; border-color:#b5cad9; }
.compact-header .compact-primary { background:#f6892b; border:2px solid #ffc493; padding:9px 18px; }
.compact-header .compact-primary:hover { background:#ff9a42; border-color:#f6892b; }
.compact-header .compact-contact { background:none; border-color:transparent; box-shadow:none; }
.compact-header .compact-free-label { color:#226044; }
.compact-header .compact-icon { width:46px; padding:11px; }
.compact-header .compact-icon svg,.compact-header .compact-menu-icon { width:21px; height:21px; flex:none; }
.compact-header #pause-scenes { display:inline-flex; }
.compact-header #pause-scenes:disabled { opacity:.5; cursor:default; }
.compact-header a:focus-visible,.compact-header button:focus-visible,.compact-header summary:focus-visible { outline:3px solid #f6892b; outline-offset:4px; }
.compact-header summary { list-style:none; }
.compact-header summary::-webkit-details-marker { display:none; }
.compact-header .bulk-mega,.compact-header .bulk-free { margin:0; padding:0; border:0; }
.compact-header .bulk-mega[open]>summary,.compact-header .bulk-free[open]>summary { background:#e8f2f8; border-color:#acc6d9; }
.compact-header .mega-panel,.compact-header .free-panel { position:absolute; top:calc(100% - 3px); right:0; background:#fff; border:1px solid #dce6ee; border-radius:24px; box-shadow:0 22px 45px #0d244522; padding:30px; max-height:calc(100dvh - 115px); overflow:auto; overscroll-behavior:contain; }
.compact-header .mega-panel { left:0; }
.compact-header .mega-grid { display:grid; grid-template-columns:1.1fr 1fr 1fr 1fr; gap:28px; }
.compact-header .mega-group { border:0; padding:0; margin:0; background:none; min-width:0; }
.compact-header .mega-group-toggle { font:700 17px/1.4 Arial,Helvetica,sans-serif; color:#17324d; padding:0 0 15px; cursor:default; }
.compact-header .mega-group-links { display:grid; gap:4px; }
.compact-header .mega-group-links a,.compact-header .free-panel a { display:block; color:#345069; font:400 15px/1.45 Arial,Helvetica,sans-serif; padding:9px 10px; margin-left:-10px; border-radius:10px; text-decoration:none; }
.compact-header .mega-group-links a:hover,.compact-header .free-panel a:hover { background:#edf5fa; color:#0d2445; }
.compact-header .mega-group-links a.mega-feature { color:#17324d; font-weight:700; }
.compact-header .free-panel { width:min(380px,calc(100% - 12px)); }
.compact-header .free-panel h2 { font:700 20px/1.3 Arial,Helvetica,sans-serif; color:#17324d; margin:0 0 12px; }
.compact-header .free-panel p { font:400 14px/1.5 Arial,Helvetica,sans-serif; color:#52687b; margin:14px 0 0; }
@media (max-width:1000px) {
 .header.header-diy.compact-header .nav { gap:8px; }
 .compact-header .compact-tools { gap:7px; }
 .compact-header .compact-link,.compact-header .compact-control { padding-inline:12px; }
 .compact-header .compact-icon { padding:11px; }
 .compact-header .mega-grid { grid-template-columns:1fr 1fr; gap:25px 40px; }
}
@media (max-width:700px) {
 .header.header-diy.compact-header .nav { display:grid; grid-template-columns:1fr auto auto; gap:10px 8px; padding:12px 0; min-height:0; width:calc(100% - 32px); }
 .compact-header .brand-mark { width:43px; height:43px; min-width:43px; margin:0; }
 .compact-header .compact-link,.compact-header .compact-control { font-size:14px; min-height:44px; padding:10px 12px; border-radius:13px; }
 .compact-header .compact-primary { padding:9px 12px; }
 .compact-header .compact-tools { grid-column:1/-1; justify-content:flex-end; gap:10px; }
 .compact-header .compact-icon { width:44px; padding:10px; }
 .compact-header .mega-panel,.compact-header .free-panel { top:100%; padding:22px; border-radius:18px; max-height:calc(100dvh - 144px); }
 .compact-header .mega-grid { grid-template-columns:1fr; gap:12px; }
 .compact-header .mega-group-toggle { padding:10px 0; cursor:pointer; display:flex; justify-content:space-between; gap:12px; }
 .compact-header .mega-group-toggle::after { content:'+'; color:#ef8127; font-size:22px; line-height:1; }
 .compact-header .mega-group-toggle[aria-expanded="true"]::after { content:'−'; }
 .compact-header .mega-group-links { padding:0 8px 10px; }
}

.compact-header .mega-group-heading { margin:0; font:inherit; }
.compact-header .mega-group-toggle { width:100%; border:0; border-radius:0; background:none; box-shadow:none; text-align:left; margin:0; }
.compact-header .mega-group-links[hidden] { display:none; }

/* R4 owner-directed FREE tags. Header-only; guide controls stay untouched. */
.compact-header .compact-free-tag { display:inline-flex; align-items:center; color:#174d35; background:#ddefda; border-radius:6px; padding:5px 7px; font:800 10px/1.1 Arial,Helvetica,sans-serif; letter-spacing:.25px; vertical-align:middle; white-space:nowrap; }
.compact-header .free-panel { width:min(430px,calc(100% - 12px)); }
.compact-header .compact-price-note { display:block; font:400 12px/1.45 Arial,Helvetica,sans-serif; margin-top:5px; color:#52687b; }
.compact-header .free-panel a .compact-free-tag,.compact-header .mega-group-links a .compact-free-tag { margin-left:5px; }
@media(max-width:700px){.compact-header .compact-free-label { gap:6px; }.compact-header .compact-free-tag { font-size:10px; }}

/* Owner-directed portrait header: one row, 44px actions, guides inside Menu. */
.compact-header .compact-mobile-label,.compact-header .compact-contact-icon { display:none; }
@media (max-width:700px) {
 .header.header-diy.compact-header .nav { display:flex; flex-wrap:nowrap; gap:4px; width:calc(100% - 24px); padding:10px 0; min-height:64px; box-sizing:border-box; }
 .compact-header .brand-mark { width:44px; height:44px; min-width:44px; flex:0 0 44px; margin-right:auto; }
 .compact-header .compact-desktop-label,.compact-header .bulk-free { display:none; }
 .compact-header .compact-mobile-label { display:inline; }
 .compact-header .compact-primary { flex:0 0 auto; font-size:14px; padding:9px 10px; }
 .compact-header .compact-contact,.compact-header .compact-icon,.compact-header .bulk-mega>summary { width:44px; height:44px; min-height:44px; padding:10px; flex:0 0 44px; }
 .compact-header .compact-contact-icon { display:block; width:21px; height:21px; flex:none; }
 .compact-header .compact-tools { display:flex; flex:0 0 auto; gap:4px; grid-column:auto; }
 .compact-header .mega-panel { max-height:calc(100dvh - 80px); }
 .compact-header .mega-group-toggle .compact-mobile-label { display:inline-flex; align-items:center; gap:8px; }
}
@media (max-width:359px) {
 .header.header-diy.compact-header .nav { width:calc(100% - 16px); gap:2px; }
 .compact-header .compact-tools { gap:2px; }
 .compact-header .compact-primary { font-size:13px; padding-inline:8px; }
}
