:root {
  --ink: #1f1430;
  --ink-soft: #756786;
  --plum: #35135e;
  --plum-deep: #25103f;
  --violet: #68439a;
  --lavender: #e8def4;
  --lavender-soft: #f6f2fa;
  --gold: #f0b743;
  --gold-soft: #ffdb78;
  --line: rgba(53, 19, 94, 0.12);
  --white: #fffdfb;
  --shadow: 0 26px 70px rgba(42, 17, 70, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #f5f1f8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: radial-gradient(rgba(53, 19, 94, .16) .7px, transparent .7px);
  background-size: 8px 8px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}
.app-shell { position: relative; z-index: 1; max-width: 1480px; margin: 0 auto; padding: 0 40px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: #fff;
  border-radius: 14px 14px 14px 4px;
  background: var(--plum);
  box-shadow: 5px 5px 0 var(--gold);
  transform: rotate(-5deg);
}
.brand-mark span { font-size: 25px; line-height: 1; font-weight: 300; transform: rotate(5deg); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 12px; letter-spacing: .17em; }
.brand-copy small { color: var(--ink-soft); font-size: 10px; letter-spacing: .07em; }
.event-tag { color: var(--plum); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.live-dot, .status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(240, 183, 67, .15); }
.workspace { padding: 76px 0 46px; }
.intro-block { max-width: 720px; margin-bottom: 55px; }
.eyebrow, .section-kicker { color: var(--violet); font-size: 11px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow-line { width: 34px; height: 1px; background: var(--gold); }
h1, h2, p { margin: 0; }
h1 { margin-top: 17px; color: var(--plum-deep); font-size: clamp(52px, 7.3vw, 98px); line-height: .9; letter-spacing: -.065em; font-weight: 800; }
h1 em { color: var(--violet); font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.08em; }
.intro-copy { max-width: 445px; margin-top: 22px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(400px, .7fr); align-items: start; gap: clamp(32px, 6vw, 100px); }
.preview-column { min-width: 0; }
.preview-heading, .card-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.preview-heading h2, .card-heading h2 { margin-top: 7px; font-size: clamp(23px, 2.6vw, 31px); letter-spacing: -.045em; }
.preview-status { color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
.canvas-card { margin-top: 22px; padding: 18px; border: 1px solid rgba(53, 19, 94, .1); border-radius: 22px; background: rgba(255, 253, 251, .76); box-shadow: var(--shadow); }
.canvas-stage { position: relative; width: min(100%, 620px); margin: 0 auto; overflow: hidden; border-radius: 13px; background: #e8def4; box-shadow: 0 17px 32px rgba(49, 13, 81, .2); }
#flyerCanvas { display: block; width: 100%; height: auto; touch-action: none; }
.stage-hint { position: absolute; left: 50%; bottom: 18px; display: flex; align-items: center; gap: 8px; padding: 9px 13px; color: white; font-size: 10px; letter-spacing: .05em; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(46, 18, 80, .78); transform: translateX(-50%); transition: opacity .25s ease; pointer-events: none; }
.stage-hint.is-hidden { opacity: 0; }
.drag-icon { color: var(--gold-soft); font-size: 15px; }
.canvas-meta { display: flex; justify-content: space-between; gap: 14px; padding: 13px 2px 0; color: var(--ink-soft); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.meta-icon { color: var(--violet); font-size: 15px; vertical-align: -1px; }
.controls-column { min-width: 0; }
.controls-card { padding: clamp(22px, 3vw, 33px); border: 1px solid rgba(53, 19, 94, .1); border-radius: 22px; background: rgba(255, 253, 251, .88); box-shadow: var(--shadow); }
.step-count { color: var(--plum); font-size: 12px; font-weight: 800; }
.step-count span { color: var(--ink-soft); font-weight: 500; }
.control-section { padding: 27px 0; border-bottom: 1px solid var(--line); }
.control-section:first-of-type { margin-top: 2px; }
.control-label-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.control-label { color: var(--plum); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.control-note { color: #9a8ca7; font-size: 10px; }
.upload-zone { display: flex; min-height: 93px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed rgba(104, 67, 154, .5); border-radius: 15px; background: var(--lavender-soft); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.upload-zone:hover, .upload-zone.is-dragover { border-color: var(--violet); background: #ede4f6; transform: translateY(-1px); }
.upload-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.upload-icon { display: grid; place-items: center; width: 25px; height: 25px; margin-bottom: 5px; color: white; border-radius: 9px; background: var(--violet); font-size: 18px; line-height: 1; }
.upload-title { color: var(--plum); font-size: 13px; font-weight: 800; }
.upload-caption { margin-top: 3px; color: var(--ink-soft); font-size: 10px; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 51px; padding: 0 42px 0 16px; color: var(--plum); border: 1px solid rgba(53, 19, 94, .16); border-radius: 12px; outline: none; background: #fff; font-size: 15px; transition: border .2s ease, box-shadow .2s ease; }
.input-wrap input { font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; font-weight: 700; }
.input-wrap input::placeholder { color: #aa9db5; }
.input-wrap input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(104, 67, 154, .11); }
.input-suffix { position: absolute; top: 50%; right: 15px; color: var(--violet); font-family: Georgia, serif; font-size: 19px; transform: translateY(-50%); }
.adjustments-section { padding-bottom: 23px; }
.text-button { padding: 0; color: var(--violet); border: 0; background: none; font-size: 11px; font-weight: 700; }
.range-row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin: 17px 0; }
.range-copy { color: var(--ink); font-size: 12px; }
.range-icon { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 7px; color: var(--violet); border-radius: 7px; background: var(--lavender); font-size: 14px; }
.range-value { color: var(--plum); font-size: 11px; font-weight: 800; }
.range-row input[type=range] { grid-column: 1 / -1; width: 100%; height: 4px; margin-top: -3px; accent-color: var(--violet); cursor: pointer; }
.drag-note { display: flex; align-items: center; gap: 7px; margin-top: 22px; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.drag-note-icon { color: var(--gold); font-size: 15px; }
.action-section { padding-top: 26px; }
.primary-button, .secondary-button { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; border-radius: 12px; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-button { min-height: 55px; padding: 0 18px 0 21px; color: white; background: var(--plum); box-shadow: 0 12px 20px rgba(53, 19, 94, .21); font-size: 13px; }
.primary-button:hover { background: var(--plum-deep); box-shadow: 0 15px 25px rgba(53, 19, 94, .27); transform: translateY(-2px); }
.button-arrow { display: grid; place-items: center; width: 27px; height: 27px; color: var(--plum); border-radius: 8px; background: var(--gold); font-size: 17px; }
.secondary-button { justify-content: center; gap: 9px; min-height: 48px; margin-top: 10px; color: var(--plum); border: 1px solid rgba(53, 19, 94, .17); background: transparent; font-size: 12px; }
.secondary-button:hover { border-color: var(--violet); background: var(--lavender-soft); }
.share-icon { font-size: 21px; line-height: 1; transform: rotate(-25deg); }
.link-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 43px; margin-top: 8px; padding: 0 14px; color: var(--violet); border: 0; border-radius: 10px; background: var(--lavender-soft); font-size: 11px; font-weight: 800; transition: background .2s ease, color .2s ease; }
.link-button:hover { color: var(--plum); background: var(--lavender); }
.link-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; color: white; border-radius: 6px; background: var(--violet); font-size: 15px; }
.share-link-panel[hidden] { display: none; }
.share-link-panel { margin-top: 10px; padding: 12px; border: 1px solid rgba(104, 67, 154, .18); border-radius: 11px; background: var(--lavender-soft); }
.share-link-panel label { display: block; margin-bottom: 7px; color: var(--plum); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.share-link-row { display: flex; gap: 6px; }
.share-link-row input { min-width: 0; flex: 1; height: 36px; padding: 0 9px; color: var(--ink-soft); border: 1px solid rgba(53, 19, 94, .12); border-radius: 7px; outline: none; background: white; font-size: 9px; }
.share-link-row button { flex: 0 0 auto; padding: 0 10px; color: white; border: 0; border-radius: 7px; background: var(--violet); font-size: 10px; font-weight: 800; }
.share-link-panel > a { display: inline-block; margin-top: 8px; color: var(--violet); font-size: 10px; font-weight: 800; text-decoration: none; }
.share-link-panel > a:hover { text-decoration: underline; }
.privacy-note { margin-top: 17px; color: #a294ae; text-align: center; font-size: 10px; }
.privacy-note span { color: var(--gold); margin-right: 4px; }
.event-note { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.5); font-size: 11px; line-height: 1.55; }
.event-note strong { color: var(--plum); font-size: 12px; }
.event-note-mark { color: var(--gold); font-family: Georgia, serif; font-size: 30px; font-weight: 700; line-height: 1; }
.footer { display: flex; justify-content: space-between; gap: 15px; padding: 25px 0 30px; color: #998ca5; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 44px)); padding: 13px 17px; color: white; border-radius: 12px; background: var(--plum-deep); box-shadow: 0 14px 30px rgba(37, 16, 63, .3); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .22s ease, transform .22s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 960px) {
  .app-shell { padding: 0 24px; }
  .workspace { padding-top: 54px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr) minmax(330px, .72fr); gap: 28px; }
}
@media (max-width: 760px) {
  .app-shell { padding: 0 16px; }
  .topbar { position: sticky; top: 0; z-index: 4; margin: 0 -16px; padding: 14px 16px 12px; background: rgba(245, 241, 248, .94); backdrop-filter: blur(14px); }
  .event-tag { display: none; }
  .workspace { padding-top: 29px; }
  .intro-block { margin-bottom: 36px; }
  h1 { font-size: clamp(53px, 16vw, 80px); }
  .intro-copy { font-size: 14px; }
  .editor-layout { display: flex; flex-direction: column; gap: 27px; }
  .preview-column, .controls-column { width: 100%; }
  .preview-heading h2, .card-heading h2 { font-size: 25px; }
  .canvas-card { padding: 10px; border-radius: 17px; }
  .canvas-meta { padding: 11px 3px 2px; font-size: 9px; }
  .controls-card { padding: 18px; border-radius: 17px; }
  .control-section { padding: 22px 0; }
  .upload-zone { min-height: 104px; }
  .range-row { margin: 18px 0; }
  .range-row input[type=range] { height: 7px; }
  .range-row input[type=range]::-webkit-slider-thumb { width: 21px; height: 21px; }
  .range-row input[type=range]::-moz-range-thumb { width: 21px; height: 21px; }
  .action-section { margin: 0 -18px -18px; padding: 14px 18px 16px; border-top: 1px solid var(--line); border-radius: 0 0 17px 17px; background: rgba(255, 253, 251, .92); backdrop-filter: blur(16px); }
  .primary-button, .secondary-button { min-height: 54px; }
  .footer { flex-direction: column; line-height: 1.7; }
}
@media (max-width: 380px) {
  .brand-copy small { display: none; }
  .canvas-meta { flex-direction: column; gap: 3px; }
  .control-note { display: none; }
}
