:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #0f172a;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --danger: #dc2626;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 4px 10px;
  border-radius: 999px;
}
.pass-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.hero {
  padding: 24px 0 16px 0;
}
.hero h1 {
  margin: 0 0 8px 0;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.hero-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 78ch;
}
.hero-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.hero-proof span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
}

.pass-banner {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pass-banner.is-warn {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.studio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  padding: 20px;
}
.studio-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 1fr; }
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  background: var(--bg);
  padding: 18px 14px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone.is-dragover {
  border-color: var(--accent);
  background: #f0fdfa;
}
.dropzone p { margin: 0 0 10px 0; font-size: 13.5px; color: var(--muted); }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.btn-row-left { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

button, .btn-link {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover:not(:disabled) { background: #1e293b; }
.btn-accent { background: var(--accent); color: #ffffff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: #cbd5e1; }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink); }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover:not(:disabled) { background: #fee2e2; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }

.box-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.box-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.detect-summary {
  font-size: 13px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.detect-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  margin-right: 4px;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.stage-wrap {
  position: relative;
  background: #1e293b;
  border-radius: var(--radius);
  padding: 16px;
  min-height: 460px;
  max-height: 680px;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.canvas-shell {
  position: relative;
  display: inline-block;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  background: #ffffff;
  user-select: none;
  touch-action: none;
}
.canvas-shell canvas {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: crosshair;
}

.status-line {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--ink);
}
.status-line.is-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-line.is-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 90;
}
.modal-card {
  background: var(--surface);
  border-radius: 16px;
  max-width: 460px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}
.modal-card h2 { margin: 0 0 8px 0; font-size: 22px; }
.modal-price { font-size: 32px; font-weight: 800; margin: 12px 0; }
.modal-price span { font-size: 14px; font-weight: 500; color: var(--muted); }
.modal-list { padding-left: 18px; margin: 0 0 18px 0; font-size: 14px; color: var(--muted); }
.modal-list li { margin-bottom: 6px; }

.content-section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.content-section h2 { font-size: 24px; margin: 0 0 12px 0; }
.content-section h3 { font-size: 17px; margin: 20px 0 8px 0; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 768px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.faq-item h3 { margin: 0 0 6px 0; font-size: 15.5px; }
.faq-item p { margin: 0; font-size: 14px; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
