:root {
  --navy: #0d2d51;
  --navy-soft: #173d66;
  --ink: #18334f;
  --muted: #5f7285;
  --line: #e8dfd5;
  --sand: #b9895f;
  --paper: #fffdf9;
  --white: #fff;
  --shadow: 0 18px 44px rgba(19, 45, 76, .13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 12%, rgba(232, 223, 213, .45), transparent 34%),
    linear-gradient(180deg, #fff 0%, var(--paper) 44%, #fff 100%);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.8;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  overflow: hidden;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: var(--navy);
  transition: background .2s ease, box-shadow .2s ease, padding .2s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 253, 249, .94);
  box-shadow: 0 10px 30px rgba(20, 40, 70, .08);
  backdrop-filter: blur(12px);
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand-logo {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(13, 45, 81, .14);
}

.brand strong {
  display: block;
  font-family: "Noto Serif JP", serif;
  font-size: 25px;
  letter-spacing: .08em;
  line-height: 1.1;
}

.brand small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
}

.global-nav a {
  padding: 8px 0;
}

.header-contact,
.primary-button,
.outline-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.header-contact,
.primary-button {
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 10px 24px rgba(13, 45, 81, .18);
}

.header-contact {
  padding: 12px 22px;
}

.primary-button {
  padding: 14px 30px;
}

.outline-button,
.small-button {
  border: 1px solid rgba(13, 45, 81, .25);
  background: rgba(255, 255, 255, .82);
}

.outline-button {
  padding: 12px 26px;
}

.small-button {
  min-height: 42px;
  padding: 8px 18px;
  font-size: 14px;
}

.button-icon,
.icon-phone {
  position: relative;
  display: inline-block;
}

.button-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-phone {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 10px;
  transform: rotate(-35deg);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 8px 0;
  background: var(--navy);
}

.section-heading,
.page-hero {
  text-align: center;
}

.section-heading span,
.page-hero span,
.admin-head span,
.admin-panel > span,
.work-copy > span,
.detail-copy > span {
  display: inline-block;
  color: var(--sand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .35em;
}

.section-heading h2,
.page-hero h1,
.work-detail h1,
.admin-head h1,
.admin-panel h1 {
  margin: 8px 0 0;
  color: var(--navy);
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
  line-height: 1.45;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.section-heading h2::after,
.page-hero h1::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin: 14px auto 0;
  background: var(--sand);
}

.page-hero {
  padding: 150px 24px 64px;
  background: linear-gradient(180deg, #fff 0%, #fff9f1 100%);
}

.page-hero.compact h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  margin: 20px auto 0;
  max-width: 680px;
  color: var(--muted);
}

.site-footer {
  padding: 40px clamp(16px, 4vw, 56px) 24px;
  pointer-events: none;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(13, 45, 81, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 34px rgba(18, 42, 70, .14);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.footer-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  color: var(--navy);
  font-family: "Noto Serif JP", serif;
  font-weight: 700;
  border-right: 1px solid rgba(13, 45, 81, .18);
}

.footer-action:last-child {
  border-right: 0;
}

.footer-action.line span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #22c55e;
  font-family: system-ui, sans-serif;
  font-size: 10px;
}

.copyright {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  pointer-events: auto;
}

.mobile-fixed-contact {
  display: none;
}

.center-action {
  margin-top: 34px;
  text-align: center;
}

@media (max-width: 760px) {
  .site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 9998;
    gap: 14px;
    padding: 20px 22px 14px;
    background: rgba(255, 253, 249, .94);
    backdrop-filter: blur(10px);
  }

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    font-size: 8px;
    letter-spacing: .08em;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .header-contact {
    display: inline-flex;
    min-height: 42px;
    padding: 9px 13px;
    gap: 8px;
    font-size: 12px;
  }

  .header-contact .button-icon {
    width: 19px;
    height: 19px;
  }

  .nav-toggle {
    display: block;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .global-nav {
    position: fixed;
    inset: 74px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--shadow);
  }

  .global-nav.is-open {
    display: flex;
  }

  .site-footer {
    display: none;
  }

}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 18px;
  }

  .page-hero {
    padding-top: 120px;
  }

  .section-heading span {
    font-size: 10px;
  }

  .section-heading h2 {
    font-size: 28px;
  }

}

@media (max-width: 400px) {
  .brand strong {
    font-size: 16px;
  }

  .brand small {
    display: none;
  }

  .header-contact {
    padding-inline: 10px;
    font-size: 11px;
  }
}

/* Final viewport guards: keep PC clean. */
@media (min-width: 761px) {
  .site-header {
    position: fixed;
    z-index: 20;
    padding: 18px clamp(18px, 4vw, 56px);
  }

  .global-nav {
    display: flex !important;
  }

  .nav-toggle {
    display: none !important;
  }

  .mobile-fixed-contact {
    display: none !important;
  }

  .footer-inner {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: fixed !important;
    inset: 0 0 auto !important;
    z-index: 99998 !important;
  }

  body {
    padding-bottom: 82px;
  }

  .mobile-fixed-contact {
    position: fixed;
    right: 12px;
    bottom: 10px;
    left: 12px;
    z-index: 99999;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    overflow: hidden;
    border: 1px solid rgba(13, 45, 81, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 12px 30px rgba(18, 42, 70, .18);
  }

  .mobile-fixed-contact a {
    display: flex;
    min-width: 0;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--navy);
    font-family: "Noto Serif JP", serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
  }

  .mobile-fixed-contact a:first-child {
    border-right: 1px solid rgba(13, 45, 81, .16);
  }

  .mobile-fixed-contact .icon-phone {
    flex: 0 0 auto;
    width: 20px;
    height: 15px;
  }

  .mobile-fixed-contact .mobile-contact-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (max-width: 900px) {
  body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .mobile-fixed-contact,
  .mobile-fixed-contact[hidden] {
    position: fixed !important;
    right: 12px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    left: 12px !important;
    z-index: 99999 !important;
    display: grid !important;
    grid-template-columns: 1fr 1.35fr;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
    border: 1px solid rgba(13, 45, 81, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 12px 30px rgba(18, 42, 70, .18);
    pointer-events: auto;
  }
}

@media (max-width: 1024px) {
  .mobile-fixed-contact {
    position: fixed !important;
    inset: auto 12px 10px 12px !important;
    z-index: 2147483647 !important;
    display: grid !important;
    grid-template-columns: 1fr 1.35fr !important;
    overflow: hidden !important;
    border: 1px solid rgba(13, 45, 81, .14) !important;
    border-radius: 999px !important;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(18, 42, 70, .18) !important;
    pointer-events: auto !important;
  }
}
