/* 製靴技術ポータル。人が直接保守する共通CSS。
   1 色と文字 / 2 共通 / 3 トップ / 4 工程詳細 / 5 サービス概要 / 6 画面幅 */
/* フォントは同梱。閲覧時に外部フォントサービスへ接続しません。 */
@font-face {
  font-family: "Noto Sans JP";
  src: url("フォント/NotoSansJP.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f5f5f5;
  --surface-soft: #fafafa;
  --text: #171717;
  --secondary: #525252;
  --border: #d4d4d4;
  --accent: #0071e3;
  --danger: #ef4444;
  --accent-hover: #005bb8;
  --radius: 20px;
  font-family:
    "Noto Sans JP", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.015em;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
}
h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}
h3 {
  font-size: 1.125rem;
}
p {
  overflow-wrap: anywhere;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button,
input {
  font: inherit;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
input {
  min-width: 0;
}
img,
video {
  max-width: 100%;
  display: block;
}
svg.icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: #fff;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.desktop-nav {
  max-width: 1280px;
  margin: auto;
  padding: 0 32px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 36px;
}
.desktop-nav a {
  font-weight: 700;
  font-size: 0.84rem;
  padding: 16px 0;
  white-space: nowrap;
}
.desktop-nav a[aria-current="page"] {
  color: var(--accent);
}
.mobile-nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] .icon {
  color: var(--accent);
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 0 32px;
}
section[id],
input[id] {
  scroll-margin-top: 108px;
}
.section {
  padding: 56px 0;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.section-heading p {
  color: var(--secondary);
  margin-top: 10px;
}
.text-link {
  color: var(--accent);
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-weight: 650;
}
.button.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.button.secondary:hover {
  background: var(--surface);
  color: var(--text);
}
.site-footer {
  max-width: 1216px;
  margin: 48px auto 0;
  padding: 28px 32px 40px;
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-size: 0.875rem;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}
.mobile-nav {
  display: none;
}

/* トップ：見出し → 検索を中央に。件数の装飾・英文ラベルは置かない。 */
.search-hero {
  text-align: center;
  padding: 72px 0 48px;
}
.search-hero > p {
  margin: 16px auto 26px;
  max-width: 760px;
  color: var(--secondary);
  font-size: 1.0625rem;
}
.search-box {
  max-width: 740px;
  margin: auto;
  position: relative;
  text-align: left;
}
.search-box label {
  display: block;
  margin-bottom: 10px;
  font-weight: 650;
}
.search-control {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 20px;
  border: 1px solid #a3a3a3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 5px #00000008;
}
.search-control > .icon {
  color: var(--secondary);
}
.search-control input {
  flex: 1;
  border: 0;
  background: none;
  color: var(--text);
  width: 100%;
  padding: 10px 0;
  outline-offset: 0;
}
.search-control input::placeholder {
  color: #646464;
}
.search-control .button {
  flex-shrink: 0;
  min-height: 44px;
}
.search-hints {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--secondary);
}
.search-hints button {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 3px 14px;
  background: var(--surface-soft);
  color: var(--secondary);
  min-height: 34px;
}
.search-hints button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
#search-status {
  font-size: 0.875rem;
  margin: 12px 0 0;
  color: var(--secondary);
  min-height: 1.8em;
}
#search-status:empty {
  display: none;
}
#search-status[data-error] {
  border: 1px solid #a3a3a3;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
#suggestions {
  position: absolute;
  z-index: 10;
  top: 110px;
  left: 0;
  right: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: white;
  box-shadow: 0 12px 24px #00000014;
  padding: 8px;
}
#suggestions a {
  display: block;
  border-radius: 8px;
  padding: 12px;
  font-weight: 650;
}
#suggestions a:hover {
  background: var(--surface);
}
#suggestions small {
  display: block;
  color: var(--secondary);
  font-weight: 500;
}
#suggestions p {
  padding: 12px;
}
.sample-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  border: 1px solid #a3a3a3;
  border-radius: 0 12px 12px 0;
  background: var(--surface);
  font-size: 0.9375rem;
}
.sample-notice b {
  margin-right: 16px;
  font-weight: 700;
}
.sample-notice .icon {
  margin-top: 2px;
}
.entry-grid,
.process-grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.entry-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: grid;
  grid-template-columns: 24px 1fr 20px;
  gap: 16px;
  align-items: start;
  background: #fff;
}
.entry-card .icon {
  color: var(--accent);
  margin-top: 2px;
}
.entry-card p {
  font-size: 0.9375rem;
  margin-top: 8px;
  color: var(--secondary);
}
.entry-card:hover,
.process-card:hover,
.video-card:hover,
.record:hover {
  border-color: var(--accent);
}
.process-grid {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 0;
  overflow: hidden;
}
.process-card {
  display: flex;
  text-align: left;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: 0;
  padding: 28px;
  color: var(--text);
  font-weight: 650;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.process-card:nth-child(3n) {
  border-right: 0;
}
.process-card:nth-last-child(-n + 3) {
  border-bottom: 0;
}
.process-card .icon {
  color: var(--accent);
}
.process-card:hover {
  background: #fff;
  color: var(--accent);
}
.process-card[aria-pressed="true"] {
  background: #fff;
  color: var(--accent);
  box-shadow: none;
}
.video-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.video-cover {
  aspect-ratio: 16/9;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
}
.play-triangle {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #fff;
}
.video-description {
  padding: 22px;
}
.video-description small {
  color: var(--secondary);
  font-size: 0.875rem;
}
.video-description h3 {
  margin: 8px 0 20px;
}
.video-description .text-link {
  font-size: 0.9375rem;
}
.library-section {
  background: #f3f5f7;
  border-radius: 24px;
  padding: 56px 32px;
}
.library-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.library-tools label {
  font-weight: 650;
}
.library-tools input {
  min-height: 46px;
  padding: 8px 16px;
  border: 1px solid #a3a3a3;
  border-radius: 14px;
  flex: 1;
  max-width: 500px;
  background: #fff;
}
.library-tools .button {
  padding: 8px 18px;
  min-height: 46px;
}
#active-filter {
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 650;
}
.record-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  list-style: none;
  margin: 0;
}
.record-list > li {
  min-width: 0;
}
.record {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 16px;
  padding: 24px;
  gap: 12px;
  background: #fff;
}
.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--secondary);
  font-size: 0.875rem;
}
.record h3 {
  font-size: 1.1875rem;
}
.record p {
  color: var(--secondary);
  font-size: 0.9375rem;
}
.record .record-open {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 650;
}
.empty {
  padding: 32px;
  border: 1px dashed #a3a3a3;
  background: var(--surface-soft);
  border-radius: 16px;
}
.muted {
  color: var(--secondary);
}
.no-video {
  padding: 40px 24px;
  background: var(--surface);
  border: 1px dashed #a3a3a3;
  border-radius: 16px;
  text-align: center;
}

/* 工程詳細：文章は各HTML。CSSに工程名や本文を持たせない。 */
.process-page {
  padding-top: 30px;
}
.back-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 650;
  margin-bottom: 28px;
}
.process-heading {
  max-width: 940px;
  margin-bottom: 30px;
}
.process-heading h1 {
  margin: 12px 0 16px;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}
.process-heading p {
  color: var(--secondary);
  font-size: 1.0625rem;
}
.document-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 28px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.document-meta dt {
  font-size: 0.875rem;
  color: var(--secondary);
}
.document-meta dd {
  margin: 6px 0 0;
  font-weight: 650;
}
.before-work {
  background: var(--surface);
  border: 1px solid #a3a3a3;
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 36px;
}
.before-work p {
  font-size: 0.9375rem;
  margin-top: 6px;
}
.learning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.video-column {
  position: sticky;
  top: 106px;
}
.media-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.media-title h2 {
  font-size: 1.375rem;
}
.media-title span {
  color: var(--secondary);
  font-size: 0.875rem;
}
video {
  width: 100%;
  background: #171717;
  border-radius: 16px;
  aspect-ratio: 16/9;
}
.media-caption,
.video-message {
  font-size: 0.9375rem;
  margin-top: 14px;
  color: var(--secondary);
}
.video-message:not(:empty) {
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.reference-photo {
  margin-top: 24px;
}
.reference-photo img {
  border-radius: 12px;
  width: 100%;
  height: auto;
}
.reference-photo figcaption {
  font-size: 0.875rem;
  color: var(--secondary);
  margin-top: 10px;
}
.chapter {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}
.chapter.active {
  border-color: var(--accent);
  box-shadow: none;
}
.chapter header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chapter-number {
  font-size: 0.875rem;
  color: var(--secondary);
}
.chapter h3 {
  flex: 1;
}
.chapter button {
  flex-shrink: 0;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: white;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 650;
}
.chapter.active button {
  background: var(--accent);
  color: white;
}
.chapter button:disabled {
  border-color: var(--border);
  color: var(--secondary);
  background: var(--surface);
}
.chapter dl {
  margin: 20px 0 0;
}
.chapter dl div + div {
  margin-top: 18px;
}
.chapter dt {
  color: var(--secondary);
  font-size: 0.875rem;
  font-weight: 650;
}
.chapter dd {
  margin: 4px 0 0;
}
.bottom-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 40px 0;
}
.bottom-notes section {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
}
.bottom-notes h2 {
  font-size: 1.375rem;
  margin-bottom: 14px;
}
.bottom-notes h3 {
  margin: 26px 0 10px;
}
.bottom-notes p {
  color: var(--secondary);
}

/* サービス概要：iPadで縦に読み進める説明ページ */
.service-hero {
  text-align: center;
  padding: 80px 0 56px;
}
.service-hero h1 {
  max-width: 960px;
  margin: auto;
  line-height: 1.5;
}
.service-hero h1 span {
  color: var(--accent);
}
.service-hero > p {
  max-width: 750px;
  margin: 24px auto 28px;
  font-size: 1.125rem;
  color: var(--secondary);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.service-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.service-section > h2 {
  margin-bottom: 16px;
}
.service-section > p {
  color: var(--secondary);
  max-width: 820px;
  margin-bottom: 28px;
  font-size: 1.0625rem;
}
.explanation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.explanation-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
}
.explanation-card .icon {
  color: var(--accent);
  margin-bottom: 18px;
}
.explanation-card p {
  color: var(--secondary);
  margin-top: 12px;
}
.story-demo {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-soft);
}
.story-demo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
}
.story-demo > div {
  padding: 36px;
}
.story-demo h3 {
  font-size: 1.5rem;
}
.story-demo p {
  color: var(--secondary);
  margin: 16px 0 24px;
}
.flow-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.flow-list li {
  display: grid;
  grid-template-columns: 56px minmax(180px, 0.75fr) 1.5fr;
  gap: 24px;
  padding: 28px;
  align-items: start;
}
.flow-list li + li {
  border-top: 1px solid var(--border);
}
.flow-list .step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
}
.flow-list p {
  color: var(--secondary);
}
.security-box {
  padding: 36px;
  border: 1px solid #a3a3a3;
  border-radius: 24px;
  background: var(--surface);
}
.security-box h3 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.security-box p {
  color: var(--secondary);
}
.security-box ul {
  padding-left: 1.4em;
  margin: 24px 0 0;
}
.security-box li + li {
  margin-top: 12px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 28px;
}
.split > div {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
}
.split h3 {
  margin-bottom: 16px;
}
.split ul {
  padding-left: 1.3em;
  color: var(--secondary);
}
.split li + li {
  margin-top: 12px;
}
.service-faq details {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.service-faq summary {
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 650;
  padding-right: 24px;
}
.service-faq details p {
  margin-top: 14px;
  max-width: 860px;
  color: var(--secondary);
}
.service-note {
  font-size: 0.9375rem !important;
}
.section-followup {
  margin-top: 24px;
}
.service-body {
  padding-bottom: 0;
}
.service-body .desktop-nav a {
  display: block;
}
.closing {
  text-align: center;
  border-radius: 24px;
  background: var(--surface);
  padding: 48px 28px;
  margin: 48px 0;
}
.closing p {
  margin: 18px auto 26px;
  max-width: 750px;
  color: var(--secondary);
}

/* 横幅が狭い場合。横スクロールを操作の前提にしない。 */
@media (max-width: 1000px) {
  .desktop-nav {
    gap: 28px;
  }
  .entry-grid,
  .video-grid {
    gap: 16px;
  }
  .entry-card {
    padding: 22px;
    grid-template-columns: 24px 1fr;
  }
  .entry-card > span:last-child {
    display: none;
  }
  .learning-layout {
    grid-template-columns: 1fr;
  }
  .video-column {
    position: static;
    max-width: 860px;
    width: 100%;
  }
  .reference-photo {
    max-width: 860px;
  }
  .explanation-grid {
    grid-template-columns: 1fr;
  }
  .explanation-card {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 18px;
  }
  .explanation-card p {
    grid-column: 2;
  }
}
@media (max-width: 700px) {
  body {
    padding-bottom: 76px;
  }
  main {
    padding: 0 20px;
  }
  .site-header {
    position: static;
  }
  .desktop-nav {
    min-height: 64px;
    padding: 10px 20px;
    gap: 12px 24px;
    flex-wrap: wrap;
  }
  .desktop-nav a {
    font-size: 0.875rem;
    padding: 6px 0;
  }
  .desktop-nav a:nth-child(2),
  .desktop-nav a:nth-child(4) {
    display: none;
  }
  .search-hero {
    padding: 48px 0 36px;
  }
  .search-hero > p {
    font-size: 1rem;
    margin-bottom: 24px;
  }
  .search-box label {
    font-size: 0.9375rem;
  }
  .search-control {
    padding-left: 14px;
    gap: 10px;
  }
  .search-control > .icon {
    display: none;
  }
  .search-control .button {
    padding: 8px 16px;
  }
  .sample-notice {
    padding: 16px;
  }
  .sample-notice b {
    display: block;
    margin-bottom: 4px;
  }
  .section {
    padding: 36px 0;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .entry-grid,
  .video-grid,
  .record-list {
    grid-template-columns: 1fr;
  }
  .entry-card {
    grid-template-columns: 24px 1fr 20px;
    padding: 22px;
  }
  .entry-card > span:last-child {
    display: block;
  }
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .process-card {
    padding: 24px 16px;
    gap: 12px;
  }
  .process-card:nth-child(3n) {
    border-right: 1px solid var(--border);
  }
  .process-card:nth-child(2n) {
    border-right: 0;
  }
  .process-card:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--border);
  }
  .process-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
  .library-tools label {
    width: 100%;
  }
  .library-tools input {
    flex-basis: 65%;
  }
  .record {
    padding: 22px;
  }
  .document-meta {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .process-page {
    padding-top: 24px;
  }
  .chapter {
    padding: 20px;
  }
  .chapter header {
    flex-wrap: wrap;
  }
  .chapter h3 {
    min-width: 150px;
  }
  .bottom-notes,
  .split,
  .story-demo {
    grid-template-columns: 1fr;
  }
  .bottom-notes {
    gap: 20px;
  }
  .site-footer {
    margin: 24px 20px 0;
    flex-direction: column;
    gap: 12px;
  }
  .mobile-nav {
    position: fixed;
    bottom: 0;
    z-index: 30;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: white;
    border-top: 1px solid var(--border);
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--secondary);
    min-width: 48px;
  }
  .mobile-nav a:active {
    color: var(--accent);
  }
  .mobile-nav .icon {
    width: 22px;
    height: 22px;
  }
  .service-hero {
    padding: 48px 0 36px;
  }
  .service-hero > p {
    font-size: 1rem;
  }
  .service-section {
    padding: 40px 0;
  }
  .flow-list li {
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 22px;
  }
  .flow-list p {
    grid-column: 2;
  }
  .security-box {
    padding: 24px;
  }
  .story-demo > div {
    padding: 24px;
  }
  .service-page + .site-footer {
    padding-bottom: 20px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  a,
  button {
    transition:
      color 0.15s,
      background 0.15s,
      border-color 0.15s;
  }
}
/* 読みやすさの統一：見出し、分類、操作を別の見た目にする。 */
.section-heading {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  margin-bottom: 32px;
}
.library-tools { justify-content: center; text-align: center; }
.library-tools input { flex: 0 1 380px; }
.site-footer p:last-child { font-size: 0.75rem; }
.site-footer p:first-child { color: var(--danger); }
.entry-card { background: #f3f4f5; border: 0; color: var(--text); position: relative; padding-right: 66px; }
.entry-card .icon { color: #525b66; }
.entry-card p { color: var(--secondary); line-height: 2; }
.entry-card > span:last-child {
  display: grid; place-items: center; position: absolute; top: 20px; right: 18px;
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff;
}
.entry-card:hover { background: #e9edf1; color: var(--text); }
.entry-card h3 { line-height: 1.5; }
.text-link, .record .record-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  padding: 11px 18px;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
}
.section-heading > .text-link { align-self: center; }
.text-link:hover, .record:hover .record-open { background: var(--accent-hover); color: white; }
.record:hover, .video-card:hover { color: var(--text); }
.record { gap: 18px; padding: 28px; }
.record-meta { gap: 8px; }
.record-meta > span:first-child, .video-description > small {
  display: inline-block;
  background: #41464d;
  color: white;
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
}
.record-meta > span:nth-child(2) {
  border: 1px solid #858b92;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #41464d;
}
.record h3, .video-description h3 { line-height: 1.65; }
.record p, .video-description p, .chapter dd { line-height: 2; }
.document-meta { border: 0; background: #f3f5f7; padding: 24px; border-radius: 14px; gap: 20px; }
.document-meta dt, .chapter dt {
  display: inline-block;
  background: #e2e5e8;
  color: #30353b;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8125rem;
  font-weight: 700;
}
.document-meta dd { margin-top: 12px; font-weight: 500; font-size: 0.9375rem; }
.chapter dd { margin-top: 10px; }
.chapter { background: #fafafa; border-color: #e3e5e8; }
.chapter header { padding-bottom: 16px; border-bottom: 1px solid #ddd; }
.chapter.active { background: #f3f8ff; }
.bottom-notes section { background: #f3f5f7; border: 0; }
.bottom-notes h3 { font-size: 0.9375rem; }
/* タブレット横向きも下部メニュー。PCの小型ナビとは独立したタップ領域。 */
@media (max-width: 1366px), (any-pointer: coarse) {
  body, body.service-body { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  body:has(.mobile-nav) .site-header { display: none; }
  .mobile-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    display: flex; justify-content: space-evenly;
    background: #fff; border-top: 1px solid #d4d4d4;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    display: flex; flex: 1; max-width: 160px; min-height: 52px;
    align-items: center; justify-content: center; flex-direction: column;
    gap: 4px; font-size: 0.75rem; font-weight: 700; color: #525252;
  }
  .mobile-nav .icon { width: 22px; height: 22px; }
  .mobile-nav a:hover, .mobile-nav a:focus-visible { color: var(--accent); background: #edf5ff; border-radius: 10px; }
  section[id], input[id] { scroll-margin-top: 24px; }
  .video-column { position: static; }
}
@media (max-width: 700px) {
  .library-section { padding: 36px 16px; }
  .library-tools { gap: 12px; }
  .library-tools label { width: 100%; }
  .library-tools input { flex-basis: 100%; width: 100%; }
  .record { padding: 22px; }
  .document-meta { grid-template-columns: 1fr 1fr; padding: 18px; }
  .site-footer { padding: 24px 4px; gap: 8px; }
}
/* 工程の順序と一覧の絞り込み */
.search-hero > p, .process-heading p, .section-heading p { line-height: 2; }
.process-heading h1 { line-height: 1.65; }
.chapter dl div + div { margin-top: 24px; }
.desktop-nav { gap: 36px; }
.process-grid {
  display: flex; gap: 28px; border: 0; background: none; overflow: visible;
}
.process-grid .process-card {
  flex: 1; min-width: 0; position: relative; flex-direction: column;
  justify-content: center; text-align: center; padding: 24px 8px;
  border: 0; border-radius: 12px; background: #fff;
  font-size: 0.875rem; gap: 10px;
}
.process-grid .process-card:not(:last-child)::after {
  content: "→"; position: absolute; right: -23px; top: 50%;
  transform: translateY(-50%); color: var(--accent); font-size: 20px;
}
.process-grid .process-card[aria-pressed="true"],
.process-extra .process-card[aria-pressed="true"] {
  background: #e9f3ff;
  color: var(--accent);
  box-shadow: none;
}
.process-extra { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 20px; }
.process-extra > p { color: var(--secondary); font-size: 0.875rem; }
.process-extra .process-card { border: 1px solid #d4d4d4; border-radius: 10px; padding: 12px 20px; }
.category-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; }
.category-filters button { border: 1px solid #c8cdd3; background: white; color: #41464d; border-radius: 8px; padding: 9px 15px; font-size: 0.875rem; }
.category-filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
.video-column .media-title { justify-content: flex-end; }
@media (max-width: 1366px), (any-pointer: coarse) {
  .mobile-nav a { font-size: 0.9rem; }
}
@media (max-width: 700px) {
  #guide .entry-grid { grid-template-columns: 1fr; }
  .entry-card { grid-template-columns: 24px 1fr; padding-right: 66px; }
  .process-grid { flex-direction: column; gap: 28px; }
  .process-grid .process-card { flex-direction: row; padding: 18px; min-height: 64px; }
  .process-grid .process-card:not(:last-child)::after { content: "↓"; top: auto; bottom: -30px; right: 50%; transform: translateX(50%); }
  .process-extra { flex-direction: column; gap: 12px; }
  .category-filters button { flex: 0 1 auto; }
}
.entry-option { text-align: center; min-width: 0; }
#process {
  background: #f3f5f7;
  border-radius: 24px;
  padding-left: 32px;
  padding-right: 32px;
}
#guide .entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
  margin-inline: auto;
}
.entry-button {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 62px; padding: 16px 20px; border-radius: 12px;
  background: var(--accent); color: white; font-weight: 700; line-height: 1.5;
}
.entry-button:hover { background: var(--accent-hover); color: white; }
.entry-option > p { margin-top: 14px; color: var(--secondary); font-size: 0.9375rem; line-height: 1.9; }
.mobile-nav a { gap: 2px; line-height: 1.25; }
.mobile-nav .icon { flex: 0 0 22px; }
.process-extra .icon:has(use[href$="#trouble"]) { color: var(--danger); }
.bottom-notes .critical-label, .critical-label { color: var(--danger); }
/* 必須確認を赤く示す場合、編集者が要素に critical-label を付けます。 */
/* ボタン・検索欄は左右を半円に統一。カードや資料ラベルは対象外。 */
button,
.button,
.entry-button,
.text-link,
.record .record-open,
.search-hints button,
.category-filters button,
.chapter button,
.process-grid .process-card,
.search-control,
.library-tools input {
  border-radius: 999px;
}
.process-grid .process-card {
  border-radius: var(--radius);
}
@media print {
  .site-header,
  .mobile-nav,
  .search-box,
  .library-tools,
  .actions,
  .skip {
    display: none;
  }
  body {
    padding: 0;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .video-column {
    position: static;
  }
  .learning-layout,
  .bottom-notes {
    display: block;
  }
  .chapter,
  .record {
    break-inside: avoid;
  }
}

@media (max-width: 700px) {
  #guide .entry-grid { grid-template-columns: 1fr; }
  #process { padding-left: 16px; padding-right: 16px; }
}
