:root {
  --md-sys-color-primary: #2f88d9;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #e8f3fc;
  --md-sys-color-on-primary-container: #0c2d4a;
  --md-sys-color-surface: #fafcff;
  --md-sys-color-on-surface: #1a1c1e;
  --md-sys-color-surface-variant: #eaf1f8;
  --md-sys-color-on-surface-variant: #505862;
  --md-sys-color-outline: #94a3b8;
  --md-sys-color-outline-variant: #dce6f0;
  --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md-sys-elevation-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --error: #c53b3b;
  --success: #2e7d32;
  --content-width: 960px;
  --diff-added-bg: #eaf7ee;
  --diff-added-border: #8bc89b;
  --diff-removed-bg: #fff0f0;
  --diff-removed-border: #e1a1a1;
  --diff-same-bg: #ffffff;
  --diff-line-number: #6b7280;
  --danger: #b3261e;
  --danger-container: #f9dedc;
  --danger-outline: #f2b8b5;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Roboto", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface);
  background-color: var(--md-sys-color-surface);
}

.top-app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 24px;
  min-height: 64px;
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--md-sys-elevation-2);
}

.top-app-bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-app-bar__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.top-app-bar__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-app-bar__link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.top-app-bar__link:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
}

main {
  flex: 1;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 32px 24px 48px;
  width: 100%;
}

.hero {
  text-align: center;
  padding: 48px 0 56px;
  background: radial-gradient(ellipse 90% 70% at 50% -10%, rgba(47, 136, 217, 0.1) 0%, transparent 58%);
}

.hero__brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  max-width: min(100%, 520px);
  margin-left: auto;
  margin-right: auto;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  line-height: 1.15;
}

.hero__tagline {
  margin: 0 auto;
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 26em;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.how-to-list {
  margin: 0;
  padding-left: 1.25em;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.8;
}

.related-tools h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--md-sys-color-on-surface);
}

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

.related-tool-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.04s ease;
}

.related-tool-card:hover,
.related-tool-card:focus {
  background: var(--md-sys-color-primary-container);
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 28%, transparent);
  box-shadow: var(--md-sys-elevation-1);
  outline: none;
}

.related-tool-card:active {
  transform: translateY(1px);
}

.related-tool-card .material-symbols-outlined {
  color: var(--md-sys-color-primary);
  font-size: 24px;
}

.related-tool-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.9rem;
}

.related-tool-card small {
  display: block;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.78rem;
  line-height: 1.45;
}

.tool-card {
  background-color: var(--md-sys-color-surface-variant);
  border: 1px solid transparent;
  border-radius: var(--md-sys-shape-corner-large);
  box-shadow: var(--md-sys-elevation-1);
  padding: 24px;
  margin-bottom: 16px;
}

.tool-card__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--md-sys-color-on-surface);
}

.tool-card__desc {
  margin: 0 0 18px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.4;
}

.tool-card__desc--help {
  margin-top: 20px;
  margin-bottom: 0;
}

.field-label {
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform 0.04s ease, opacity 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

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

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn--primary {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--md-sys-elevation-1);
}

.btn--primary:hover {
  opacity: 0.94;
}

.btn--secondary {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 28%, transparent);
}

.btn--secondary:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary-container) 85%, var(--md-sys-color-outline-variant));
}

.tool-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: color-mix(in srgb, var(--error) 8%, var(--md-sys-color-surface));
  border: 1px solid color-mix(in srgb, var(--error) 35%, var(--md-sys-color-outline-variant));
  color: var(--error);
  font-size: 0.875rem;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.result-header h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.tool-help h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.tool-help p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.65;
}

.tool-help p + p {
  margin-top: 10px;
}

summary {
  cursor: pointer;
}

.tool-help details summary + p {
  margin-top: 14px;
}

.seo-details summary + .faq-list {
  margin-top: 14px;
}

.faq-list {
  display: grid; gap: 14px;
}

.faq-item {
  padding-top: 14px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.faq-item:first-child {
  padding-top: 0;
  border-top: none;
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
}

footer {
  padding: 18px 24px 20px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  letter-spacing: -0.04em;
}

footer p {
  margin: 0;
  line-height: 1.35;
}

footer a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 10px;
}

.footer-links a {
  line-height: 1.4;
  padding: 4px 6px;
}

@media (max-width: 600px) {
  .top-app-bar {
    padding: 0 16px;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 56px;
  }

  .top-app-bar__link {
    font-size: 0.8125rem;
    padding: 4px 8px;
  }

  main {
    padding: 24px 16px 40px;
  }

  .hero {
    padding: 32px 0 40px;
  }

  .related-tools__grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
  }

  .tool-card {
    padding: 18px;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }
}