:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef2ff;
  --text: #172033;
  --muted: #5e6b85;
  --border: #d9e1f2;
  --primary: #3b5cff;
  --primary-dark: #2747e6;
  --success: #117a47;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(23, 32, 51, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f8faff 0%, var(--bg) 220px);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(248, 250, 255, 0.9);
  border-bottom: 1px solid rgba(217, 225, 242, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 850;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover {
  text-decoration: none;
  transform: scale(1.03);
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 50%, #6366f1 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 210, 255, 0.35);
  transform: rotate(-3deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.logo:hover .logo-mark {
  transform: rotate(6deg) scale(1.08);
  box-shadow: 0 6px 20px rgba(58, 123, 213, 0.45);
}

.logo-mark svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  text-decoration: none;
}

main {
  padding: 2.5rem 0 4rem;
}

.hero,
.page-hero,
.tool-hero,
.card,
.tool-shell,
.info-block,
.stat-box,
.faq-item,
.result-panel,
.notice,
.tool-grid a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero,
.page-hero,
.tool-hero {
  padding: 2rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
}

.hero h1,
.page-hero h1,
.tool-hero h1 {
  margin: 0 0 0.75rem;
  line-height: 1.1;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.hero p,
.page-hero p,
.tool-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions,
.button-row,
.inline-actions,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.hero-points,
.badge-row,
.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.badge,
.hero-points span,
.limit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid #cfdbff;
  border-radius: 999px;
  color: #2944aa;
  font-weight: 700;
  font-size: 0.92rem;
}

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

.button,
button {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.button-primary,
button.button-primary {
  background: var(--primary);
  color: white;
}

.button-primary:hover,
button.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary,
button.button-secondary {
  background: #e8edff;
  color: #2440b8;
}

.button-ghost,
button.button-ghost {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.section {
  margin-top: 1.5rem;
}

.section-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.tool-card {
  display: block;
  padding: 1.15rem;
  color: inherit;
}

.tool-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.tool-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
}

.tool-card .badge {
  margin-top: 1rem;
  background: var(--surface-2);
  border: 1px solid #c9d7ff;
  color: var(--primary);
  font-size: 0.88rem;
  padding: 0.4rem 0.85rem;
  transition: all 0.2s ease;
}

.tool-card:hover .badge {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateX(3px);
}

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

.card,
.info-block,
.notice,
.result-panel,
.tool-shell {
  padding: 1.25rem;
}

.info-block h2,
.card h2,
.result-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.info-block p,
.card p,
.notice p,
.result-panel p {
  margin: 0;
  color: var(--muted);
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  background: #fcfdff;
  color: var(--text);
}

textarea {
  min-height: 240px;
  resize: vertical;
}

textarea[readonly] {
  background: #f8faff;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.helper-text,
.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.tool-shell {
  margin-top: 1rem;
}

.tool-grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.stat-box {
  padding: 1rem;
}

.stat-box strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
}

.stat-box span {
  color: var(--muted);
  font-size: 0.95rem;
}

.options-row {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.check-row input {
  width: auto;
}

.notice {
  margin-top: 1rem;
  background: #f7fbff;
}

.notice strong {
  color: var(--success);
}

.ad-slot {
  min-height: 120px;
  margin-top: 1.25rem;
  padding: 1rem;
  border: 2px dashed #c9d4f4;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  color: var(--muted);
}

.ad-label {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7482a3;
  text-align: center;
}

.ad-slot ins.adsbygoogle {
  display: block;
  min-height: 90px;
}

.ad-slot-fallback {
  text-align: center;
  padding-top: 0.75rem;
}

.ad-slot small {
  display: block;
  margin-top: 0.35rem;
}

.seo-copy p + p,
.seo-copy ul,
.seo-copy ol,
.seo-copy .faq-list {
  margin-top: 0.9rem;
}

.mono,
code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.canvas-panel {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.canvas-wrap {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.range-wrap {
  display: grid;
  gap: 0.4rem;
}

.range-wrap input[type="range"] {
  padding: 0;
}

.inline-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  padding: 1.25rem 1.5rem;
}

.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.list {
  padding-left: 1.1rem;
  color: var(--muted);
}

.list li + li {
  margin-top: 0.35rem;
}

.footer-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.copy-status,
.status {
  min-height: 1.2em;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

.result-area {
  min-height: 180px;
}

@media (max-width: 800px) {
  .hero,
  .two-col,
  .tool-grid-2,
  .header-inner,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    gap: 0.75rem;
  }

  main {
    padding-top: 1.5rem;
  }

  .hero,
  .page-hero,
  .tool-hero {
    padding: 1.4rem;
  }
}
