:root {
  --bg: #faf8f6;
  --surface: #ffffff;
  --surface-quiet: #f3f0ec;
  --border: #e6e1db;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-quiet: #78706a;
  --text-quiet-rgb: 120, 112, 106;
  --accent: #ce1272;
  --accent-rgb: 206, 18, 114;
  --accent-quiet: #fdf0f6;
  --accent-text: #a80d58;
  --ok: #15803d;
  --ok-quiet: #eef5ef;
  --white: #fff;
  --white-rgb: 255, 255, 255;

  --shadow-soft: 0 10px 28px rgba(var(--text-quiet-rgb), 0.08);
  --page-pad: 40px;
  --page-max: 1120px;
  --read-max: 760px;

  --font-display: 'Archivo', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ja: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ja);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  line-height: 1.8;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--accent-quiet);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 8px 0;
  color: var(--text);
}
.brand-name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.brand-by {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.brand-by em { font-style: normal; color: var(--accent-text); }
.tabs {
  display: flex;
  gap: 22px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.tabs a { white-space: nowrap; transition: text-decoration-color 0.2s; }
.tabs a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.tabs a.active {
  color: var(--accent-text);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    padding-block: 6px 10px;
    row-gap: 4px;
  }
  .tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 18px;
    padding-bottom: 2px;
  }
  .tabs a { flex: none; }
}
@media (max-width: 640px) {
  :root { --page-pad: 20px; }
}

.page { padding: 32px 0 64px; }
.page-header { margin-bottom: 28px; max-width: var(--read-max); }
.page-title {
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 0 0 10px;
}
.page-lead {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  row-gap: 4px;
  font-size: 12px;
  color: var(--text-quiet);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-quiet); }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb-sep { opacity: 0.5; }
.breadcrumb span[aria-current] { color: var(--text-muted); }

.category-section { margin-bottom: 40px; }
.section-title {
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 6px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  line-height: 1.4;
}
.section-title a:hover { color: var(--accent-text); }
.section-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-quiet);
}
.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .item-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.item { min-width: 0; }
.item-link {
  display: flex;
  gap: 14px;
  height: 100%;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.item-link:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: var(--shadow-soft);
}
.item-thumb {
  width: 120px;
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.item-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: 0.04em;
}
.item-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}
.item-link:hover .item-title { text-decoration: underline; text-underline-offset: 3px; }
.item-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
.item-date {
  font-size: 11px;
  color: var(--text-quiet);
  margin-top: 2px;
}
.empty {
  margin: 0;
  padding: 20px;
  background: var(--surface-quiet);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-quiet);
}

.article { max-width: var(--read-max); }
.article-header { margin-bottom: 24px; }
.category-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent-quiet);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 12px;
}
.category-badge:hover { border-color: rgba(var(--accent-rgb), 0.5); }
.article-title {
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 0 0 10px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--text-quiet);
}
.article-author {
  color: var(--text-muted);
  font-weight: 700;
}
.header-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}
@media (max-width: 640px) {
  .header-image {
    height: 56px;
    object-fit: cover;
    object-position: left center;
  }
}

.article-body {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.85;
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: auto-phrase;
  text-wrap: pretty;
}
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 16px; }
.article-body h2 {
  font-size: 19px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.5;
  margin: 40px 0 14px;
  padding: 0 0 8px;
  border-bottom: 2px solid var(--border);
}
.article-body strong { color: var(--text); font-weight: 700; }
.article-body a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.article-body ul,
.article-body ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}
.article-body li { margin: 4px 0; }
.article-body li::marker { color: var(--accent-text); }
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-quiet);
  border-radius: 4px;
  padding: 1px 5px;
}
.article-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.article-body table {
  border-collapse: collapse;
  width: 100%;
  min-width: 420px;
  font-size: 14px;
  line-height: 1.6;
}
.article-body th,
.article-body td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.article-body th {
  background: var(--surface-quiet);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.article-body tr:last-child td { border-bottom: 0; }
.faq p {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.faq p > strong:first-child {
  display: block;
  color: var(--accent-text);
  margin-bottom: 4px;
}
.faq p > strong:first-child + br { display: none; }

.operator-notice {
  margin: 36px 0 0;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-quiet);
  background: var(--surface-quiet);
  border-radius: 10px;
}
.cta { margin: 24px 0 0; }
.cta-button {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.3);
}

.related {
  max-width: var(--read-max);
  margin-top: 40px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.related-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-quiet);
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
.related-heading + .related-list + .related-heading { margin-top: 18px; }
.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.related-list li { margin: 4px 0; }
.related-list a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.related-note {
  font-size: 11px;
  color: var(--text-quiet);
  white-space: nowrap;
}

.article-nav {
  max-width: var(--read-max);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.article-nav a { color: var(--accent-text); }
.article-nav a:hover { text-decoration: underline; text-underline-offset: 2px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 12px;
  color: var(--text-quiet);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.footer-site { font-weight: 700; color: var(--text-muted); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-links a { color: var(--text-quiet); white-space: nowrap; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 2px; }

a:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}
.site-header a:focus-visible { outline-offset: 2px; }

@media (max-width: 640px) {
  .tabs {
    flex-wrap: wrap;
    overflow: visible;
    gap: 4px 16px;
  }
  .page { padding: 24px 0 48px; }
  .item-list { grid-template-columns: 1fr; }
  .item-thumb { width: 96px; }
  .article-body { font-size: 15px; }
  .article-body h2 { font-size: 18px; margin-top: 32px; }
  .related { padding: 16px 18px; }
  .cta-button { display: block; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tabs a,
  .item-link,
  .cta-button { transition: none; }
}
