:root {
  color-scheme: light;
  font-family: "Avenir Next", "Arial", sans-serif;
  color: #182033;
  background: #f4f2ee;
  --ink: #182033;
  --muted: #4e5869;
  --line: #d8d7d3;
  --accent: #55329a;
  --cream: #fffdf8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.container { width: min(1110px, calc(100% - 52px)); margin: 0 auto; }
.masthead { border-bottom: 1px solid var(--line); }
.top { display: flex; min-height: 62px; align-items: center; justify-content: space-between; }
.top a, .foot a, .info a { color: #423477; text-underline-offset: 4px; }
.top .brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 750; }
.brand-icon { display: grid; grid-template-columns: repeat(2, 6px); gap: 2px; background: #352569; border-radius: 6px; padding: 7px; }
.brand-icon i { width: 6px; height: 6px; border-radius: 1px; background: #e9d9ff; }
.brand-icon i:last-child { background: #ffbd86; }
.intro { padding: 33px 0 24px; }
h1 { font-size: clamp(43px, 6vw, 78px); line-height: 1.05; letter-spacing: -.058em; margin: 0 0 9px; }
.intro p { margin: 0; color: var(--muted); max-width: 620px; line-height: 1.6; }
.workspace { display: grid; grid-template-columns: minmax(265px, .8fr) minmax(0, 1.65fr); gap: 18px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--cream); padding: 21px; min-width: 0; }
h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.source-actions, .export { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.source-actions { margin-top: 16px; }
button { border-radius: 8px; border: 1px solid #c7bdde; color: #392b66; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; }
button[disabled] { opacity: .52; cursor: default; }
button:not([disabled]):hover { filter: brightness(.94); }
.file, .secondary { background: #efebf8; }
.plain { background: transparent; border: 0; padding-inline: 3px; text-decoration: underline; text-underline-offset: 4px; }
.file-info { min-height: 19px; margin: 8px 0 14px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; padding: 0; border: 0; min-width: 0; margin: 0 0 10px; }
.fields label, .prefix { display: block; font-size: 12px; font-weight: 650; }
.fields input, .prefix input, .fallback { display: block; width: 100%; min-width: 0; border: 1px solid #c9c8ce; background: #fff; border-radius: 6px; padding: 8px 9px; margin-top: 5px; color: var(--ink); font: inherit; font-size: 14px; }
.check { display: flex; gap: 7px; align-items: center; font-size: 13px; margin-top: 13px; }
.check input { accent-color: var(--accent); }
:focus-visible { outline: 3px solid #794bc7; outline-offset: 2px; }
.preview { display: flex; flex-direction: column; }
.preview-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; align-items: center; margin-bottom: 14px; }
#dimensions { color: var(--muted); font-size: 13px; font-weight: 650; }
.stage { min-height: 320px; flex: 1; position: relative; display: grid; place-items: center; padding: 18px; border-radius: 10px; background: #202237; color: #f6eeff; overflow: hidden; }
.checker { display: flex; justify-content: center; max-width: 100%; background: conic-gradient(#d5c9e6 25%, #f4edf9 0 50%, #d5c9e6 0 75%, #f4edf9 0) 0 0 / 20px 20px; }
canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 400px; image-rendering: pixelated; }
.stage p { text-align: center; }
.export { margin-top: 16px; }
.primary { background: var(--accent); border-color: var(--accent); color: white; }
#status { font-size: 13px; color: var(--muted); margin: 0; flex: 1 0 100%; }
#status:empty { display: none; }
.error { margin: 12px 0 0; color: #a12837; font-size: 13px; }
.foot { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0 15px; font-size: 13px; padding: 7px 0 20px; color: var(--muted); }
.foot nav { display: flex; gap: 18px; }
.info { max-width: 750px; margin: 32px auto; line-height: 1.6; }
.info section { margin-block: 25px; }
@media (max-width: 710px) {
  .container { width: calc(100% - 28px); }
  .workspace { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .intro { padding-top: 22px; }
  .panel { padding: 16px; }
  .stage { min-height: 250px; }
  .stage canvas { max-height: 290px; }
}
