:root {
  --font: 'Manrope', 'Segoe UI', sans-serif;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe4ef;
  --surface: #ffffff;
  --accent: #0f766e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #f8fbfa, #ecf2f8);
}
.ie-page {
  max-width: 1260px;
  margin: 0 auto;
  padding: 18px;
}
.ie-header h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  letter-spacing: -0.02em;
}
.ie-header p {
  margin: 6px 0 12px;
  color: var(--muted);
}
.ie-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}
.ie-controls {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  max-height: calc(100vh - 88px);
  overflow: auto;
}
.ie-upload,
.ie-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.ie-upload {
  display: inline-block;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}
.ie-hidden { display: none; }
.ie-group {
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}
.ie-group h2 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}
.ie-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  color: #334155;
}
.ie-inline-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}
.ie-inline-toggle input {
  margin: 0;
}
.ie-group input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font: inherit;
  margin-bottom: 8px;
}
.ie-group input[type="range"] {
  width: 100%;
}
.ie-group input[type="color"] {
  margin-left: 8px;
  vertical-align: middle;
}
.ie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ie-btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.ie-bottom {
  margin-top: 6px;
}
.ie-stage-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}
.ie-stage {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e6edf5;
  background:
    linear-gradient(45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f8fafc 75%),
    linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.ie-stage .canvas-container {
  width: 100% !important;
}
.ie-hint {
  margin: 8px 2px 0;
  color: #64748b;
  font-size: 0.82rem;
}
@media (max-width: 980px) {
  .ie-layout { grid-template-columns: 1fr; }
  .ie-controls { max-height: none; }
}
