/* mobile-header.css — maintained styles; declaration order preserves the existing cascade. */
@media(max-width:680px) {
  body>header { display: grid; grid-template-columns: minmax(0,1fr) 32px; grid-template-rows: 32px auto; align-items: center; row-gap: 10px; padding: 20px 6% 10px; }
  body>header .brand { grid-column: 1; grid-row: 1; justify-self: start; width: clamp(132px,38vw,160px); }
  body>header .brand img { width: 100%; height: auto; }
  body>header nav { grid-column: 1/-1; grid-row: 2; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: clamp(14px,4vw,18px); font-weight: 400; }
  body>header nav a { flex: none; min-height: 36px; padding: 4px 0 8px; white-space: nowrap; }
  body>header nav a[href='#work'] { order: 0; }
  body>header nav a[href='#about'] { order: 2; }
  body>header nav a[href='#strategy'] { order: 1; }
  body>header nav a[href='#contact'] { order: 3; }
  .case-check { top: 20px!important; right: 6%; width: 32px; height: 32px; transform: none; border-radius: 999px; padding: 0; }
  .case-check:hover,.case-check:focus-visible { width: 32px; border-radius: 999px; }
  .case-check img,.case-check:hover img,.case-check:focus-visible img { display: block; width: 18px; height: 18px; opacity: 1; }
  .case-check span,.case-check:hover span,.case-check:focus-visible span { display: none; }
  .text-panel-inner { padding-top: 135px; }
  .case-page>.case-content { padding-top: 135px; }
  .contact-page-inner { padding-top: 140px; }
  .strategy-page { padding-top: 140px; }
}
@media(max-width:680px) {
  .brand-footer .footer-brand.is-under-mobile-nav { opacity: 0; visibility: hidden; pointer-events: none; }
  .brand-footer .back-top { grid-column: 1/-1; justify-self: center; margin-bottom: 12px; }
}
@media(max-width:680px) {
  .case-check img,.case-check:hover img,.case-check:focus-visible img { left: auto; right: 7px; transform: translateY(-50%); }
}
@media(max-width:680px) {
  .case-check,.case-check:hover,.case-check:focus-visible { top: 50%!important; transform: translate(0,-50%); }
  .case-check.is-unavailable { transform: translate(12px,-50%); }
}

/* Mobile interaction targets, without enlarging the visible icons. */
@media(max-width:680px){
 body>header nav a{min-height:44px;display:flex;align-items:center}
 body>header nav a:active{opacity:.65}
 #mode-switch button{min-height:44px;touch-action:manipulation}
 .case-banner-dot{width:32px;height:32px;touch-action:manipulation}
 .brand-footer .back-top{position:relative}
 .brand-footer .back-top::before{content:"";position:absolute;inset:-8px}
 .strategy-report .strategy-model-branches>span{min-height:36px;display:flex;align-items:center;justify-content:center}
 .about-service summary,.work-load-more,.studio-lab-playback{touch-action:manipulation}
 .about-service summary:active,.strategy-service-banner:active{opacity:.85}
}

/* Mobile header search expands leftwards from the top-right icon. */
@media(max-width:680px){
 .case-check,.case-check:hover,.case-check:focus-visible{top:var(--case-search-anchor,36px)!important;right:6%;width:44px;height:44px;transform:translateY(-50%)}
 .case-check.is-unavailable{transform:translate(8px,-50%)}
 .case-check img,.case-check:hover img,.case-check:focus-visible img{left:50%;right:auto;transform:translate(-50%,-50%)}
 .case-check-search{top:calc(var(--case-search-anchor,36px) - 22px);bottom:auto;left:auto;right:6%;width:88%;height:44px;padding:3px 4px 3px 10px;transform:none;border-radius:22px;z-index:54}
 .case-check-search input{font-size:16px;padding:6px 8px;height:38px}
 .case-check-search button{width:36px;height:36px}
 .case-check-status{top:calc(var(--case-search-anchor,36px) + 28px);bottom:auto;left:6%;right:6%;z-index:54}
 body>header .brand,.brand-logo-layer{transition:opacity .22s ease}
 body.case-check-open>header .brand,body.case-check-open .brand-logo-layer{opacity:0;pointer-events:none}
}
@media(max-width:680px) and (prefers-reduced-motion:reduce){body>header .brand,.brand-logo-layer{transition:none}}

/* Quiet close glyph and keyboard-aware result count. */
@media(max-width:680px){
 .case-check-search button{background:transparent;color:#aaa;border:0;border-radius:0;font-size:0;width:36px;height:36px;position:relative}
 .case-check-search button:before,.case-check-search button:after{content:'';position:absolute;left:17px;top:10px;width:1.5px;height:16px;background:currentColor}
 .case-check-search button:before{transform:rotate(45deg)}
 .case-check-search button:after{transform:rotate(-45deg)}
 .case-check-search input::-webkit-search-cancel-button,.case-check-search input::-webkit-search-decoration{-webkit-appearance:none;appearance:none;display:none}
 .case-check-search input::-ms-clear{display:none}
 .case-check-status{top:auto;bottom:calc(var(--case-search-keyboard-inset,0px) + max(16px,env(safe-area-inset-bottom)));left:6%;right:6%;text-align:center;font-size:13px;line-height:1.5}
 .case-check-status strong{font-size:16px}
}

@media(max-width:680px){
 .case-check,.case-check:hover,.case-check:focus-visible{background:transparent;border:0;border-radius:0;box-shadow:none}
 .case-check img,.case-check:hover img,.case-check:focus-visible img{filter:brightness(0);opacity:.75}
}

@media(max-width:680px){.case-check img,.case-check:hover img,.case-check:focus-visible img{width:22px;height:22px}}

/* WORK starts below the complete mobile header, including the navigation row. */
@media(max-width:680px){main>#work{padding-top:calc(var(--nav-height,116px) + 16px)}}

/* The TEXT directory search stays below navigation after reaching it. */
@media(max-width:680px){
 .text-panel .text-case-search{position:relative;top:auto;z-index:auto;padding:0;background:transparent;box-shadow:none}
 .text-panel .text-case-search:before{display:none}
}

.text-search-dock{display:none}
@media(max-width:680px){
 .text-search-dock{display:block;position:fixed;left:6%;right:6%;height:44px;margin:0;z-index:54;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-24px);transition:opacity .24s ease,transform .32s cubic-bezier(.22,1,.36,1),visibility .24s}
 .text-search-dock.is-visible{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
 .text-search-dock input{display:block;width:100%;height:44px;padding:10px 13px;background:#292929;color:#ddd;border:0;border-radius:6px;font:inherit;font-size:16px;outline:none}
 .text-search-dock input::placeholder{color:#858585}
 body.text-search-docked>header .brand,body.text-search-docked .brand-logo-layer{opacity:0;pointer-events:none}
}
@media(prefers-reduced-motion:reduce){.text-search-dock{transition:none}}

/* Preserve breathing room before falling back to the two-row header. */
@media(min-width:681px){body>header{column-gap:28px}body>header .brand{flex-shrink:0}}
@media(max-width:680px){body>header{row-gap:12px}body>header nav{grid-row:2;grid-column:1/-1}}
