/* =========================================================
   株式会社ゲイト コーポレートサイト
   Mobile-first / Tablet / Desktop responsive stylesheet
   Brand color from new GATE logo: #5DA6C9
   ========================================================= */

:root {
  /* Brand palette (derived from the new logo) */
  --gate-blue: #58a0c8;        /* logo blue: large graphics, accents */
  --gate-blue-deep: #2c6e91;   /* hover states, large text accents */
  --gate-ink: #1b4d68;         /* links, buttons - AA on white */
  --navy: #12303f;             /* footer, strong headings */
  --tint: #edf5fa;             /* light section background */
  --tint-border: #d3e5ef;
  --text: #243640;
  --muted: #56676f;            /* AA on white & on --tint */
  --bg: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(18, 48, 63, 0.08);
  --maxw: 1100px;
  --header-h: 64px;
}

/* ---------- Reset (light) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 112.5%; } /* 18px基準(店の本文と同じ) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic",
    "Yu Gothic Medium", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--gate-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gate-blue-deep); }
ul, ol { padding-left: 1.4em; }
h1, h2, h3, h4 { line-height: 1.4; color: var(--navy); font-feature-settings: "palt"; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .7em .8em; border: 1px solid var(--tint-border); vertical-align: top; }
th { background: var(--tint); white-space: nowrap; font-weight: 600; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .8em 1.2em; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gate-blue-deep); outline-offset: 2px; border-radius: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section--tint { background: var(--tint); }
.section-title { font-size: clamp(1.4rem, 3.2vw, 1.9rem); margin: 0 0 .4em; }
.section-title .en {
  display: block; font-size: .72rem; letter-spacing: .18em;
  color: var(--gate-blue-deep); text-transform: uppercase; margin-bottom: .4em;
}
.section-lead { max-width: 46em; color: var(--muted); margin-top: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--tint-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: var(--header-h);
  max-width: var(--maxw); margin-inline: auto; padding-inline: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 1em; text-decoration: none; flex: none; }
.brand img { width: auto; height: 30px; display: block; }
.brand__name { font-weight: 700; color: var(--navy); font-size: 17px; letter-spacing: .04em; white-space: nowrap; overflow-wrap: normal; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 48px; height: 48px; border: 1px solid var(--tint-border); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.nav-toggle__bar {
  width: 20px; height: 2px; background: var(--navy); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.gnav {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
  background: #fff; border-bottom: 1px solid var(--tint-border);
  padding: 12px 20px 24px;
  display: none;
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
}
.gnav.is-open { display: block; }
.gnav__list { list-style: none; margin: 0; padding: 0; }
.gnav__list a {
  display: block; padding: 14px 6px; text-decoration: none;
  color: var(--navy); font-weight: 600; border-bottom: 1px solid var(--tint);
}
.gnav__list a[aria-current="page"] { color: var(--gate-blue-deep); border-left: 4px solid var(--gate-blue); padding-left: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .6em 1.5em; border-radius: 999px;
  font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn--primary { background: var(--gate-ink); color: #fff; }
.btn--primary:hover { background: var(--gate-blue-deep); color: #fff; }
.btn--ghost { border-color: var(--gate-ink); color: var(--gate-ink); background: transparent; }
.btn--ghost:hover { border-color: var(--gate-blue-deep); color: var(--gate-blue-deep); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--tint); }

/* ---------- Hero (front page) ---------- */
.hero {
  background:
    linear-gradient(100deg, rgba(237, 245, 250, .96) 30%, rgba(237, 245, 250, .68)),
    url('/bg.jpg') center / cover no-repeat,
    radial-gradient(120% 90% at 85% -10%, rgba(93, 166, 201, .25), transparent 60%),
    linear-gradient(180deg, var(--tint), #fff);
  padding-block: clamp(3.5rem, 9vw, 7rem);
}
.hero__title {
  font-size: clamp(1.65rem, 5.4vw, 3rem);
  margin: 0 0 .6em; letter-spacing: .02em;
}
.hero__title em { font-style: normal; color: var(--gate-blue-deep); }
.hero__lead { max-width: 38em; margin: 0 0 2em; color: var(--muted); font-size: clamp(.95rem, 2.4vw, 1.05rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 2rem; }
.card {
  background: #fff; border: 1px solid var(--tint-border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 24px;
  display: flex; flex-direction: column; gap: .4em;
}
.card h3 { margin: 0; font-size: 1.12rem; }
.card .en { font-size: .7rem; letter-spacing: .14em; color: var(--gate-blue-deep); text-transform: uppercase; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; flex-grow: 1; }
.card .card__link { margin-top: 1em; font-weight: 700; text-decoration: none; }
.card .card__link::after,
.more-link::after {
  content: ""; display: inline-block; width: .58em; height: .58em;
  margin-left: .32em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 12 7.5 5.5v13z' fill='%23000' stroke='%23000' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 12 7.5 5.5v13z' fill='%23000' stroke='%23000' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- News teaser (ヒーロー直下・最新2件) ---------- */
.news-teaser { background: #fff; border-bottom: 1px solid var(--tint-border); }
.news-teaser .container {
  display: flex; align-items: center; gap: 18px; padding-block: 12px;
}
.news-teaser__label {
  flex: none; font-weight: 700; color: var(--navy); font-size: .82rem; line-height: 1.3;
}
.news-teaser__label .en {
  display: block; font-size: .62rem; letter-spacing: .16em;
  color: var(--gate-blue-deep); text-transform: uppercase;
}
.news-teaser__list { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; }
.news-teaser__list li { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.news-teaser__list li + li { margin-top: 2px; }
.news-teaser__list time { flex: none; font-size: .78rem; color: var(--muted); font-feature-settings: "tnum"; }
.news-teaser__list a, .news-teaser__list .news-teaser__t {
  font-size: .88rem; text-decoration: none; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; min-width: 0;
}
.news-teaser__list a:hover { color: var(--gate-blue-deep); text-decoration: underline; }
.news-teaser__more { flex: none; font-size: .82rem; font-weight: 700; text-decoration: none; }
@media (max-width: 599px) {
  .news-teaser .container { flex-wrap: wrap; gap: 8px 14px; }
  .news-teaser__label .en { display: inline; margin-right: .5em; }
  .news-teaser__list { flex-basis: 100%; }
}

/* ---------- News list ---------- */
.news-list { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.news-list li { border-bottom: 1px solid var(--tint-border); }
.news-list a, .news-list .news-static {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 6px; text-decoration: none;
}
.news-list a:hover .news-list__title { color: var(--gate-blue-deep); text-decoration: underline; }
.news-list__date { font-size: .8rem; color: var(--muted); font-feature-settings: "tnum"; }
.news-list__tag {
  display: inline-block; font-size: .7rem; font-weight: 700; color: var(--gate-blue-deep);
  border: 1px solid currentColor; border-radius: 4px; padding: 0 .5em; margin-left: .6em;
}
.news-list__title { color: var(--text); }
/* flexの器では::afterが独立タイルになり題名から離れるため、印は題名の文内に灯す */
.news-list a[target="_blank"]::after { content: none; }
.news-list a[target="_blank"] .news-list__title::after {
  content: ""; display: inline-block; width: .62em; height: .62em;
  margin-left: .3em; vertical-align: -.02em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5.5'/%3E%3Cpath d='M14.5 3H21v6.5'/%3E%3Cpath d='M10.5 13.5 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5.5'/%3E%3Cpath d='M14.5 3H21v6.5'/%3E%3Cpath d='M10.5 13.5 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Page header (sub pages) ---------- */
.page-header {
  background: linear-gradient(180deg, var(--tint), #fff);
  padding-block: clamp(2.4rem, 6vw, 4rem);
  border-bottom: 1px solid var(--tint-border);
}
.page-header h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); margin: 0; }
.page-header .en {
  display: block; font-size: .75rem; letter-spacing: .2em;
  color: var(--gate-blue-deep); text-transform: uppercase; margin-bottom: .5em;
}
.page-header p { margin: .8em 0 0; color: var(--muted); max-width: 46em; }

/* ---------- Prose / article ---------- */
.prose { max-width: 44em; }
.prose h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); margin-top: 2.6em; padding-left: .7em; border-left: 5px solid var(--gate-blue); }
.prose h3 { font-size: 1.08rem; margin-top: 2em; color: var(--gate-blue-deep); }
.prose blockquote {
  margin: 1.6em 0; padding: 1em 1.4em; background: var(--tint);
  border-left: 4px solid var(--gate-blue); border-radius: 0 8px 8px 0; color: var(--navy);
}
.signature { text-align: right; font-weight: 700; color: var(--navy); }

/* ---------- Value grid (core values) ---------- */
.value-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 1.6rem; counter-reset: value; }
.value {
  background: #fff; border: 1px solid var(--tint-border); border-radius: var(--radius); padding: 18px 18px 16px;
}
.value::before {
  counter-increment: value; content: counter(value, decimal-leading-zero);
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; color: var(--gate-blue);
}
.value h3 { margin: .1em 0 .2em; font-size: 1rem; color: var(--gate-blue-deep); }
.value p { margin: 0; font-size: .92rem; color: var(--muted); }

/* ---------- Detail / accordion ---------- */
details.acc { border: 1px solid var(--tint-border); border-radius: 10px; margin-top: 12px; background: #fff; }
details.acc > summary {
  cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1em;
  min-height: 48px;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "+"; font-size: 1.3em; color: var(--gate-blue-deep); flex-shrink: 0; }
details.acc[open] > summary::after { content: "−"; }
details.acc > .acc__body { padding: 0 18px 18px; }

/* ---------- Definition table (company profile) ---------- */
.def-table th { width: 9em; }
@media (max-width: 599px) {
  .def-table, .def-table tbody, .def-table tr, .def-table th, .def-table td { display: block; width: 100%; }
  .def-table th { border-bottom: 0; }
  .def-table tr + tr th { border-top: 0; }
}

/* ---------- Contact blocks ---------- */
.contact-hero { text-align: center; }
.contact-hero .tel {
  font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 800; color: var(--navy);
  text-decoration: none; font-feature-settings: "tnum";
}
.contact-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 1.6rem; }

/* ---------- Map ---------- */
.map-embed { border: 1px solid var(--tint-border); border-radius: var(--radius); overflow: hidden; }
.map-embed iframe { display: block; width: 100%; height: 320px; border: 0; }

/* ---------- Staff voices ---------- */
.voice { background: #fff; border: 1px solid var(--tint-border); border-radius: var(--radius); padding: 20px; }
.voice h3 { margin: 0 0 .1em; font-size: 1.05rem; }
.voice .role { font-size: .82rem; color: var(--gate-blue-deep); margin: 0 0 .8em; font-weight: 600; }
.voice p { font-size: .93rem; color: var(--text); margin: .5em 0; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy), var(--gate-ink)); color: #fff; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: rgba(255, 255, 255, .85); }
.cta-band .container { display: flex; flex-direction: column; gap: 1em; align-items: flex-start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .85); font-size: .9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer__inner { display: grid; gap: 2rem; padding-block: 3rem 2rem; grid-template-columns: 1fr; }
.site-footer__brand img { height: 34px; width: auto; }
.site-footer__brand p { margin: .8em 0 0; line-height: 1.7; }
.site-footer nav h2 { color: #fff; font-size: .85rem; letter-spacing: .12em; margin: 0 0 .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55em; }
.site-footer .legal {
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding-block: 1.2rem; display: flex; flex-wrap: wrap; gap: .4em 1.4em; font-size: .8rem;
}
.copyright { padding-bottom: 1.6rem; font-size: .78rem; color: rgba(255, 255, 255, .6); }

/* ---------- External link mark ---------- */
a[target="_blank"]::after {
  content: ""; display: inline-block; width: .62em; height: .62em;
  margin-left: .3em; vertical-align: -.02em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5.5'/%3E%3Cpath d='M14.5 3H21v6.5'/%3E%3Cpath d='M10.5 13.5 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5.5'/%3E%3Cpath d='M14.5 3H21v6.5'/%3E%3Cpath d='M10.5 13.5 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn[target="_blank"]::after, .site-footer__brand a::after { content: none; }

/* =========================================================
   Tablet ≥ 600px
   ========================================================= */
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .news-list a, .news-list .news-static { flex-direction: row; align-items: baseline; gap: 1.2em; }
  .news-list__date { flex-shrink: 0; width: 7.5em; }
  .site-footer__inner { grid-template-columns: 1.3fr 1fr 1fr; }
  .map-embed iframe { height: 380px; }
}

/* =========================================================
   Desktop ≥ 900px
   ========================================================= */
@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band .container { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 820px) {
  /* 整数設計: pad10+紋章34+間6=50を巻上げ、残る可視高=境界1+品書き44=45px(端数なし=倍率不問) */
  :root { --header-h: 45px; }
  .site-header { top: -50px; }
  .site-header__inner {
    max-width: none; padding: 10px 24px 0;
    flex-wrap: wrap; gap: 0 16px; min-height: 0; align-items: center;
  }
  .nav-toggle { display: none; }
  .gnav {
    position: static; display: block; background: transparent;
    border: 0; padding: 0; max-height: none; overflow: visible;
    width: 100%; order: 10; margin-top: 6px; border-top: 1px solid var(--tint);
  }
  .gnav__list { display: flex; align-items: center; gap: 2px; }
  .gnav__list a {
    border-bottom: 2px solid transparent; padding: 0 10px; font-size: 14px;
    height: 44px; display: inline-flex; align-items: center; box-sizing: border-box;
    white-space: nowrap;
  }
  .gnav__list a:hover { border-bottom-color: var(--gate-blue); }
  .gnav__list a[aria-current="page"] { border-left: 0; padding-left: 10px; border-bottom-color: var(--gate-blue); }
  .brand img { height: 34px; }
}
@media (min-width: 1160px) {
  .site-header__inner { padding-inline: 28px; }
  .gnav__list a { padding: 0 12px; font-size: 14.5px; }
  .gnav__list a[aria-current="page"] { padding-left: 12px; }
}

/* Wide desktop ≥ 1200px */
@media (min-width: 1200px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .cta-band { display: none; }
  body { font-size: 11pt; }
}

/* ---------- Logo grid (provider/partner logos) ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 1.2rem 0 0; }
.logo-grid li { background: #fff; border: 1px solid var(--tint-border); border-radius: 10px; }
.logo-grid a, .logo-grid .cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 10px; height: 100%; text-decoration: none; font-size: .78rem; color: var(--text); text-align: center; line-height: 1.5; }
.logo-grid img { max-height: 48px; width: auto; max-width: 100%; object-fit: contain; }
.logo-grid a[target="_blank"]::after { content: none; }

/* ---------- Doc list thumbnails ---------- */
.doc-list li { display: flex; gap: 14px; align-items: center; }
.doc-list li > .doc-date {
  flex: none; width: 6.6em; color: var(--muted); font-size: .85rem;
  font-feature-settings: "tnum"; letter-spacing: .02em;
}
.doc-list li img {
  width: 112px; height: 80px; flex: none; object-fit: contain;
  background: #fff; padding: 4px; border-radius: 6px; border: 1px solid var(--tint-border);
}
.doc-list li > span:last-child { flex: 1 1 auto; min-width: 0; }
@media (max-width: 599px) {
  .doc-list li { flex-wrap: wrap; gap: 6px 12px; }
  .doc-list li img { width: 84px; height: 62px; }
  .doc-list li > span:last-child { flex-basis: 100%; }
}

/* ---------- Mobile nav scrim & scroll lock ---------- */
body.nav-open { overflow: hidden; }
.nav-scrim {
  position: fixed; inset: 0; z-index: 48;
  background: rgba(18, 48, 63, .45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.nav-scrim.is-visible { opacity: 1; pointer-events: auto; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--tint-border); background: var(--gate-ink); color: #fff;
  font-family: inherit; font-size: .85rem; font-weight: 700; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.to-top svg { display: block; }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--gate-blue-deep); }

/* ---------- In-page anchor chips ---------- */
.anchor-nav {
  /* 端数丸めの白筋(隙間)対策: 2px頭部の下へ潜らせ継ぎ目を消す */
  position: sticky; top: calc(var(--header-h) - 2px); z-index: 40;
  margin-top: -2px; padding-top: 2px;
}
.anchor-nav__bg {
  /* 白は帯の内側で消える一枚勾配: 裾に継ぎ目を作らない(わおん案) */
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .97) 0, rgba(255, 255, 255, .88) 55%, rgba(255, 255, 255, 0) 100%);
}
/* 段階暈し: 強→弱→無を mask の勾配で重ね、霞が徐々に晴れる近似(真の可変blurは純CSSに無い) */
.anchor-nav::before,
.anchor-nav::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
.anchor-nav::before {
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(#000 60%, transparent 92%);
  mask-image: linear-gradient(#000 60%, transparent 92%);
}
.anchor-nav::after {
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  -webkit-mask-image: linear-gradient(transparent 52%, #000 70%, rgba(0, 0, 0, .7) 88%, transparent 100%);
  mask-image: linear-gradient(transparent 52%, #000 70%, rgba(0, 0, 0, .7) 88%, transparent 100%);
}
/* あふれた目次は「＋」で全段展開(わおん案: 送り三角は廃止) */
.anchor-nav__expand {
  position: absolute; top: 28px; right: 8px; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; padding: 0;
  border: 1px solid var(--tint-border); background: rgba(255, 255, 255, .94);
  color: var(--gate-ink); cursor: pointer; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 6px rgba(18, 48, 63, .16);
  opacity: 0; visibility: hidden; transform: translateY(-50%) scale(.5);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s,
    top .3s ease, width .2s ease, height .2s ease;
}
.anchor-nav__expand::before { /* 見えぬ後光: 当たり判定の拡張 */
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
}
.anchor-nav__expand.is-visible {
  opacity: 1; visibility: visible; transform: translateY(-50%) scale(1);
  transition: opacity .25s ease, transform .25s ease, visibility 0s,
    top .3s ease, width .2s ease, height .2s ease;
}
.anchor-nav__expand:hover { color: var(--gate-blue-deep); border-color: var(--gate-blue); }
.anchor-nav__expand svg { display: block; transition: transform .2s ease; }
.anchor-nav.is-expanded .anchor-nav__expand svg { transform: rotate(45deg); }
.anchor-nav.is-expanded .container { flex-wrap: wrap; overflow-x: visible; padding-right: 46px; }
/* 札選び直後の畳みは無音の一瞬(跳躍の的を狂わせない) */
.anchor-nav.no-anim .container,
.anchor-nav.no-anim .anchor-nav__bg,
.anchor-nav.no-anim::before,
.anchor-nav.no-anim::after,
.anchor-nav.no-anim .anchor-nav__expand { transition: none !important; }
.anchor-nav.is-expanded .anchor-nav__bg {
  /* 全段展開中は白衣を厚く: 下の本文に乱されない */
  background: linear-gradient(rgba(255, 255, 255, .99), rgba(255, 255, 255, .96) 70%, rgba(255, 255, 255, .7));
}

/* モバイル: 巻くと札が「＋」へ格納される(わおん案) */
.anchor-nav__bg, .anchor-nav::before, .anchor-nav::after { transition: opacity .3s ease; }
.anchor-nav .container { transition: opacity .28s ease, transform .28s ease, max-height .32s ease; max-height: 200px; }
@media (max-width: 819px) {
  .anchor-nav.is-stowed:not(.is-expanded) .container {
    opacity: 0; transform: translateX(34%) scale(.86); transform-origin: right center;
    max-height: 0; padding-block: 0; pointer-events: none;
  }
  .anchor-nav.is-stowed:not(.is-expanded) .anchor-nav__bg,
  .anchor-nav.is-stowed:not(.is-expanded)::before,
  .anchor-nav.is-stowed:not(.is-expanded)::after { opacity: 0; }
  .anchor-nav.is-stowed:not(.is-expanded) .anchor-nav__expand { top: 24px; width: 40px; height: 40px; }
}

.anchor-nav .container {
  display: flex; gap: 8px; overflow-x: auto; padding-block: 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.anchor-nav .container::-webkit-scrollbar { display: none; }
.anchor-nav a {
  flex: none; white-space: nowrap; text-decoration: none;
  font-size: .82rem; font-weight: 600; color: var(--gate-ink);
  border: 1px solid var(--tint-border); border-radius: 999px;
  padding: 5px 14px; background: #fff;
}
.anchor-nav a:hover { border-color: var(--gate-blue); color: var(--gate-blue-deep); }
[id] { scroll-margin-top: calc(var(--header-h) + 68px); }

/* ---------- Card image (top business cards) ---------- */
.card__img {
  width: calc(100% + 48px); max-width: none; height: 132px;
  margin: -26px -24px 12px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card__img--left { object-position: left center; }

/* ---------- Section banner (旧サイトの節頭バナー) ---------- */
.section-banner {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); margin: .4rem 0 1.6rem;
  border: 1px solid var(--tint-border);
}

/* ---------- Plain document list (archives) ---------- */
.doc-list { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.doc-list li { border-bottom: 1px solid var(--tint-border); padding: .65em 4px; font-size: .93rem; }
.doc-list a { text-decoration: none; }
.doc-list a:hover { text-decoration: underline; color: var(--gate-blue-deep); }
