:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --emerald: #059669;
  --amber: #d97706;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Yu Gothic UI", "Segoe UI", Meiryo, system-ui, -apple-system, sans-serif;
  background: radial-gradient(ellipse 80% 45% at 15% 0%, rgba(37,99,235,.07), transparent 60%),
              radial-gradient(ellipse 70% 40% at 88% 5%, rgba(16,185,129,.07), transparent 60%),
              var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.sb-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.sb-nav-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sb-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.sb-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(37,99,235,.2);
}
.sb-brand-badge {
  font-size: 11px;
  font-weight: 800;
  background: #eff6ff;
  color: var(--blue);
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 999px;
}
.sb-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sb-nav-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--body);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}
.sb-nav-link:hover { background: #f1f5f9; color: var(--blue); }
.sb-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 20px 72px;
}
.sb-hero { margin-bottom: 20px; }
.sb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #047857;
  font-size: 12.5px;
  font-weight: 800;
  padding: 4px 13px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.sb-hero h1 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: -.01em;
}
.sb-hero p {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  max-width: 880px;
}
.sb-work {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 32px -10px rgba(15,23,42,.07);
  margin-bottom: 24px;
}
.sb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.sb-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--body);
  flex-wrap: wrap;
}
.sb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: all .14s ease;
}
.sb-btn:hover { border-color: var(--blue); color: var(--blue); }
.sb-btn.active {
  background: #eff6ff;
  border-color: var(--blue);
  color: var(--blue-d);
}
.sb-btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-color: #1e40af;
  box-shadow: 0 6px 18px -4px rgba(37,99,235,.4);
}
.sb-btn-primary:hover { color: #ffffff; transform: translateY(-1px); }
.sb-btn-emerald {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  border-color: #065f46;
  box-shadow: 0 6px 18px -4px rgba(5,150,105,.38);
}
.sb-btn-emerald:hover { color: #ffffff; transform: translateY(-1px); }
.sb-dropzone {
  position: relative;
  border: 2px dashed #94a3b8;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  background: #f8fafc;
  transition: border-color .15s, background .15s;
}
.sb-dropzone.dragover {
  border-color: var(--blue);
  background: #eff6ff;
}
.sb-canvas-stage {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  overflow: auto;
  max-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 280px;
}
.sb-bg-checker {
  background-color: #ffffff;
  background-image: linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
                    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
                    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.sb-bg-line-light { background: #7494c0; }
.sb-bg-line-dark { background: #1a202c; }
.sb-bg-white { background: #ffffff; }
.sb-canvas-stage canvas {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(15,23,42,.12);
}
.sb-status-bar {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
/* House Ad + AdSense Ready Container */
.sb-promo-wrap {
  margin: 26px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.sb-house-ad {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
  border: 1.5px solid #93c5fd;
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.sb-house-ad-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.sb-house-ad h3 {
  margin: 0 0 6px;
  font-size: 17.5px;
  line-height: 1.35;
  color: #0f172a;
}
.sb-house-ad p {
  margin: 0;
  font-size: 13.5px;
  color: #334155;
  max-width: 680px;
}
.sb-ad-slot {
  min-height: 96px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.sb-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.sb-tool-card {
  display: block;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15,23,42,.04);
  transition: transform .14s, border-color .14s;
}
.sb-tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
}
.sb-tool-card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.sb-tool-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  line-height: 1.4;
}
.sb-tool-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.sb-guide {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 32px;
  margin-top: 28px;
}
.sb-guide h2 {
  font-size: 20px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eff6ff;
}
.sb-guide h3 {
  font-size: 16.5px;
  margin: 22px 0 8px;
  color: #1e3a8a;
}
.sb-guide p, .sb-guide li {
  font-size: 14.5px;
  color: var(--body);
}
.sb-faq-item {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.sb-faq-q {
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.sb-footer {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.sb-footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
.sb-footer a:hover { color: var(--blue); }
.sb-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999;
  background: #0f172a;
  color: #ffffff;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(15,23,42,.28);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.sb-toast.show { opacity: 1; transform: translateY(0); }
.sb-slice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.sb-slice-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.sb-slice-card img {
  max-width: 100%;
  max-height: 120px;
  border-radius: 6px;
}
@media (max-width: 640px) {
  .sb-work, .sb-guide { padding: 16px; }
  .sb-house-ad { padding: 16px; }
}
