:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #5b6b82;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --line: #e2e8f0;
  --soft: #eef3fa;
  --t-s: #ff7f7f;
  --t-a: #ffbf7f;
  --t-b: #ffdf7f;
  --t-c: #bfff7f;
  --t-d: #7fbfff;
  --on-tier: #0f172a;
  --on-brand: #ffffff;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-logo: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", var(--font);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1320;
    --card: #161d2e;
    --ink: #e6ebf5;
    --muted: #9aa6bd;
    --brand: #6b93ff;
    --brand-dark: #8aaaff;
    --on-brand: #0e1320;
    --line: #263049;
    --soft: #1b2438;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-dark);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--card);
}

.site-head {
  background: var(--card);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font-family: var(--font-logo);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-ring {
  display: block;
  flex: none;
}

.head-nav {
  display: flex;
  gap: 4px;
}

.head-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.head-nav a:hover {
  background: var(--soft);
  color: var(--ink);
}

.tier-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--t-s) 0 20%, var(--t-a) 20% 40%, var(--t-b) 40% 60%, var(--t-c) 60% 80%, var(--t-d) 80% 100%);
}


.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 auto;
  padding-top: 12px;
  padding-bottom: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.crumbs li + li::before {
  content: "›";
  margin-right: 4px;
}

.tool-hero {
  padding: 24px 0 48px;
}

.tool-hero h1,
.page-head h1 {
  font-size: 36px;
  font-weight: 700;
}

.lead {
  max-width: 70ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.tool-frame {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.tool-frame .tm {
  border-radius: 0;
  background: var(--card);
  --tm-bg: var(--card);
}

.tool-alt {
  margin: 12px 0 0;
  font-size: 14px;
}

.steps {
  padding: 48px 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps h2,
.sec-head h2,
.faq h2 {
  font-size: 28px;
  font-weight: 700;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--t-s);
  color: var(--on-tier);
  font-weight: 700;
  font-size: 18px;
}

.step:nth-child(2)::before {
  background: var(--t-b);
}

.step:nth-child(3)::before {
  background: var(--t-d);
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
}

.step p {
  margin: 8px 0 0;
  color: var(--muted);
}

.tpl-sec {
  padding: 48px 0;
}

.tpl-sec-index {
  padding-top: 24px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.sec-more {
  font-size: 14px;
  font-weight: 600;
}

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.tpl-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--t-a);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}

.tpl-grid li:nth-child(5n + 2) .tpl-card {
  border-left-color: var(--t-b);
}

.tpl-grid li:nth-child(5n + 3) .tpl-card {
  border-left-color: var(--t-c);
}

.tpl-grid li:nth-child(5n + 4) .tpl-card {
  border-left-color: var(--t-d);
}

.tpl-grid li:nth-child(5n + 5) .tpl-card {
  border-left-color: var(--t-s);
}

.tpl-card:hover {
  color: var(--ink);
  box-shadow: var(--shadow-2);
}


.tpl-name {
  font-size: 18px;
  font-weight: 700;
}

.tpl-desc {
  color: var(--muted);
  font-size: 14px;
}

.tpl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
}

.prose-wrap {
  padding: 48px 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.prose {
  max-width: 760px;
}

.prose > * {
  max-width: 70ch;
}

.prose h2 {
  margin: 48px 0 16px;
  font-size: 28px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 32px 0 8px;
  font-size: 18px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose li + li {
  margin-top: 4px;
}

.prose table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 14px;
}

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

.faq {
  padding: 48px 0 64px;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
}

.faq-list {
  margin: 0;
}

.faq-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item dt {
  font-weight: 700;
}

.faq-item dd {
  margin: 8px 0 0;
  color: var(--muted);
}

.page {
  padding-bottom: 48px;
}

.page-head {
  padding: 32px 0 24px;
}

.page .prose {
  padding-top: 24px;
  padding-bottom: 24px;
  border-radius: var(--radius);
}

.page-legal .prose {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 32px;
}

.meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.cta {
  margin-top: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: var(--on-brand);
}

.site-foot {
  margin-top: 0;
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--card);
  font-size: 14px;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.foot-brand p {
  max-width: 40ch;
  margin: 12px 0 0;
  color: var(--muted);
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
  align-content: start;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  text-decoration: none;
}

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

.foot-copy {
  margin-top: 32px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .brand-name {
    font-size: 18px;
  }

  .head-nav a {
    padding: 0 8px;
    font-size: 12px;
  }

  .tool-hero {
    padding: 16px 0 32px;
  }

  .tool-hero h1,
  .page-head h1 {
    font-size: 28px;
  }

  .tool-frame {
    margin-right: -16px;
    margin-left: -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .steps h2,
  .sec-head h2,
  .faq h2,
  .prose h2 {
    font-size: 22px;
  }

  .step-list,
  .tpl-grid,
  .faq-grid,
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-list {
    gap: 24px;
  }

  .faq-grid {
    gap: 16px;
  }

  .page-legal .prose {
    padding: 16px;
  }

  .btn-primary {
    width: 100%;
  }
}
