/* UBIWORKS — production layer on top of the design's inline styles */
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
header{position:sticky!important;top:0;z-index:100}
[id]{scroll-margin-top:96px}
body{overflow-x:hidden}
img,svg,video,iframe{max-width:100%}
img{height:auto}
:focus-visible{outline:3px solid #34D6A4;outline-offset:2px}
.nav-toggle{display:none}
#form-status.ok{color:#34D6A4}#form-status.err{color:#FF8A92}
button[disabled]{opacity:.6;cursor:wait}
header>div{flex-wrap:nowrap!important}
nav[aria-label="주 메뉴"] a,nav[aria-label="Main menu"] a,header>div>div:last-of-type a{white-space:nowrap}

/* ---------- tablet & below: main menu behind a toggle ---------- */
@media (max-width:1320px){
  html[lang="en"] header>div{gap:12px!important}
  /* header: collapse main menu behind a toggle */
  [id]{scroll-margin-top:80px}
  header>div{min-height:64px!important;padding:0 20px!important;flex-wrap:nowrap!important}
  .nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid #2A3B7A;border-radius:10px;background:transparent;color:#FFFFFF;font-size:20px;cursor:pointer;order:3;flex:0 0 auto}
  nav[aria-label="주 메뉴"],nav[aria-label="Main menu"]{display:none!important;position:absolute;left:0;right:0;top:100%;z-index:50;flex-direction:column!important;gap:0!important;background:#060C22;border-bottom:1px solid #1A2550;padding:8px 20px 16px}
  nav[aria-label="주 메뉴"] a,nav[aria-label="Main menu"] a{display:block;padding:14px 4px;border-bottom:1px solid #13204D}
  header.nav-open nav[aria-label="주 메뉴"],header.nav-open nav[aria-label="Main menu"]{display:flex!important}
  header>div>div:last-of-type{gap:10px!important;margin-left:auto}
  header>div>a:first-child img{height:24px!important}
  header>div>div:last-of-type>a:last-child{white-space:nowrap}
  header>div>div:last-of-type>a:last-child{min-height:38px!important;padding:0 14px!important;font-size:13px!important}
}

/* ---------- mobile ---------- */
@media (max-width:900px){
  /* about sub tabs: horizontal scroll */
  nav[aria-label="회사소개 하위 메뉴"],nav[aria-label="About submenu"]{flex-wrap:nowrap!important;overflow-x:auto;padding-left:20px!important;padding-right:20px!important;-webkit-overflow-scrolling:touch}
  nav[aria-label="회사소개 하위 메뉴"] a,nav[aria-label="About submenu"] a{white-space:nowrap;padding:0 16px!important;min-height:46px!important;font-size:14px!important}

  /* spacing */
  [style*="padding: 120px 40px"],[style*="padding: 100px 40px"]{padding:64px 20px!important}
  [style*="padding: 88px 40px"]{padding:56px 20px 28px!important}
  [style*="padding: 0 40px"]{padding-left:20px!important;padding-right:20px!important}
  [style*="padding: 48px 40px"]{padding:36px 20px!important}
  [style*="padding: 40px 36px"],[style*="padding: 36px"]{padding:24px 20px!important}
  [style*="gap: 64px"]{gap:36px!important}

  /* type scale */
  [style*="font-size: 72px"],[style*="font-size: 68px"],[style*="font-size: 64px"],[style*="font-size: 60px"]{font-size:38px!important;line-height:1.2!important}
  [style*="font-size: 56px"],[style*="font-size: 52px"]{font-size:34px!important;line-height:1.25!important}
  [style*="font-size: 48px"],[style*="font-size: 44px"]{font-size:30px!important;line-height:1.3!important}
  [style*="font-size: 40px"],[style*="font-size: 36px"]{font-size:26px!important}
  [style*="font-size: 96px"]{font-size:72px!important}
  [style*="font-size: 20px"],[style*="font-size: 18px"]{font-size:16px!important}
  [style*="white-space: nowrap"]{white-space:normal!important}
  h1,h2,h3{word-break:keep-all;overflow-wrap:anywhere}

  /* layout: single column */
  [style*="grid-template-columns"]{grid-template-columns:1fr!important}
  /* product photo strips (main + 2 small) stay side by side */
  [style*="grid-template-columns: 2fr 1fr"]{grid-template-columns:2fr 1fr!important}
  [style*="flex: 1 1"],[style*="flex: 0 1"]{flex-basis:100%!important}
  [style*="flex: 0 0 140px"]{flex-basis:auto!important}
  [style*="display: flex"][style*="gap: 40px"]{flex-wrap:wrap}
  [style*="min-height: 340px"]{min-height:240px!important}
  [style*="height: 440px"]{height:320px!important}
  [style*="height: 240px"]{height:200px!important}
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  /* quality stepper: hide the connector line in single column */
  [style*="linear-gradient(90deg, #34D6A4, #1FA7E6, #1F3FA8"]{display:none}
  /* history rows */
  [style*="flex: 0 0 140px"]{font-size:30px!important}
  [style*="padding: 48px 44px"]{padding:24px 18px!important}
  section *{min-width:0}
  p,h2,h3,h4,li,span{overflow-wrap:anywhere}
  /* decorative oversized marks */
  img[aria-hidden="true"][style*="opacity: 0.0"]{display:none}
}
@media (max-width:480px){
  header>div>div:last-of-type>a:last-child{display:none!important}
  [style*="font-size: 56px"],[style*="font-size: 52px"]{font-size:30px!important}
  [style*="font-size: 48px"],[style*="font-size: 44px"]{font-size:27px!important}
  [style*="flex: 0 0 96px"]{flex-basis:80px!important}
}
@media print{header nav,.nav-toggle{display:none!important}}
