/* Mobile navigation: retain the existing action buttons and click handlers. */
html.hcc-mode{min-width:0!important}
@media screen and (max-width:1150px){
  html:not(.hw-order-page-root),
  html:not(.hw-order-page-root) body:not(.hw-order-page){overflow-x:clip!important}
  body .v2-header{position:sticky;top:0;z-index:9000;overflow:visible;background:#fff!important}
  body .v2-header .v2-nav-wrap{height:auto;min-height:62px;flex-wrap:wrap;gap:8px 6px;padding:10px 12px 8px}
  body .v2-header .v2-brand{flex:1 1 60px;min-width:0}
  body .v2-header .v2-nav{
    display:grid;position:static;order:5;flex:1 0 100%;width:100%;min-width:0;
    grid-template-columns:1.45fr repeat(3,minmax(0,1fr));gap:5px;
    padding:0;margin:0;max-height:none;overflow:visible;border:0;box-shadow:none;background:#fff;
  }
  body.vehicle-specs-body .v2-header .v2-nav{grid-template-columns:1.45fr repeat(3,minmax(0,1fr))}
  body .v2-header .v2-nav>[data-nav]{min-height:44px;padding:6px 2px;font-size:12px;line-height:1.3;font-weight:800;white-space:normal;word-break:keep-all;text-align:center;display:flex;align-items:center;justify-content:center}
  body .v2-header .v2-nav>[data-nav="fare"]{order:1}
  body .v2-header .v2-nav>[data-nav="order"]{order:2}
  body .v2-header .v2-nav>[data-nav="lookup"]{order:3}
  body .v2-header .v2-nav>[data-nav="specs"]{order:4}
  body .v2-header .v2-nav>[data-nav="calculator"]{order:1}
  body .v2-header .v2-nav>:is([data-nav="service"],[data-nav="help"],[data-nav="company"]){display:none;order:6}
  body .v2-header.menu-open .v2-nav>:is([data-nav="service"],[data-nav="help"],[data-nav="company"]){display:flex}
  .v2-header .v2-menu-btn{align-self:center}
  #serviceIntro,#companyIntro{scroll-margin-top:130px}
  html.hcc-mode body{overflow:visible!important}
  #hccApp>.hcc-header{position:sticky;top:0;z-index:9000;background:#e5f1fb;box-shadow:0 2px 8px #173b5712}
  .v2-overlay .v2-dialog-head,
  body.hw-order-page #v2FareOverlay .v2-dialog-head{position:sticky;top:0;z-index:50;flex-shrink:0}
  .v2-overlay .v2-dialog-head{background:#fff}
  .lookup-card>.lookup-head{flex-shrink:0;z-index:2}
  /* The order manager scrolls the page; keep its search and actions visible. */
  body>.wrap>.card:has(>.card-head #q){overflow:visible}
  body>.wrap>.card>.card-head:has(#q){position:sticky;top:0;z-index:40;background:#f8fafc;flex-wrap:wrap;border-radius:12px 12px 0 0;box-shadow:0 2px 8px #173b5712}
  body>.wrap>.card>.card-head:has(#q) .search{flex:1 1 100%;min-width:0}
  body>.wrap>.card>.card-head:has(#q) .controls{gap:6px}
}
@media screen and (max-width:360px){
  body .v2-header .v2-nav-wrap{padding-inline:8px;gap:7px 4px}
  body .v2-header .v2-nav{gap:4px}
  body .v2-header .v2-nav>[data-nav]{font-size:11px}
}

/* Public pages share one fixed main menu, including separate order tabs. */
html.hw-site-shell{--hw-site-nav-height:78px;scroll-padding-top:calc(var(--hw-site-nav-height) + 12px)}
html.hw-site-shell body:has(>.v2-header){padding-top:var(--hw-site-nav-height)!important}
html.hw-site-shell body>.v2-header{display:block!important;position:fixed!important;inset:0 0 auto!important;width:100%;max-width:100%;z-index:4000000!important;background:#fff!important}
html.hw-site-shell #hccApp>.hcc-header{display:none!important}
html.hw-site-shell.hw-order-page-root body.hw-order-page{padding:0!important}
html.hw-site-shell body.hw-order-page #v2FareOverlay{top:var(--hw-site-nav-height)!important;bottom:0!important;height:calc(100dvh - var(--hw-site-nav-height))!important}
html.hw-site-shell body.hw-order-page #v2FareOverlay .v2-dialog-head{position:static!important;top:auto!important}
html.hw-site-shell body:not(.hw-order-page) #v2FareOverlay,
html.hw-site-shell #lookupModal{top:var(--hw-site-nav-height)!important;bottom:0!important;height:auto!important;max-height:calc(100dvh - var(--hw-site-nav-height))!important}
html.hw-site-shell body:not(.hw-order-page) #v2FareOverlay .v2-dialog{max-height:calc(100dvh - var(--hw-site-nav-height) - 24px)!important}
html.hw-site-shell #lookupModal .lookup-card{max-height:calc(100dvh - var(--hw-site-nav-height) - 36px)!important}
html.hw-site-shell #hwChatRoot{display:block!important}
@media(max-width:1150px){html.hw-site-shell{--hw-site-nav-height:120px}html.hw-site-shell body.vehicle-specs-body .v2-header .v2-nav{grid-template-columns:1.45fr repeat(3,minmax(0,1fr))}}
@media(min-width:1151px){
 html.hw-site-shell body #hwChatPanel{top:max(112px,calc(var(--hw-site-nav-height) + 8px));max-height:calc(100dvh - max(112px,calc(var(--hw-site-nav-height) + 8px)) - 8px)}
}

@media(max-width:600px){html.hw-site-shell body:not(.hw-order-page) #v2FareOverlay{padding:12px 10px!important}}

.v2-header .v2-nav>[data-nav="calculator"]{--nav-bg:#ffbf5a;--nav-fg:#17354d;--nav-border:#df9b35;background:var(--nav-bg);color:var(--nav-fg);border-color:var(--nav-border)}

/* Mobile: all seven menus remain visible in two rows (4 + 3). */
@media screen and (max-width:1150px){
  body .v2-header .v2-nav,
  body.vehicle-specs-body .v2-header .v2-nav,
  html.hw-site-shell body.vehicle-specs-body .v2-header .v2-nav{
    grid-template-columns:repeat(12,minmax(0,1fr));gap:6px;
  }
  body .v2-header .v2-nav>[data-nav]{grid-column:span 3;min-width:0;min-height:44px;box-sizing:border-box;word-break:normal;overflow-wrap:anywhere}
  body .v2-header .v2-nav>:is([data-nav="service"],[data-nav="help"],[data-nav="company"]){display:flex;grid-column:span 4}
  body .v2-header .v2-nav>[data-nav="calculator"]{grid-column:span 4}
  body .v2-header .v2-nav>[data-nav="order"]{grid-column:span 2;word-break:keep-all;overflow-wrap:normal}
  body .v2-header .v2-nav>[data-nav="service"]{order:6}
  body .v2-header .v2-nav>[data-nav="help"]{order:7}
  body .v2-header .v2-nav>[data-nav="company"]{order:8}
  body .v2-header .v2-menu-btn{display:none!important}
  html.hw-site-shell{--hw-site-nav-height:170px}
}

/* 제주운송료 추가: 모바일은 8개 메뉴를 4 + 4로 표시합니다. */
.v2-header .v2-nav>[data-nav="jeju"]{--nav-bg:#e2f3f3;--nav-fg:#075f67;--nav-border:#add6d7;background:var(--nav-bg);color:var(--nav-fg);border-color:var(--nav-border)}
@media(max-width:1150px){
 body .v2-header .v2-nav,body.vehicle-specs-body .v2-header .v2-nav,html.hw-site-shell body.vehicle-specs-body .v2-header .v2-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
 body .v2-header .v2-nav>[data-nav],body .v2-header .v2-nav>:is([data-nav="service"],[data-nav="help"],[data-nav="company"],[data-nav="calculator"],[data-nav="order"]){grid-column:span 1}
 body .v2-header .v2-nav>[data-nav="jeju"]{order:4;display:flex}
 body .v2-header .v2-nav>[data-nav="specs"]{order:5}
}

/* Position Jeju consistently even when older page styles set flex/grid order. */
body .v2-header .v2-nav>[data-nav="lookup"]{order:3!important}
body .v2-header .v2-nav>[data-nav="jeju"]{order:4!important}
body .v2-header .v2-nav>[data-nav="specs"]{order:5!important}
@media(min-width:1151px){
 body .v2-header .v2-nav>[data-nav="service"]{order:0!important}
 body .v2-header .v2-nav>[data-nav="calculator"],body .v2-header .v2-nav>[data-nav="fare"]{order:1!important}
 body .v2-header .v2-nav>[data-nav="order"]{order:2!important}
 body .v2-header .v2-nav>[data-nav="help"]{order:7!important}
 body .v2-header .v2-nav>[data-nav="company"]{order:8!important}
}
