/* Public shell only. Specificity protects it from existing page styles. */
:root { --header-height: calc(90px + env(safe-area-inset-top, 0px)); }
body:has(>.site-header):not([data-page=home]) { padding-top: var(--header-height); }
.site-header.site-header.site-header,
.navigation#navigation,
.site-footer#footer {
  --shell-ink: #080f10;
  --shell-teal: #12c9c0;
  --shell-deep: #0b2426;
  --shell-paper: #fff;
  --shell-muted: #adbab8;
  --shell-line: #314445;
  --shell-serif: "Noto Serif TC", "Source Han Serif TC", "PMingLiU", "Songti TC", serif;
  box-sizing: border-box;
  color: var(--shell-paper);
  font-family: Arial, "Microsoft JhengHei", "PingFang TC", sans-serif;
  color-scheme: dark;
}

.site-header.site-header.site-header *,
.navigation#navigation *,
.site-footer#footer * { box-sizing: border-box; }

.site-header.site-header.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: calc(90px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(24px, 5vw, env(safe-area-inset-right, 0px)) 0 max(24px, 5vw, env(safe-area-inset-left, 0px));
  background: var(--shell-ink);
  border-bottom: 1px solid #ffffff14;
  transform: translateY(0);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}
.site-header.site-header.site-header.is-scroll-hidden { transform: translateY(-100%); pointer-events: none; }

.site-header.site-header .brand,
.navigation#navigation .brand,
.site-footer#footer .brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  color: var(--shell-paper);
  text-decoration: none;
}
.site-header.site-header .brand img,
.navigation#navigation .brand img,
.site-footer#footer .brand img {
  display: block;
  width: 210px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}
.site-header.site-header .menu-toggle,
.navigation#navigation .close-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 0 8px 12px;
  border: 0;
  background: transparent;
  color: var(--shell-paper);
  font: 12px/1.2 Arial, sans-serif;
  letter-spacing: .18em;
  cursor: pointer;
}
.site-header.site-header .menu-toggle svg,
.navigation#navigation .close-menu svg { width: 32px; height: 32px; }
.site-header.site-header :focus-visible,
.navigation#navigation :focus-visible,
.site-footer#footer :focus-visible { outline: 2px solid var(--shell-teal); outline-offset: 5px; }

.navigation#navigation {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--shell-ink);
  opacity: 1;
  overflow: hidden;
  overscroll-behavior: contain;
}
.navigation#navigation[open] { display: flex; flex-direction: column; animation: none; }
.navigation#navigation::backdrop { background: #080f10; opacity: 1; }
.navigation#navigation .menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  height: auto;
  min-height: calc(104px + env(safe-area-inset-top, 0px));
  padding: max(16px, env(safe-area-inset-top, 0px)) max(24px, 4.5vw, env(safe-area-inset-right, 0px)) 16px max(24px, 4.5vw, env(safe-area-inset-left, 0px));
  background: linear-gradient(to right, var(--shell-ink) 60%, var(--shell-deep) 60%);
  border: 0;
}
.navigation#navigation .menu-content {
  display: grid;
  grid-template-columns: 60% 40%;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--shell-line) var(--shell-ink);
}
.navigation#navigation #menu-links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 24px max(24px, 4.5vw, env(safe-area-inset-left, 0px)) max(44px, env(safe-area-inset-bottom, 0px));
}
.navigation#navigation #menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: clamp(14px, 2.4vh, 26px) 0;
  border: 0;
  border-bottom: 1px solid var(--shell-line);
  color: var(--shell-paper);
  text-decoration: none;
}
.navigation#navigation #menu-links a > span { font: 400 clamp(32px, 4.3vw, 68px)/1.25 var(--shell-serif); letter-spacing: .04em; }
.navigation#navigation #menu-links svg {
  flex: 0 0 auto;
  width: clamp(24px, 2.8vw, 42px);
  height: clamp(24px, 2.8vw, 42px);
  margin-left: 0;
  color: var(--shell-teal);
  transition: transform .2s ease;
}
.navigation#navigation #menu-links a[aria-current="page"],
.navigation#navigation #menu-links a:hover { color: var(--shell-teal); }
.navigation#navigation #menu-links a:hover svg { transform: translate(3px, -3px); }
.navigation#navigation .menu-contact {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  gap: 30px;
  padding: 64px max(24px, 4vw, env(safe-area-inset-right, 0px)) max(44px, env(safe-area-inset-bottom, 0px));
  background: var(--shell-deep);
  border-left: 1px solid var(--shell-line);
}
.navigation#navigation .menu-tagline { max-width: 7em; margin: 0; font: 400 clamp(30px, 3.3vw, 52px)/1.5 var(--shell-serif); letter-spacing: .06em; }
.navigation#navigation .menu-tagline span { display: block; }
.navigation#navigation .menu-description { margin: 20px 0 0; color: var(--shell-muted); font-size: clamp(15px, 1.5vw, 21px); }
.navigation#navigation .menu-inquiry,
.site-footer#footer .footer-inquiry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  border: 1px solid var(--shell-teal);
  color: var(--shell-teal);
  text-decoration: none;
  font-size: 18px;
}
.navigation#navigation .menu-inquiry { border-color: var(--shell-muted); color: var(--shell-paper); }
.navigation#navigation .menu-social { display: flex; flex-wrap: wrap; gap: 16px 28px; }
.navigation#navigation .menu-social a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--shell-paper); font-size: 12px; letter-spacing: .16em; text-decoration: none; }
.navigation#navigation .menu-social svg { width: 18px; height: 18px; color: var(--shell-teal); }
.navigation#navigation .menu-company { display: flex; flex-direction: column; margin: 0; padding-top: 24px; border-top: 1px solid var(--shell-line); color: var(--shell-muted); font-size: 14px; line-height: 1.9; letter-spacing: .05em; }

.site-footer#footer { margin: 0; padding: 0; background: var(--shell-ink); border-top: 1px solid var(--shell-line); }
.site-footer#footer .footer-main {
  display: grid;
  grid-template-columns: 1fr 1.25fr .65fr;
  align-items: start;
  gap: clamp(28px, 4vw, 72px);
  max-width: 1800px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 112px) max(24px, 5vw, env(safe-area-inset-right, 0px)) clamp(56px, 7vw, 112px) max(24px, 5vw, env(safe-area-inset-left, 0px));
}
.site-footer#footer .footer-tagline { margin: 24px 0 0; font: 400 clamp(22px, 2vw, 32px)/1.6 var(--shell-serif); letter-spacing: .03em; }
.site-footer#footer .footer-description { margin: 20px 0 0; color: var(--shell-muted); font-size: 16px; }
.site-footer#footer .footer-nav { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 8px; }
.site-footer#footer .footer-nav h2,
.site-footer#footer .footer-contact h2 { grid-column: 1 / -1; margin: 0 0 24px; color: var(--shell-muted); font: 400 16px/1.5 Arial, "Microsoft JhengHei", sans-serif; }
.site-footer#footer .footer-nav a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; color: var(--shell-paper); text-decoration: none; font: 400 clamp(16px, 1.35vw, 22px)/1.5 var(--shell-serif); }
.site-footer#footer .footer-nav a svg { width: 20px; height: 20px; color: var(--shell-teal); }
.site-footer#footer .footer-contact { display: flex; flex-direction: column; gap: 8px; }
.site-footer#footer .footer-contact h2 { margin-bottom: 16px; }
.site-footer#footer .footer-contact > a:not(.footer-inquiry) { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; color: var(--shell-paper); font-size: 14px; letter-spacing: .1em; text-decoration: none; }
.site-footer#footer .footer-contact svg { width: 22px; height: 22px; color: var(--shell-teal); }
.site-footer#footer .footer-inquiry { margin-top: 16px; font-size: 17px; }
.site-footer#footer a:hover { color: var(--shell-teal); }
.site-footer#footer .footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding: 28px max(24px, 5vw, env(safe-area-inset-right, 0px)) max(28px, env(safe-area-inset-bottom, 0px)) max(24px, 5vw, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--shell-line);
  color: var(--shell-muted);
  font-size: 13px;
  letter-spacing: .035em;
}
.site-footer#footer .footer-company { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.site-footer#footer .footer-copyright { margin: 0 0 0 auto; }
.site-footer#footer .footer-top { display: flex; align-items: center; gap: 14px; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--shell-muted); font: inherit; cursor: pointer; }
.site-footer#footer .footer-top svg { width: 24px; height: 32px; }
.site-footer#footer .footer-top:hover { color: var(--shell-teal); }

@media (max-width: 999px), (max-height: 699px) {
  :root { --header-height: calc(74px + env(safe-area-inset-top, 0px)); }
  .site-header.site-header.site-header { height: calc(74px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 999px) {
  .navigation#navigation .menu-top { height: auto; min-height: calc(82px + env(safe-area-inset-top, 0px)); background: var(--shell-ink); }
  .navigation#navigation .menu-content { grid-template-columns: 1fr; align-content: start; }
  .navigation#navigation #menu-links { padding: 12px max(24px, env(safe-area-inset-right, 0px)) 32px max(24px, env(safe-area-inset-left, 0px)); }
  .navigation#navigation #menu-links a { padding-block: 16px; }
  .navigation#navigation #menu-links a > span { font-size: clamp(27px, 5vw, 46px); }
  .navigation#navigation .menu-contact { gap: 24px; padding: 32px max(24px, env(safe-area-inset-right, 0px)) max(32px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px)); border-left: 0; border-top: 1px solid var(--shell-line); }
  .navigation#navigation .menu-tagline { max-width: none; font-size: 30px; }
  .site-footer#footer .footer-main { grid-template-columns: 1fr 1fr; }
  .site-footer#footer .footer-brand { grid-column: 1 / -1; }
  .site-footer#footer .footer-copyright { margin-left: 0; }
}
@media (max-width: 600px) {
  .site-header.site-header .brand img,
  .navigation#navigation .brand img { width: 158px; height: 40px; }
  .site-header.site-header .menu-toggle,
  .navigation#navigation .close-menu { gap: 12px; font-size: 10px; }
  .navigation#navigation .menu-top,
  .navigation#navigation #menu-links,
  .navigation#navigation .menu-contact { padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px)); }
  .navigation#navigation #menu-links svg { width: 24px; height: 24px; }
  .site-footer#footer .footer-main { grid-template-columns: 1fr; gap: 40px; }
  .site-footer#footer .footer-nav { column-gap: 28px; }
  .site-footer#footer .footer-contact { max-width: 360px; }
  .site-footer#footer .footer-legal { align-items: flex-start; flex-direction: column; }
  .site-footer#footer .footer-company { flex-direction: column; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header.site-header.site-header,
  .navigation#navigation #menu-links svg { transition: none; }
}
