@font-face {
  font-family: "Vegova Party LET";
  src: url("PartyLET-plain.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #201d25;
  background: #f5f4f7;
  --ink: #201d25;
  --muted: #585262;
  --line: #dedbe4;
  --accent: #6b3db5;
}
* { box-sizing: border-box; }
body { margin: 0; }
.frame { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.masthead { color: #fff; background: var(--ink); }
.masthead .frame {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-block: 19px;
  font-size: 1.24rem;
  font-weight: 750;
}
.masthead-detail { color: #ded5ee; font-size: 0.9rem; font-weight: 500; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: start;
  padding-block: 34px 48px;
}
.editor, .preview {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.section-heading {
  display: flex;
  gap: 10px 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
h1, h2 { margin: 0; line-height: 1.1; letter-spacing: -0.035em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.45rem; }
label, legend, summary { font-size: 0.94rem; font-weight: 650; }
input, textarea, select, button { font: inherit; }
textarea, input[type="text"], select {
  color: var(--ink);
  background-color: #faf9fc;
  padding: 9px 11px;
  min-height: 42px;
  border: 1px solid #cfcad8;
  border-radius: 9px;
}
textarea, input[type="text"], .subject-control select { width: 100%; }
textarea { display: block; min-height: 122px; resize: vertical; margin-block: 6px 15px; }
select {
  appearance: none;
  padding-right: 29px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23585262' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
}
#example { font-size: 0.88rem; max-width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1.18fr; gap: 12px; }
.field-row > div { min-width: 0; }
.field-row label { display: block; margin-bottom: 6px; }
.subject-control { position: relative; }
.subject-control select { padding-left: 32px; }
#swatch {
  position: absolute;
  width: 14px;
  height: 14px;
  inset: 14px auto auto 11px;
  border: 1px solid #201d2544;
  border-radius: 50%;
  pointer-events: none;
}
fieldset { min-width: 0; margin: 23px 0 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; padding: 0; font-size: 1.08rem; }
.checkbox { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; cursor: pointer; }
input[type="checkbox"] { margin: 0; width: 17px; height: 17px; accent-color: var(--accent); }
.slider { display: grid; grid-template-columns: 1fr auto; margin-block: 10px; gap: 4px; }
.slider output { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.slider input { grid-column: 1 / -1; width: 100%; margin: 0; min-height: 24px; accent-color: var(--accent); }
.slider input:disabled { opacity: 0.5; }
details { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 18px; }
summary { width: fit-content; cursor: pointer; }
details label { display: block; margin-block: 12px 5px; }
details input { max-width: 100%; }
details p, .status, .notice { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.status { margin: 12px 0 0; }
.notice { padding: 9px 12px; background: #fff3da; color: #5b3e00; border-radius: 8px; }
.dimensions { color: var(--muted); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.canvas-frame { background: #e9afaf; overflow: hidden; aspect-ratio: 1; border-radius: 10px; }
canvas { display: block; width: 100%; height: auto; }
.exports { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 17px; }
button {
  padding: 10px 12px;
  min-height: 44px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfcad8;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
}
#png { color: #fff; background: var(--ink); border-color: var(--ink); }
button:hover:not(:disabled) { background: #f2ecfb; }
#png:hover:not(:disabled) { background: #463555; }
button:disabled { opacity: 0.5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr 1fr; gap: 16px; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .frame { width: calc(100% - 28px); }
  .workspace { grid-template-columns: 1fr; padding-block: 17px 30px; }
  .field-row { grid-template-columns: 1fr 1.18fr; }
}
@media (max-width: 390px) { .field-row { grid-template-columns: 1fr; } }
