:root {
  --color-bg: #f4f7fb;
  --color-surface: #ffffff;
  --color-text: #1f2328;
  --color-muted: #5f6b7a;
  --color-accent: #0a72c2;
  --color-accent-soft: #e6f4fd;
  --color-border: #dfe3ea;
  --color-header: #14294b;
  --color-brand: #00a0e9;
  --color-purple: #8b5cf6;
  --color-header-text: #ffffff;
  --max-width: 1040px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Yu Gothic", "Hiragino Sans", "Meiryo", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  background: var(--color-header);
  color: var(--color-header-text);
}

.site-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-header-text);
  text-decoration: none;
}

.global-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.9rem;
}

.global-nav a {
  color: var(--color-header-text);
  text-decoration: none;
  opacity: 0.9;
}

.global-nav a:hover,
.global-nav a:focus {
  opacity: 1;
  text-decoration: underline;
}

/* ---------- Layout ---------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.section,
.news,
.hero {
  margin-bottom: 40px;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 12px;
  line-height: 1.4;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--color-accent);
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

/* ---------- Hero & search ---------- */
.hero {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.hero p {
  margin: 0 0 16px;
  color: var(--color-muted);
}

.search {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.search button {
  padding: 10px 20px;
  font-size: 1rem;
  color: #fff;
  background: var(--color-accent);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.search button:hover {
  filter: brightness(1.1);
}

/* ---------- News ---------- */
.news-list,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.news-list li,
.plain-list li {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.news-list li:last-child,
.plain-list li:last-child {
  border-bottom: 0;
}

time,
.meta {
  display: inline-block;
  margin-right: 12px;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  display: block;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.card:hover,
.card:focus {
  border-color: var(--color-accent);
  box-shadow: 0 2px 10px rgba(29, 78, 216, 0.12);
}

.admin .card {
  background: #fbfbfc;
}

/* ---------- Manual pages ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0 0 12px;
}

.manual-article {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.manual-article h3 {
  margin-top: 24px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}

.manual-article h3:first-child {
  margin-top: 0;
}

/* Screenshot placeholder. Replace with <img> once captures are ready. */
.shot {
  margin: 16px 0;
}

.shot img {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.shot figcaption {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.shot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 16px;
  color: var(--color-muted);
  background: repeating-linear-gradient(45deg, #f3f5f8, #f3f5f8 10px, #eaedf2 10px, #eaedf2 20px);
  border: 1px dashed #b8c0cc;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.note {
  padding: 12px 16px;
  background: var(--color-accent-soft);
  border-left: 4px solid var(--color-accent);
  border-radius: 4px;
}

.pending {
  color: var(--color-muted);
}

.more {
  margin: 8px 0 0;
  text-align: right;
  font-size: 0.9rem;
}

.global-nav a[aria-current="page"] {
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
}

/* ---------- Manual list / buttons ---------- */
.manual-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.manual-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: 110px;
}

.manual-list li:last-child {
  border-bottom: 0;
}

.manual-title {
  font-weight: 700;
}

.manual-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: #fff;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-outline {
  color: var(--color-accent);
  background: transparent;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: var(--color-muted);
  background: #eef0f4;
  border-radius: 999px;
  white-space: nowrap;
}

section[id],
.video-card,
.faq-item,
.manual-article h3[id] {
  scroll-margin-top: 110px;
}

/* ---------- Screenshot manuals ---------- */
.guide-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-bottom: 16px;
}

.guide-card {
  padding: 12px;
}

.guide-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top left;
  margin-bottom: 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.guide-card p {
  margin-bottom: 8px;
}

.sub-title {
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.toc {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2 240px;
}

.menu-path {
  margin: 4px 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.steps {
  padding-left: 1.5em;
}

.steps li {
  margin-bottom: 4px;
}

.shot a {
  display: block;
}

.shot img {
  width: 100%;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.shot img {
  height: auto;
}

/* 下に余白の多い画面は、上の部分だけを表示（クリックで全体を表示） */
.shot img.crop {
  object-fit: cover;
  object-position: top left;
}

.manual-article h3 {
  scroll-margin-top: 110px;
}

/* ---------- Videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.video-card {
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.video-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- FAQ ---------- */
.faq-item {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-item p {
  margin: 12px 0 0;
}

.search-results {
  margin-top: 24px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px 16px 32px;
  background: var(--color-header);
  color: var(--color-header-text);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer .footer-name {
  font-weight: 700;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 12px 0;
}

.site-footer a {
  color: var(--color-header-text);
}

.site-footer .copyright {
  margin-top: 16px;
  font-size: 0.8rem;
  opacity: 0.8;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  main {
    padding: 16px 16px 40px;
  }

  h1 {
    font-size: 1.3rem;
  }

  .hero {
    padding: 16px;
  }

  .manual-article {
    padding: 16px;
  }

  .global-nav {
    width: 100%;
    font-size: 0.85rem;
  }
}

/* ---------- Brand header ---------- */
.site-header {
  background: linear-gradient(90deg, #0f2140, #1b3a66);
  box-shadow: 0 4px 16px rgba(11, 27, 52, 0.25);
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.04em;
}

.site-logo {
  display: inline-flex;
  padding: 6px 10px;
  background: #fff;
  border-radius: 6px;
}

.site-logo img {
  display: block;
  width: auto;
  height: 16px;
}

.global-nav a {
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.global-nav a:hover,
.global-nav a:focus,
.global-nav a[aria-current="page"] {
  text-decoration: none;
  border-bottom-color: var(--color-brand);
}

.site-footer {
  background: linear-gradient(180deg, #14294b, #0b1b34);
}

/* ---------- Top page ---------- */
.home-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(0, 160, 233, 0.35), transparent 60%),
    radial-gradient(700px 400px at 5% 110%, rgba(139, 92, 246, 0.28), transparent 60%),
    linear-gradient(135deg, #0b1b34 0%, #12305a 100%);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
  mask-image: linear-gradient(180deg, #000, transparent 90%);
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 72px;
}

.home-eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 14px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: #bfe6fb;
  border: 1px solid rgba(0, 160, 233, 0.6);
  border-radius: 999px;
  background: rgba(0, 160, 233, 0.12);
}

.home-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.home-hero h1 img {
  display: block;
  width: min(360px, 78%);
  height: auto;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 18px rgba(0, 160, 233, 0.55));
}

.home-lead {
  margin: 0 0 24px;
  color: #cfdcee;
}

.home-search {
  flex-wrap: nowrap;
  gap: 0;
  max-width: 520px;
  padding: 5px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.home-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.home-search button {
  flex: 0 0 auto;
  padding: 10px 26px;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, #00a0e9, #0a72c2);
}

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.home-stats li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.home-stats strong {
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.home-stats span {
  font-size: 0.85rem;
  color: #9fc4e6;
}

.home-hero-shot {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #1a2c4b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(0, 160, 233, 0.12);
  transform: perspective(1400px) rotateY(-11deg) rotateX(4deg);
  transform-origin: left center;
  transition: transform 0.4s ease;
}

.home-hero-shot:hover,
.home-hero-shot:focus {
  transform: perspective(1400px) rotateY(-4deg) rotateX(1deg);
}

.home-shot-bar {
  display: flex;
  gap: 6px;
  padding: 9px 12px;
  background: #0f1e38;
}

.home-shot-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3b4f72;
}

.home-shot-bar i:first-child {
  background: var(--color-brand);
}

.home-hero-shot img {
  display: block;
  width: 100%;
}

.home main {
  padding-top: 40px;
}

.home h2 {
  padding-left: 14px;
  border-left: 5px solid var(--color-brand);
  letter-spacing: 0.04em;
}

/* 業務の流れ */
.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow li {
  position: relative;
}

.flow li + li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -14px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--color-brand);
  border-right: 2px solid var(--color-brand);
  transform: translateY(-50%) rotate(45deg);
}

.flow a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 16px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(150deg, #14294b, #1f4478);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(11, 27, 52, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}

.flow a:hover,
.flow a:focus {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 160, 233, 0.3);
}

.flow-no {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #4cc3f7;
}

.flow strong {
  font-size: 1.05rem;
}

.flow small {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #b9cbe3;
}

/* 入口タイル */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.tile {
  position: relative;
  display: block;
  padding: 20px 20px 18px;
  color: var(--color-text);
  text-decoration: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.tile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-brand), var(--color-purple));
}

.tile:hover,
.tile:focus {
  transform: translateY(-3px);
  border-color: var(--color-brand);
  box-shadow: 0 10px 24px rgba(0, 160, 233, 0.18);
}

.tile svg {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--color-brand);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-muted);
}

.home .card {
  border-radius: 10px;
}

.home .card:hover,
.home .card:focus {
  border-color: var(--color-brand);
  box-shadow: 0 8px 22px rgba(0, 160, 233, 0.16);
}

.home-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 860px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 16px 48px;
  }

  .home-hero-shot,
  .home-hero-shot:hover,
  .home-hero-shot:focus {
    transform: none;
  }

  .flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .flow li + li::before {
    display: none;
  }

  .flow a {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    padding: 12px 16px;
  }

  .home-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .home-search input {
    padding: 10px 12px;
  }

  .home-search button {
    padding: 10px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-shot,
  .flow a,
  .tile {
    transition: none;
  }
}

/* ---------- 画面マニュアル: 一覧 / スライド表示 ---------- */
.screen + .screen {
  margin-top: 32px;
}

.screen-head h3 {
  margin-top: 0;
}

.screen-body > :last-child {
  margin-bottom: 0;
}

.view-bar {
  position: sticky;
  top: 56px;
  scroll-margin-top: 68px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 16px 0 12px;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(11, 27, 52, 0.08);
}

.view-bar button {
  font: inherit;
  cursor: pointer;
}

.view-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--color-bg);
  border-radius: 999px;
}

.view-switch button {
  padding: 5px 16px;
  font-size: 0.88rem;
  color: var(--color-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.view-switch button[aria-pressed="true"] {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
}

.slide-nav,
.slide-dots {
  display: none;
}

.view-bar.is-slides .slide-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.view-bar.is-slides .slide-dots {
  display: flex;
  flex: 1 1 120px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.slide-prev,
.slide-next {
  width: 36px;
  height: 36px;
  padding: 0 0 3px;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: var(--color-header);
  border: 0;
  border-radius: 50%;
  transition: background 0.15s;
}

.slide-prev:hover,
.slide-next:hover {
  background: var(--color-brand);
}

.slide-prev:disabled,
.slide-next:disabled {
  background: #c5cfdd;
  cursor: default;
}

.slide-count {
  min-width: 4.2em;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.slide-dots button {
  width: 22px;
  height: 6px;
  padding: 0;
  background: #cfd8e5;
  border: 0;
  border-radius: 999px;
  transition: background 0.15s, width 0.15s;
}

.slide-dots button:hover {
  background: var(--color-purple);
}

.slide-dots button[aria-current="true"] {
  width: 34px;
  background: var(--color-brand);
}

/* スライド表示: 1画面ずつ横に送る */
.manual-article.is-slides {
  display: flex;
  align-items: flex-start;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.manual-article.is-slides::-webkit-scrollbar {
  display: none;
}

.manual-article.is-slides .screen {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 0 28px;
  min-width: 0;
  margin: 0;
  padding: 24px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.manual-article.is-slides .shot {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
}

.manual-article.is-slides .screen-head,
.manual-article.is-slides .screen-body {
  grid-column: 2;
}

.manual-article.is-slides .shot img {
  width: auto;
  max-width: 100%;
  max-height: 76vh;
  margin: 0 auto;
}

.manual-article.is-slides .shot img.crop {
  aspect-ratio: auto !important;
}

@media (max-width: 860px) {
  .view-bar {
    position: static;
    border-radius: 16px;
  }

  .view-bar.is-slides .slide-dots {
    display: none;
  }

  .view-bar.is-slides .slide-nav {
    margin-left: auto;
  }

  .manual-article.is-slides .screen {
    display: block;
    padding: 16px;
  }

  .manual-article.is-slides .shot {
    margin: 12px 0;
  }

  .manual-article.is-slides .shot img {
    max-height: none;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide-prev,
  .slide-next,
  .slide-dots button {
    transition: none;
  }
}
