/* The header is already isolated: its dropdown must sit above the separate
   content layer, rather than below the later showcase's positioned children. */
#gallery .atelier-masthead{position:relative;z-index:2}
#gallery>main{position:relative;z-index:0}
#gallery .atelier-masthead .header-main{display:flex;flex-direction:column;gap:0;width:100%;align-items:stretch}
#gallery .atelier-masthead .header-hub{display:block;position:relative;width:100%;max-width:none;z-index:6}
#gallery .atelier-masthead .brand-dreamworlds{width:min(890px,86%);max-width:100%;margin:0 auto -6px}
#gallery .atelier-masthead .main-navigation{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;padding:7px 9px}
#gallery .atelier-masthead .main-navigation .nav{gap:10px;padding:9px 7px;min-height:73px;font-size:18px;white-space:normal}
#gallery .atelier-masthead .main-navigation .nav-symbol{display:block;flex:none;width:44px;height:44px;color:#32574d;filter:drop-shadow(0 3px 2px #37533c25)}
#gallery .atelier-masthead #account-menu-toggle[aria-expanded=true]{background:#fff9e8;box-shadow:inset 0 -3px #b29b59;color:#31584b}
#gallery .atelier-masthead #account-menu-state{font:600 10px/1.4 system-ui;color:#516d5e;white-space:normal}
#gallery .atelier-masthead .header-controls{position:absolute;inset:auto 0 auto auto;top:calc(100% + 12px);bottom:auto;width:min(360px,100%);padding:19px;gap:14px;border:1px solid #e0e9d8;border-radius:18px;background:linear-gradient(135deg,#fffffff2,#eef7edec);box-shadow:0 17px 45px -12px #1f483b77;z-index:40}
#gallery .atelier-masthead .header-controls::before{content:'';position:absolute;right:60px;top:-7px;width:13px;height:13px;transform:rotate(45deg);background:#f5faee;border-left:1px solid #e0e9d8;border-top:1px solid #e0e9d8;pointer-events:none}
#gallery .atelier-masthead .header-controls .account-presence{font:750 14px/1.5 system-ui;padding:0 0 5px;color:#31584b}
#gallery .atelier-masthead .header-controls .top-actions :is(button,a){min-height:44px;font-size:14px;padding:10px 8px}
#gallery .atelier-masthead .header-controls #admin-open{min-height:39px;font-size:13px}
#gallery .atelier-masthead .header-controls .little-tools{grid-template-columns:40px 40px minmax(0,1fr) 40px;gap:7px}
#gallery .atelier-masthead .header-controls .little-tools .plain{min-height:40px;font-size:15px}
#gallery .atelier-masthead .header-controls #help{font-size:13px}
body.dark #gallery .atelier-masthead .main-navigation .nav-symbol{color:#cce9d4;filter:drop-shadow(0 3px 2px #050f2580)}
body.dark #gallery .atelier-masthead #account-menu-state{color:#d6e9db}
body.dark #gallery .atelier-masthead #account-menu-toggle[aria-expanded=true]{background:#64725455;color:#f5edcb}
body.dark #gallery .atelier-masthead .header-controls{background:linear-gradient(135deg,#344c50f7,#28374bf5);border-color:#7fa599;color:#edf7e7}
body.dark #gallery .atelier-masthead .header-controls::before{background:#304448;border-color:#7fa599}
body.dark #gallery .atelier-masthead .header-controls .account-presence{color:#dcf4de}
button:is(#back,#puzzle-close,#duel-close),.community-back,.personal-back{min-width:48px;min-height:46px;border:1px solid #718c7a;background:#fffdf0;color:#244e40;box-shadow:0 4px 11px #1f49384d;font-weight:800}
body.dark button:is(#back,#puzzle-close,#duel-close){background:#354b52;color:#f4efd7;border-color:#acbb9b}
@media(max-width:1150px){#gallery .atelier-masthead .main-navigation .nav{flex-direction:column;font-size:14px;gap:5px}#gallery .atelier-masthead .main-navigation .nav-label{align-items:center}#gallery .atelier-masthead .main-navigation .nav-symbol{width:39px;height:39px}}
@media(max-width:600px){#gallery .atelier-masthead .main-navigation{grid-template-columns:repeat(3,minmax(0,1fr));padding:6px;gap:5px;border-radius:20px}#gallery .atelier-masthead .main-navigation .nav{min-height:76px;font-size:12px;gap:4px;padding:7px 3px}#gallery .atelier-masthead .main-navigation .nav-symbol{width:35px;height:35px}#gallery .atelier-masthead .brand-dreamworlds{width:100%;margin:0 auto -2px}#gallery .atelier-masthead .header-controls{top:calc(100% + 8px);padding:16px}#gallery .atelier-masthead .header-controls::before{right:43px}}
#gallery .atelier-masthead .main-navigation .nav-name{display:none}
#gallery .atelier-masthead .main-navigation .nav-symbol{width:54px;height:54px}
#gallery .atelier-masthead .main-navigation .nav{min-height:78px}
#gallery .atelier-masthead .main-navigation .nav-tip{display:none!important}
.main-nav-tooltip{position:fixed;inset:0 auto auto 0;z-index:100001;box-sizing:border-box;width:max-content;min-width:104px;max-width:min(320px,calc(100vw - 24px));padding:14px 20px;border:2px solid #a7c29f;border-radius:14px;background:linear-gradient(130deg,#fffff4,#edf5e7);color:#315b42;box-shadow:0 12px 30px -7px #193e4277,inset 0 1px #fff;font:750 16px/1.45 system-ui;text-align:center;white-space:normal;overflow-wrap:anywhere;pointer-events:none;will-change:transform}
.main-nav-tooltip[hidden]{display:none!important}
body.dark .main-nav-tooltip{border-color:#a2c8b4;background:linear-gradient(130deg,#416265,#2b414f);color:#fff8df;box-shadow:0 14px 34px -8px #030d21cc,inset 0 1px #d9f2df33}
#account-menu-toggle[data-signed-in=true] .nav-symbol{filter:drop-shadow(0 0 4px #53a47770)!important}
#gallery .atelier-masthead #account-menu-toggle::after{content:'';position:absolute;display:block;width:10px;height:10px;left:calc(50% + 21px);top:calc(50% + 13px);border:2px solid #f5f6e8;border-radius:50%;background:#9a9b91;pointer-events:none}
#gallery .atelier-masthead #account-menu-toggle[data-signed-in=true]::after{background:#3f9264}
@media(max-width:850px){#gallery .atelier-masthead .main-navigation .nav-symbol{width:46px;height:46px}}
@media(max-width:600px){#gallery .atelier-masthead .main-navigation{grid-template-columns:repeat(6,minmax(0,1fr));padding:5px;gap:2px}#gallery .atelier-masthead .main-navigation .nav{min-height:57px;padding:6px 1px;border-radius:12px}#gallery .atelier-masthead .main-navigation .nav-symbol{width:36px;height:36px}}
body.painting #toast{left:var(--paint-toast-x,50%);top:var(--paint-toast-y,40dvh);bottom:auto;transform:translate(-50%,-40%);width:max-content;max-width:min(460px,calc(100vw - 50px));padding:17px 24px;border:1px solid #f3e7b994;border-radius:17px;background:#254e5bea;color:#fffceb;box-shadow:0 13px 38px #183a4e70,inset 0 1px #ffffff33;font:750 clamp(14px,2vw,17px)/1.55 system-ui;text-align:center;backdrop-filter:blur(10px);z-index:45;transition:opacity .3s,transform .3s}
body.painting #toast.visible{transform:translate(-50%,-50%)}
