@import url('https://fonts.googleapis.com/css2?family=Kosugi+Maru&family=M+PLUS+Rounded+1c:wght@400;500;700;800;900&display=swap');

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d8dee9;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #e0f2f1;
  --primary-bg: #e0f2f1;
  --warning: #b45309;
  --danger: #b91c1c;
  --ok: #047857;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Kosugi Maru", "M PLUS Rounded 1c", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}

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

.site-header {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  letter-spacing: 0.02em;
}
.logo span { color: var(--primary); }
.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
}
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--primary); }

.hero {
  background: linear-gradient(135deg, #ecfeff 0%, #f7fee7 55%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 70px 20px 60px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
}
h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.15;
  margin: 18px 0 16px;
  letter-spacing: -0.04em;
}
.hero-subtitle {
  margin: -6px 0 14px;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 800;
  color: var(--primary-dark);
}
.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 760px;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}
.button:hover,
button.button:hover { background: var(--primary-dark); text-decoration: none; }
.button.secondary {
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}
.button.ghost {
  background: transparent;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}
.section-title {
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 16px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 20px; }
.card p { color: var(--muted); margin: 0 0 14px; }
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2ff;
  color: #3730a3;
}
.badge.ready { background: #dcfce7; color: #166534; }
.badge.later { background: #fef3c7; color: #92400e; }

.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  padding: 14px 16px;
  border-radius: 14px;
  margin: 18px 0;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.panel h2 { margin-top: 0; }

.upload-box {
  border: 2px dashed #9ca3af;
  background: #f9fafb;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: 0.2s ease;
}
.upload-box.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
input[type="file"] { max-width: 100%; }

.image-wrap {
  margin-top: 18px;
  position: relative;
  width: min(100%, 680px);
  max-height: 72vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #e5e7eb;
  display: none;
}
.preview-stage {
  position: relative;
  display: inline-block;
  line-height: 0;
}
#previewImage {
  max-width: 100%;
  height: auto;
  display: block;
}
.grid-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  pointer-events: auto;
}
.grid-cell {
  border: 1px solid rgba(255,255,255,0.72);
  background: rgba(15, 23, 42, 0.04);
  cursor: pointer;
}
.grid-cell:hover { background: rgba(20, 184, 166, 0.20); }
.grid-cell.selected {
  background: rgba(220, 38, 38, 0.38);
  border-color: rgba(127, 29, 29, 0.65);
}
.result-box {
  display: grid;
  gap: 10px;
}
.result-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.result-item strong { font-size: 18px; }
.status {
  padding: 14px;
  border-radius: 14px;
  font-weight: 800;
  background: #f3f4f6;
}
.status.ok { background: #dcfce7; color: var(--ok); }
.status.warn { background: #fee2e2; color: var(--danger); }
.status.neutral { background: #f3f4f6; color: var(--muted); }
.controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.small { color: var(--muted); font-size: 14px; }

.form-row { margin-bottom: 14px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type="text"], input[type="email"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 160px; resize: vertical; }

.content-page {
  max-width: 860px;
}
.content-page h1 { font-size: clamp(30px, 4vw, 44px); }
.content-page h2 { margin-top: 34px; }
.content-page p, .content-page li { color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 840px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .grid { grid-template-columns: 1fr; }
  .tool-layout { grid-template-columns: 1fr; }
  main { padding-top: 28px; }
}

.memo {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #d7dde8;
  border-radius: 12px;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
  background: #fff;
}


.tab-buttons { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0; }
.tab-button { border:1px solid var(--line); background:#fff; color:var(--text); border-radius:999px; padding:10px 14px; font-weight:800; cursor:pointer; }
.tab-button.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.tab-panel { display:none; }
.tab-panel.active { display:block; }
.preview-note { color:var(--muted); font-size:13px; margin-top:8px; }
.range-row { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; }
.inline-size { color:var(--muted); font-size:13px; margin-top:6px; }
