:root {
  color-scheme: light;
  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-muted: #f0f0ed;
  --surface-hover: #e9e9e5;
  --text: #20211f;
  --muted: #666963;
  --line: #dadbd6;
  --line-strong: #bfc1ba;
  --accent: #16624f;
  --accent-hover: #0e503f;
  --accent-soft: #e1f0ea;
  --focus: #4d8bc7;
  --shadow-sm: 0 1px 2px rgba(25, 28, 24, .08), 0 1px 6px rgba(25, 28, 24, .04);
  --shadow-md: 0 12px 34px rgba(25, 28, 24, .10);
  --radius: 12px;
  --header-height: 66px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent);
  outline-offset: 2px;
}

.container {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding-inline: clamp(14px, 2.8vw, 30px);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
}
.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 21px; height: 21px; display: block; }
.brand-name {
  margin: 0;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color .16s ease;
}
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.language-button {
  min-width: 0;
  padding: 5px 1px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .16s ease, opacity .16s ease;
}
.language-button:hover { color: var(--text); }
.language-button:active { opacity: .65; }
.header-icon-link {
  display: inline-grid;
  place-items: center;
  padding: 5px 1px;
  color: var(--muted);
  text-decoration: none;
  transition: color .16s ease, opacity .16s ease;
}
.header-icon-link:hover { color: var(--text); }
.header-icon-link:active { opacity: .65; }
.header-icon-link svg { width: 20px; height: 20px; display: block; }

.main {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 2.8vw, 30px) 54px;
}
.page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px 20px;
}
.page-intro-copy { min-width: 0; }
.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.page-intro h1,
.page-intro h2 {
  margin: 0;
  font-size: clamp(23px, 3.5vw, 32px);
  line-height: 1.25;
  letter-spacing: -.03em;
}
.page-intro p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.local-badge svg { width: 15px; height: 15px; display: block; }

.section { padding: 22px 0 28px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.section-title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.02em;
}
.section-description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.text-link {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.text-link:hover { color: var(--text); }
.muted { color: var(--muted); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tool-card {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tool-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 7px 20px rgba(25, 28, 24, .08);
  transform: translateY(-1px);
}
.tool-card-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tool-card h3 {
  margin: 15px 0 6px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.tool-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.button:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.button:active { transform: translateY(1px); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.button svg { width: 15px; height: 15px; display: block; }

.workspace {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 15px;
}
.workspace h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.workspace-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.principle {
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--surface-muted);
}
.principle strong { display: block; font-size: 13px; }
.principle span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.searchbar { margin: 0 0 18px; }
.searchbar label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.searchbar input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfbf9;
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, background .16s ease;
}
.searchbar input:hover { border-color: var(--line-strong); }
.searchbar input:focus { border-color: color-mix(in srgb, var(--focus) 60%, var(--line)); background: var(--surface); }

.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.privacy-note svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.privacy-note strong { display: block; margin-bottom: 2px; font-size: 12px; }
.privacy-note span { display: block; color: color-mix(in srgb, var(--accent) 78%, var(--text)); font-size: 11px; line-height: 1.6; }

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li {
  position: relative;
  padding: 12px 14px 12px 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}
.features li::before {
  content: "✓";
  position: absolute;
  top: 11px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.content-panel {
  max-width: 860px;
  padding: 24px 26px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.content-panel h1 { margin: 0 0 12px; font-size: 25px; letter-spacing: -.025em; }
.content-panel h2 {
  margin: 28px 0 8px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  font-size: 15px;
  letter-spacing: -.01em;
}
.content-panel h2:first-of-type { margin-top: 22px; }
.content-panel > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.content-panel p,
.content-panel li { color: var(--muted); font-size: 12px; line-height: 1.8; }
.content-panel p { margin: 8px 0; }
.content-panel ul,
.content-panel ol { padding-left: 22px; }
.content-panel li { margin: 4px 0; }
.content-panel .button { margin-top: 6px; }

.ad-slot {
  min-height: 90px;
  margin: 24px 0;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}
.ads-enabled .ad-slot { min-height: 0; border: 0; }

.footer {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 clamp(14px, 2.8vw, 30px) 34px;
  color: var(--muted);
  font-size: 11px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 13px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

@media (max-width: 760px) {
  .nav { gap: 12px; }
  .nav a:nth-child(2) { display: none; }
  .page-intro { flex-direction: column; gap: 12px; }
  .local-badge { margin-top: 0; }
  .tool-grid, .features { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .workspace { padding: 17px; }
  .content-panel { padding: 20px; }
  .tool-card-actions .button { flex: 1 1 0; }
}

@media (max-width: 460px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .page-intro h1, .page-intro h2 { font-size: 24px; }
  .tool-card { min-height: 0; }
  .tool-card-actions { flex-direction: column; }
  .tool-card-actions .button, .tool-actions .button { width: 100%; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
