:root{
 --navy:#003f8f;--navy2:#062e65;--blue:#0b69c7;--green:#5aae35;--orange:#ed7a16;--purple:#8a42ad;
 --text:#1b2735;--muted:#657080;--line:#e1e7ee;--soft:#f5f8fb;--white:#fff;
 --shadow:0 16px 40px rgba(22,47,77,.09);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:"Noto Sans JP","Yu Gothic",Meiryo,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:#fff;line-height:1.8}
a{text-decoration:none;color:inherit}
button{font:inherit}
.container{width:min(1180px,calc(100% - 48px));margin:auto}

.site-header{background:#fff;position:relative;z-index:50;border-top:3px solid var(--navy)}
.header-top{height:108px;display:flex;align-items:center;gap:28px}
.brand{display:flex;align-items:center;gap:16px;margin-right:auto}
.brand-mark{width:62px;height:62px;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:38px;font-weight:900;clip-path:polygon(18% 0,100% 0,100% 100%,18% 100%,0 78%,0 22%)}
.brand-text small,.brand-text em{display:block;font-style:normal}.brand-text small{font-size:13px;font-weight:700}.brand-text strong{display:block;font-size:24px;line-height:1.25;color:var(--navy)}.brand-text em{font-size:11px;color:#526070}
.utility{display:flex;gap:28px;font-size:13px;font-weight:700}.utility a:before{content:"›";color:var(--blue);margin-right:8px}
.menu-button{display:none;border:0;background:none;width:44px;height:44px;padding:8px}.menu-button span{display:block;height:2px;background:#111;margin:6px 0}
.global-nav{background:linear-gradient(90deg,#0a4fa4,#003e89);color:#fff}
.nav-inner{display:grid;grid-template-columns:90px repeat(4,1fr)}
.home-link,.nav-toggle{height:62px;display:flex;align-items:center;justify-content:center;border-left:1px solid rgba(255,255,255,.24);color:#fff;font-weight:800}
.home-link{font-size:26px}
.nav-group{position:relative}.nav-group:last-child{border-right:1px solid rgba(255,255,255,.24)}
.nav-toggle{width:100%;background:none;border-top:0;border-bottom:0;border-right:0;cursor:pointer;font-size:16px;gap:18px}
.nav-toggle:hover,.home-link:hover{background:rgba(255,255,255,.08)}
.nav-panel{position:absolute;top:100%;left:0;min-width:100%;background:#fff;color:#1b2735;box-shadow:var(--shadow);opacity:0;visibility:hidden;transform:translateY(8px);transition:.2s;z-index:30;padding:8px}
.nav-group:hover .nav-panel,.nav-group.is-open .nav-panel{opacity:1;visibility:visible;transform:none}
.nav-panel a{display:block;padding:12px 15px;border-bottom:1px solid #edf0f3;font-size:14px}.nav-panel a:hover{background:#f3f7fb;color:var(--blue)}

.section{padding:92px 0}
.section-kicker{margin:0 0 10px;font-size:12px;font-weight:900;letter-spacing:.18em;color:var(--blue)}
.section-kicker.light{color:#9ad7ff}
.section-heading{max-width:780px;margin-bottom:42px}.section-heading h2{font-size:clamp(34px,4vw,54px);line-height:1.35;margin:0 0 18px;color:#102a4a;letter-spacing:-.025em}.section-heading p:last-child{color:var(--muted);font-size:16px}
.section-heading.compact{margin-bottom:34px}
.button{display:inline-flex;align-items:center;justify-content:space-between;gap:26px;min-width:280px;padding:15px 20px;font-weight:800;border-radius:4px;transition:.2s}
.button-primary{background:var(--navy);color:#fff}.button-primary:hover{background:#082f65;transform:translateY(-2px)}
.button-light{background:#fff;color:#0b3b75}.button-light:hover{transform:translateY(-2px)}
.text-link{font-weight:800;color:var(--blue);text-decoration:underline;text-underline-offset:5px}
.site-footer{background:#062c63;color:#fff;padding:52px 0 24px}.footer-main{display:flex;justify-content:space-between;gap:50px}.footer-brand{display:flex;align-items:center;gap:14px}.footer-mark{background:#fff;color:#0b4f9f}.footer-brand small,.footer-brand strong{display:block}.footer-brand strong{font-size:20px}.footer-nav{display:grid;grid-template-columns:repeat(4,auto);gap:10px 26px;font-size:13px}.footer-nav a:hover{text-decoration:underline}.footer-bottom{border-top:1px solid rgba(255,255,255,.18);margin-top:32px;padding-top:18px;display:flex;justify-content:space-between;font-size:12px;color:#c9d7e8}
.page-top{position:fixed;right:24px;bottom:24px;width:50px;height:50px;border-radius:50%;border:0;background:#fff;color:var(--navy);box-shadow:0 8px 30px rgba(0,0,0,.18);font-size:22px;cursor:pointer;opacity:0;pointer-events:none;transition:.2s;z-index:40}.page-top.is-visible{opacity:1;pointer-events:auto}

@media(max-width:900px){
 .header-top{height:82px}.brand-mark{width:50px;height:50px;font-size:30px}.brand-text strong{font-size:19px}.brand-text small{font-size:11px}.brand-text em{display:none}.utility{display:none}.menu-button{display:block}
 .global-nav{display:none}.global-nav.is-open{display:block}.nav-inner{display:block;width:100%}.home-link,.nav-toggle{height:54px;border-bottom:1px solid rgba(255,255,255,.18);justify-content:flex-start;padding:0 24px}.nav-panel{position:static;opacity:1;visibility:visible;transform:none;display:none;box-shadow:none}.nav-group.is-open .nav-panel{display:block}
 .footer-main{display:block}.footer-nav{grid-template-columns:repeat(2,1fr);margin-top:30px}
}
@media(max-width:600px){
 .container{width:min(100% - 28px,1180px)}.brand-text small{font-size:9px}.brand-text strong{font-size:16px}.brand-mark{width:43px;height:43px;font-size:25px}.section{padding:64px 0}
 .footer-nav{grid-template-columns:1fr 1fr}.footer-bottom{display:block}.footer-bottom small{display:block;margin-top:10px}
}


/* Adopted Mechanical Systems Engineering logo */
.brand-logo{
  width:78px;
  height:78px;
  object-fit:contain;
  flex:0 0 auto;
}
.footer-logo{
  width:70px;
  height:70px;
  background:#fff;
  border-radius:10px;
  padding:4px;
}
@media(max-width:900px){
  .brand-logo{width:58px;height:58px}
}
@media(max-width:600px){
  .brand-logo{width:50px;height:50px}
  .footer-logo{width:56px;height:56px}
}


/* ===== v24: Instagram shortcut in top utility area ===== */
.header-instagram{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  margin-left:8px;
  border-radius:50%;
  color:#0a4fa4;
  background:#f1f5f9;
  transition:background .2s ease, color .2s ease, transform .2s ease;
  vertical-align:middle;
}
.header-instagram svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
}
.header-instagram .ig-dot{
  fill:currentColor;
  stroke:none;
}
.header-instagram:hover{
  background:#0a4fa4;
  color:#fff;
  transform:translateY(-1px);
}
@media(max-width:700px){
  .header-instagram{
    width:28px;
    height:28px;
    margin-left:5px;
  }
}


/* ===== v25: clearer Instagram text button ===== */
.header-instagram.header-instagram-button{
  width:auto;
  min-width:112px;
  height:32px;
  padding:0 13px;
  gap:7px;
  border-radius:5px;
  background:#fff;
  border:1px solid #d8dee5;
  color:#333;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
}
.header-instagram.header-instagram-button svg{
  width:17px;
  height:17px;
  color:#c13584;
  flex:0 0 auto;
}
.header-instagram.header-instagram-button:hover{
  background:#f7f7f7;
  color:#111;
  border-color:#c8ced5;
  transform:none;
}
@media(max-width:700px){
  .header-instagram.header-instagram-button{
    min-width:auto;
    padding:0 9px;
  }
}


/* ===== v26: unify Instagram buttons ===== */
.instagram-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:32px;
  padding:0 13px;
  border:1px solid #d8dee5;
  border-radius:5px;
  background:#fff;
  color:#333;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
}
.instagram-button:hover{
  background:#f7f7f7;
  color:#111;
  border-color:#c8ced5;
}


/* ===== v27: exact same Instagram button everywhere ===== */
.instagram-button{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  width:auto !important;
  min-width:112px !important;
  height:32px !important;
  min-height:32px !important;
  padding:0 13px !important;
  margin:0 !important;
  border:1px solid #d8dee5 !important;
  border-radius:5px !important;
  background:#fff !important;
  color:#333 !important;
  font-size:12px !important;
  font-weight:700 !important;
  line-height:1 !important;
  text-decoration:none !important;
  box-shadow:none !important;
  transform:none !important;
}
.instagram-button svg{
  display:block !important;
  width:17px !important;
  height:17px !important;
  flex:0 0 17px !important;
  fill:none !important;
  stroke:#c13584 !important;
  stroke-width:1.8 !important;
}
.instagram-button svg .ig-dot{
  fill:#c13584 !important;
  stroke:none !important;
}
.instagram-button:hover{
  background:#f7f7f7 !important;
  color:#111 !important;
  border-color:#c8ced5 !important;
}


/* ===== v28: Instagram button sized to match the X button ===== */
.instagram-button{
  min-width:180px !important;
  height:48px !important;
  min-height:48px !important;
  padding:0 22px !important;
  border-radius:6px !important;
  font-size:14px !important;
}
.instagram-button svg{
  width:20px !important;
  height:20px !important;
  flex-basis:20px !important;
}


/* ===== v29: header stays compact; lower Instagram exactly matches X ===== */
/* Top utility Instagram: restore compact size */
.utility .instagram-button{
  min-width:112px !important;
  width:auto !important;
  height:32px !important;
  min-height:32px !important;
  padding:0 13px !important;
  font-size:12px !important;
}
.utility .instagram-button svg{
  width:17px !important;
  height:17px !important;
  flex-basis:17px !important;
}

/* Lower SNS Instagram: use the exact box model of .social-links a / X */
.social-links .instagram-button{
  min-width:180px !important;
  width:auto !important;
  height:auto !important;
  min-height:0 !important;
  padding:14px 18px !important;
  font-size:inherit !important;
  line-height:normal !important;
  justify-content:space-between !important;
}
.social-links .instagram-button svg{
  width:20px !important;
  height:20px !important;
  flex-basis:20px !important;
}

/* preparing navigation items */
.nav-preparing{display:inline-flex;align-items:center;gap:5px;opacity:.72;cursor:default}
.nav-preparing small{font-size:.62em;font-weight:800;color:#c62828;white-space:nowrap}

/* v13: align preparing nav items with normal navigation links */
.nav-preparing{
  font:inherit;
  font-size:inherit;
  font-weight:inherit;
  line-height:inherit;
  letter-spacing:inherit;
  vertical-align:middle;
}
.nav-preparing small{
  font-size:9px;
  line-height:1;
}

/* v14: keep each preparing menu item as one normal nav item */
.nav-preparing{
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  white-space:nowrap;
}
.nav-preparing small{
  display:block;
  font-size:8px;
  line-height:1;
}

/* v15: dropdown preparing items align with 授業紹介 */
.nav-preparing{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100%;
  box-sizing:border-box;
  text-align:left !important;
  white-space:nowrap;
}
.nav-preparing small{
  display:inline-block;
  margin-left:7px;
  font-size:8px;
  line-height:1;
}

/* v16: preparing entries exactly match normal dropdown item typography/alignment */
.nav-preparing{
  display:block !important;
  width:auto !important;
  margin:0 !important;
  padding:14px 22px !important;
  box-sizing:border-box !important;
  color:#1d2630 !important;
  font-size:16px !important;
  font-weight:400 !important;
  line-height:1.4 !important;
  letter-spacing:0 !important;
  text-align:left !important;
  white-space:nowrap !important;
  border-top:1px solid #e5e9ed;
}
.nav-preparing small{
  display:inline !important;
  margin-left:7px !important;
  padding:0 !important;
  color:#d84b4b !important;
  font-size:9px !important;
  font-weight:800 !important;
  line-height:1 !important;
  vertical-align:middle !important;
}

/* v17: slightly reduce preparing dropdown item text */
.nav-preparing{
  font-size:15px !important;
}

/* v18: reduce preparing dropdown item text a little more */
.nav-preparing{
  font-size:14px !important;
}

.footer-preparing{color:inherit;opacity:.72;cursor:default}

/* X upcoming badge beside Instagram */
.social-link-x-upcoming{display:inline-flex;align-items:center;gap:6px;opacity:.62;cursor:default;user-select:none}
.social-x-mark{display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:900;line-height:1}
.social-x-label{font-size:10px;font-weight:800;white-space:nowrap}

/* RELEASE FINAL — center copyright in footer */
.footer-bottom,
.footer-copy,
.footer-copyright{
  text-align:center !important;
}
.footer-bottom{
  justify-content:center !important;
}
