/* All rules are scoped to the new dialog. The imported hero stays untouched. */
#studio-menu-panel.popup-menu {
 --menu-edge:clamp(24px,4.2vw,80px);
 position:fixed;inset:0;width:100%;max-width:none;
 height:100vh;height:100dvh;max-height:none;
 box-sizing:border-box;margin:0;padding:0;border:0;
 color:#f4f7fb;background:linear-gradient(125deg,#14243c 0%,#0b1728 55%,#060e1b 100%);
 font:400 16px/1.5 'IBM Plex Sans',sans-serif;
 overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
 scrollbar-width:thin;scrollbar-color:#526a98 #0b1728;
 box-shadow:none;opacity:0;transition:opacity 240ms ease;
}
html[lang='th'] #studio-menu-panel.popup-menu {font-family:'IBM Plex Sans Thai','IBM Plex Sans',sans-serif;}
#studio-menu-panel.popup-menu[open] {display:block;}
#studio-menu-panel.popup-menu[data-state='open'] {opacity:1;}
#studio-menu-panel.popup-menu::backdrop {background:#060e1b;backdrop-filter:none;opacity:0;transition:opacity 240ms ease;}
#studio-menu-panel.popup-menu[data-state='open']::backdrop {opacity:1;}
/* Route handoff is already an open menu, not a fresh entrance animation. */
#studio-menu-panel.popup-menu[data-restore='true'],
#studio-menu-panel.popup-menu[data-restore='true']::backdrop {opacity:1;transition:none;}
#studio-menu-panel.popup-menu[data-restore='true'] .popup-link {animation:none;}
.popup-menu .popup-legacy[hidden] {display:none!important;}
.popup-menu .popup-wordmark {filter:brightness(0) invert(1);}
.popup-menu .popup-top {
 position:sticky;top:0;z-index:2;
 display:flex;justify-content:space-between;align-items:center;
 min-height:112px;box-sizing:border-box;
 padding:max(24px,env(safe-area-inset-top)) max(var(--menu-edge),env(safe-area-inset-right)) 24px max(var(--menu-edge),env(safe-area-inset-left));
}
.popup-menu[data-scrolled='true'] .popup-top {background:#101e32f5;backdrop-filter:blur(12px);}
.popup-menu .popup-wordmark {display:block;object-fit:contain;width:156px;height:54px;}
.popup-menu .popup-tools {display:flex;align-items:center;gap:clamp(24px,3vw,56px);}
.popup-menu .popup-languages {display:flex;align-items:center;gap:10px;font:400 14px/1 'IBM Plex Sans',sans-serif;}
.popup-menu .popup-languages a {display:grid;place-items:center;min-width:30px;min-height:44px;color:#f4f7fb;text-decoration:none;}
.popup-menu .popup-languages [aria-current='page'] {text-decoration:underline;text-underline-offset:6px;text-decoration-thickness:1px;}
.popup-menu .popup-languages span {color:#94a4bb;}
.popup-menu .popup-close {
 display:grid;place-items:center;position:relative;flex-shrink:0;width:48px;height:48px;
 padding:0;border:1px solid #b3c1d451;border-radius:50%;background:transparent;color:inherit;cursor:pointer;
 transition:background 160ms ease,border-color 160ms ease;
}
.popup-menu .popup-close span::before,.popup-menu .popup-close span::after {content:'';position:absolute;left:13px;top:23px;width:20px;height:1px;background:currentColor;transform:rotate(45deg);}
.popup-menu .popup-close span::after {transform:rotate(-45deg);}
.popup-menu .popup-close:hover {background:#ffffff0c;border-color:#e8eef5;}
.popup-menu .popup-content {
 display:flex;flex-direction:column;justify-content:center;
 min-height:calc(100dvh - 112px);box-sizing:border-box;
 padding:clamp(20px,3vh,48px) max(var(--menu-edge),env(safe-area-inset-right)) max(30px,env(safe-area-inset-bottom)) max(var(--menu-edge),env(safe-area-inset-left));
}
.popup-menu .popup-navigation {
 display:block;width:min(100%,1200px);margin:auto;
}
.popup-menu .popup-navigation .popup-link {
 display:grid;grid-template-columns:40px minmax(0,1fr) 48px;align-items:center;gap:clamp(16px,2vw,36px);
 box-sizing:border-box;min-height:64px;margin:0;padding:clamp(10px,1.7vh,23px) 0;
 color:#f4f7fb;text-decoration:none;border-bottom:1px solid #c5d4e51c;
 line-height:1.18;font-size:clamp(30px,4.35vw,76px);font-weight:400;letter-spacing:-.025em;
 animation:popup-row-enter 560ms cubic-bezier(.22,.65,.25,1) both;animation-delay:calc(45ms * var(--order) + 60ms);
}
.popup-menu .popup-link__number {align-self:center;color:#9cacc3;font:400 12px/1.5 'IBM Plex Sans',sans-serif;letter-spacing:.06em;}
.popup-menu .popup-link__text {min-width:0;overflow-wrap:anywhere;transition:color 160ms ease;}
.popup-menu .popup-link__arrow {justify-self:end;font:300 clamp(24px,2.5vw,42px)/1 'IBM Plex Sans',sans-serif;color:#a7bad3;opacity:0;transform:translate(-6px,6px);transition:opacity 160ms ease,transform 160ms ease;}
.popup-menu .popup-link[href]:hover .popup-link__arrow,.popup-menu .popup-link[href]:focus-visible .popup-link__arrow {opacity:1;transform:none;}
.popup-menu .popup-link[href]:hover .popup-link__text {color:#bfcfe6;}
.popup-menu .popup-navigation .popup-link[aria-disabled='true'] {opacity:1;color:#c2cbd9;cursor:default;}
.popup-menu .popup-link[aria-disabled='true'] .popup-link__arrow {visibility:hidden;}
.popup-menu :is(a,button):focus-visible {outline:2px solid #c5d8f4;outline-offset:6px;border-radius:2px;}
.popup-menu .popup-close:focus-visible {border-radius:50%;}
.popup-menu .popup-footer {display:flex;justify-content:space-between;gap:24px;width:min(100%,1200px);box-sizing:border-box;margin:clamp(28px,5vh,64px) auto 0;color:#bac7da;font-size:13px;line-height:1.6;}
.popup-menu .popup-footer p {margin:0;}
.popup-menu .popup-footer #menu-availability {font-size:12px;color:#9aabc2;text-align:right;}
.popup-menu[data-state='closing'] .popup-link {animation:none;}
html[lang='th'] .popup-menu .popup-navigation .popup-link {font-size:clamp(28px,3.9vw,68px);line-height:1.45;letter-spacing:0;}
@keyframes popup-row-enter {from {opacity:0;transform:translateY(16px);}to {opacity:1;transform:translateY(0);}}
@media(max-width:1024px) {
 .popup-menu .popup-content {justify-content:center;}
 .popup-menu .popup-navigation .popup-link {font-size:clamp(30px,5vw,48px);padding-block:20px;}
 html[lang='th'] .popup-menu .popup-navigation .popup-link {font-size:clamp(28px,4.8vw,46px);}
}
@media(max-width:600px) {
 .popup-menu .popup-top {min-height:96px;padding-top:max(20px,env(safe-area-inset-top));padding-bottom:20px;}
 .popup-menu .popup-wordmark {width:120px;height:42px;}
 .popup-menu .popup-tools {gap:16px;}
 .popup-menu .popup-languages {gap:5px;font-size:13px;}
 .popup-menu .popup-close {width:44px;height:44px;}
 .popup-menu .popup-close span::before,.popup-menu .popup-close span::after {left:11px;top:21px;}
 .popup-menu .popup-content {min-height:calc(100dvh - 96px);padding-top:20px;}
 .popup-menu .popup-navigation .popup-link {grid-template-columns:22px minmax(0,1fr) 20px;gap:12px;padding:20px 0;font-size:clamp(27px,7.7vw,38px);line-height:1.24;}
 html[lang='th'] .popup-menu .popup-navigation .popup-link {font-size:clamp(24px,6.8vw,32px);line-height:1.5;}
 .popup-menu .popup-link__number {font-size:10px;}
 .popup-menu .popup-footer {display:block;font-size:12px;margin-top:32px;}
 .popup-menu .popup-footer #menu-availability {text-align:left;margin-top:6px;font-size:11px;}
}
@media(max-height:700px) and (min-width:601px) {
 .popup-menu .popup-top {min-height:88px;padding-block:16px;}
 .popup-menu .popup-content {min-height:calc(100dvh - 88px);padding-top:12px;}
 .popup-menu .popup-navigation .popup-link {font-size:clamp(28px,3.7vw,48px);padding-block:10px;}
 html[lang='th'] .popup-menu .popup-navigation .popup-link {font-size:clamp(26px,3.5vw,42px);padding-block:8px;}
 .popup-menu .popup-footer {margin-top:24px;}
}
@media(prefers-reduced-motion:reduce) {
 #studio-menu-panel.popup-menu,#studio-menu-panel.popup-menu::backdrop,.popup-menu * {animation:none!important;transition:none!important;scroll-behavior:auto!important;}
}

/* Menu home link retains the original wordmark box and existing focus treatment. */
.popup-menu .popup-home {display:block;flex:none;line-height:0;cursor:pointer;}
