:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8eaf0;
  background: #10131b;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --surface: #181c26;
  --surface-raised: #1d2330;
  --border: #2e3544;
  --muted: #9aa4b6;
  --subtle: #748096;
  --accent: #b7c8ff;
  --accent-strong: #d3ddff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, .dropzone:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.shell { max-width: 1380px; margin: auto; padding: 0 36px; }
.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -.5px;
  text-decoration: none;
}
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.65px;
}
.mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #d5deff;
  border-radius: 12px;
  background: var(--accent);
  color: #141824;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.5px;
}
.source {
  color: #c4cbda;
  font-size: 13px;
  text-decoration: none;
  transition: color .18s ease;
}
.source:hover, footer a:hover { color: var(--accent-strong); }
.hero { padding: 49px 0 40px; }
.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.8px;
}
.hero h1 {
  margin: 13px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -2.7px;
  line-height: 1.08;
}
.hero p {
  max-width: 620px;
  margin: 0;
  color: #adb6c6;
  font-size: 15px;
  line-height: 1.7;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 40px rgb(0 0 0 / 10%);
}
.controls { padding: 25px; }
.controls h2, .preview-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 730;
  letter-spacing: -.2px;
}
.step { margin-right: 9px; color: var(--accent); font-size: 10px; }
.dropzone {
  position: relative;
  display: flex;
  min-height: 170px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
  border: 1px dashed #566176;
  border-radius: 12px;
  background: var(--surface-raised);
  cursor: pointer;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.dropzone:hover, .dropzone.dragover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: #252c3b;
}
.upload-icon { color: var(--accent); font-size: 25px; line-height: 1; }
.dropzone strong { font-size: 13px; }
.dropzone span:not(.upload-icon) { color: #b0b9ca; font-size: 12px; }
.dropzone small {
  padding: 0 14px;
  color: var(--subtle);
  font-size: 10px;
  line-height: 1.5;
}
#file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.filename {
  overflow: hidden;
  margin: 11px 0 27px;
  color: #aeb8c9;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.text-button {
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
}
.text-button:hover { color: var(--accent-strong); }
.control { margin-bottom: 22px; }
.control label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  font-weight: 630;
}
.control output { color: var(--accent); font-weight: 720; }
.control input[type="range"] {
  width: 100%;
  margin: 13px 0 4px;
  accent-color: var(--accent);
  cursor: pointer;
}
.control small {
  display: block;
  color: var(--subtle);
  font-size: 10px;
  line-height: 1.55;
}
.primary {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #dce4ff;
  border-radius: 9px;
  background: var(--accent);
  color: #151925;
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
}
.primary:hover:not(:disabled) { transform: translateY(-1px); background: var(--accent-strong); }
.primary:disabled { opacity: .48; cursor: not-allowed; }
.status {
  min-height: 19px;
  margin: 12px 0 0;
  color: #aab4c5;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
}
.preview-header p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.pill {
  padding: 6px 9px;
  border: 1px solid #435274;
  border-radius: 6px;
  background: #222b3c;
  color: #c6d3ff;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 1px;
}
.canvas-wrap {
  position: relative;
  display: flex;
  height: min(52vw, 520px);
  min-height: 300px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 22px;
  border: 1px solid #d8dce2;
  border-radius: 9px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e6e9ed 25%, transparent 25%),
    linear-gradient(-45deg, #e6e9ed 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e9ed 75%),
    linear-gradient(-45deg, transparent 75%, #e6e9ed 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}
.canvas-wrap canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #58667b;
  text-align: center;
}
.placeholder > span { opacity: .35; font-size: 54px; }
.placeholder strong { font-size: 14px; }
.placeholder small { font-size: 11px; }
[hidden] { display: none !important; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
  border-top: 1px solid var(--border);
}
.stats > div { min-width: 0; padding: 19px 18px; border-right: 1px solid var(--border); }
.stats > div:last-child { border: 0; }
.stats small {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
}
.stats strong { font-size: 16px; overflow-wrap: anywhere; }
.notice {
  margin: 0 18px 18px;
  padding: 11px 12px;
  border: 1px solid #30394a;
  border-radius: 8px;
  background: #1d2330;
  color: #a2adbf;
  font-size: 10px;
  line-height: 1.6;
}
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 20px;
  padding: 30px 0 36px;
  color: var(--subtle);
  font-size: 10px;
  text-align: center;
}
footer a { color: #b5c0d2; text-decoration: none; transition: color .18s ease; }
@media (max-width: 850px) {
  .workspace { grid-template-columns: 1fr; }
  .canvas-wrap { height: min(75vw, 480px); }
}
@media (max-width: 520px) {
  .shell { padding: 0 15px; }
  .topbar { min-height: 72px; }
  .brand { gap: 9px; font-size: 17px; }
  .mark { width: 36px; height: 36px; }
  .source { font-size: 11px; }
  .hero { padding: 35px 0 29px; }
  .hero h1 { letter-spacing: -1.8px; }
  .hero p { font-size: 14px; }
  .controls { padding: 19px; }
  .canvas-wrap { min-height: 260px; margin: 0 12px; }
  .preview-header { padding: 19px 14px; }
  .stats > div { padding: 15px 9px; }
  .stats strong { font-size: 13px; }
  .stats small { font-size: 8px; }
  .notice { margin: 0 12px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
