:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --card: rgba(255,255,255,0.92);
  --card-border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, #f8fbff, var(--bg));
}
.app-shell { max-width: 1440px; margin: 0 auto; padding: 28px 18px 48px; }
.hero { margin-bottom: 22px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; }
.hero h1 { margin: 0; font-size: clamp(34px, 6vw, 54px); line-height: 1.05; }
.sub { margin: 12px 0 0; color: var(--muted); max-width: 760px; line-height: 1.65; font-size: 16px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr); gap: 18px; align-items: start; }
.left-col, .right-col { display: grid; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 24px; box-shadow: var(--shadow); padding: 18px; }
.section-title-row, .preview-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.section-title-row h2, .preview-head h2, .card h2 { margin: 0; font-size: 20px; }
.badge, .status-pill { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge { color: var(--accent); background: var(--accent-soft); }
.status-pill { color: #0f172a; background: #e2e8f0; }
.dropzone { border: 2px dashed #bfdbfe; background: #f8fbff; border-radius: 20px; padding: 26px; text-align: center; transition: .18s ease; }
.dropzone.drag { border-color: var(--accent); background: #eff6ff; transform: translateY(-1px); }
.dropzone input[type="file"] { margin-top: 14px; width: 100%; }
.muted { color: var(--muted); }
.field-grid { display: grid; gap: 14px; margin-top: 16px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 8px; color: #334155; font-size: 14px; }
input, select, button { font: inherit; }
input[type="number"], select, input[type="file"] { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid #d7dfeb; background: #fff; color: var(--text); }
input[type="range"] { width: 100%; }
.inline-value { color: var(--muted); font-size: 12px; font-weight: 700; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
button { border: 0; cursor: pointer; border-radius: 14px; padding: 12px 16px; font-weight: 700; }
.primary-btn { color: #fff; background: linear-gradient(135deg, #2563eb, #4f46e5); }
.secondary-btn { color: var(--text); background: #e9eef7; }
.preview-grid { display: grid; gap: 16px; }
.preview-label { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
canvas { width: 100%; display: block; border-radius: 18px; background: #eef2f7; border: 1px solid #dbe3ee; }
#photoCanvas { cursor: grab; }
#photoCanvas.dragging { cursor: grabbing; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: #f8fbff; border: 1px solid #dde7f2; border-radius: 18px; padding: 14px; }
.stat span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.status-box { margin-top: 14px; white-space: pre-wrap; background: #f8fbff; border: 1px solid #dde7f2; border-radius: 18px; padding: 14px; color: #334155; min-height: 78px; line-height: 1.6; }
ul { margin: 12px 0 0; padding-left: 20px; color: #334155; line-height: 1.7; }
@media (max-width: 1120px) {
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .field-grid.two, .field-grid.three, .stats-grid { grid-template-columns: 1fr; }
  .app-shell { padding: 18px 12px 36px; }
  .card { padding: 16px; border-radius: 20px; }
}
