:root {
  --bg: #ffffff;
  --surface: #f7faf8;
  --surface-strong: #eef5f2;
  --text: #192523;
  --muted: #60716b;
  --border: #d9e4df;
  --accent: #2f6f67;
  --accent-strong: #235850;
  --danger: #c94444;
  --warning: #9f6a16;
  --success: #2f6f67;
  --shadow: 0 18px 50px rgba(25, 37, 35, 0.08);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

button:hover,
.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

button:active,
.button:active {
  transform: translateY(1px);
}

button.secondary,
.button.secondary {
  background: #fff;
  color: var(--accent-strong);
  border-color: var(--border);
}

button.ghost,
.button.ghost {
  background: transparent;
  color: var(--accent-strong);
  border-color: transparent;
  padding-inline: 0;
}

:focus-visible {
  outline: 3px solid rgba(201, 68, 68, 0.45);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text);
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 56px 0 36px;
  background: linear-gradient(180deg, #fff 0%, #f7faf8 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.82fr);
  align-items: center;
  gap: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 650;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: 0;
  font-weight: 600;
}

h1 {
  max-width: 760px;
  font-size: clamp(36px, 6vw, 64px);
}

h2 {
  font-size: clamp(25px, 3vw, 36px);
}

h3 {
  font-size: 18px;
}

p {
  margin: 0;
}

.lead {
  max-width: 700px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.action-row,
.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  display: block;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  background: #fff;
}

.section {
  padding: 56px 0;
}

.section.muted {
  background: var(--surface);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--border);
}

.metrics-grid > div {
  padding: 22px 20px;
  border-right: 1px solid var(--border);
}

.metrics-grid > div:last-child {
  border-right: 0;
}

.metrics-grid strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.metrics-grid span {
  color: var(--muted);
  font-size: 13px;
}

.app-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.filter-panel {
  position: sticky;
  top: 78px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 18px;
}

.filters,
.feedback-form,
.checklist-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-weight: 400;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.quick-actions,
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions button,
.choice-grid label {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
}

.choice-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.source-note,
.notice {
  margin-top: 18px;
  border-left: 3px solid var(--danger);
  padding: 12px 0 12px 14px;
  color: var(--muted);
  font-size: 14px;
}

.source-note strong,
.notice strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.card-grid,
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.directory-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plain-panel,
.result-card,
.stat-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 20px;
}

.result-card {
  display: grid;
  gap: 12px;
}

.result-card[hidden] {
  display: none;
}

.result-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 550;
}

.tag.warn {
  background: #fff6e8;
  color: var(--warning);
}

.tag.danger {
  background: #fff1f1;
  color: var(--danger);
}

.muted-text,
.result-card p,
.plain-panel p,
.list-notes li {
  color: var(--muted);
}

.text-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.ordered-list,
.check-list,
.link-stack,
.copy-box {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
}

.ordered-list {
  padding-left: 20px;
}

.check-list {
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.64em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.link-stack a {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  text-decoration: none;
}

.link-stack a::after {
  content: "↗";
  color: var(--muted);
}

.copy-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 18px;
}

.copy-text {
  white-space: pre-wrap;
  color: var(--text);
  font-family: inherit;
  line-height: 1.7;
}

.compare-tool,
.compare-summary-panel,
.compare-card,
.compare-fields {
  display: grid;
  gap: 16px;
}

.compare-tool {
  gap: 42px;
}

.compare-summary-grid,
.compare-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.compare-summary-card,
.compare-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 20px;
}

.compare-summary-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.compare-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compare-copy {
  margin-top: 0;
}

.compare-copy .copy-text {
  max-height: 260px;
  overflow: auto;
}

.compare-matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.compare-matrix {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-matrix caption {
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
}

.compare-matrix th,
.compare-matrix td {
  border-top: 1px solid var(--border);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

.compare-matrix th {
  font-weight: 600;
}

.compare-matrix th:first-child,
.compare-matrix td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  box-shadow: 1px 0 0 var(--border);
}

.feedback-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.form-status {
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-panel strong {
  display: block;
  font-size: 32px;
  line-height: 1.1;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
}

.data-table td:last-child {
  min-width: 150px;
}

.empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 920px) {
  .hero-grid,
  .app-grid,
  .two-column,
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .card-grid,
  .directory-grid,
  .directory-grid.two,
  .compare-summary-grid,
  .compare-input-grid,
  .metrics-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .metrics-grid > div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .container {
    width: min(100% - 28px, var(--max));
  }

  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .data-table td:last-child {
    white-space: normal;
  }

  .office-table {
    display: table;
    overflow: visible;
    white-space: normal;
  }

  .office-table thead {
    display: none;
  }

  .office-table tbody,
  .office-table tr,
  .office-table td {
    display: block;
    width: 100%;
  }

  .office-table tr {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }

  .office-table td {
    border-bottom: 0;
    padding: 4px 0;
  }

  .office-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
  }

  .office-table td:first-child {
    font-weight: 650;
  }

  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .action-row .button,
  .action-row button {
    width: 100%;
  }

  .compare-money {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
