:root {
  color-scheme: dark;
  --ink: #f7edda;
  --muted: #b7a58e;
  --gold: #e3b957;
  --gold-light: #ffe6a1;
  --panel: #21170f;
  --panel-soft: #2d2015;
  --line: rgba(232, 190, 96, .2);
  --serif: Georgia, "Times New Roman", serif;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #17100a;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(149, 93, 30, .2), transparent 34rem),
    radial-gradient(ellipse at 100% 50%, rgba(108, 66, 27, .13), transparent 35rem),
    #17100a;
}
button, input { font: inherit; }
button { color: inherit; }
.page-shell { width: min(1200px, calc(100% - 64px)); margin: 0 auto; padding: 24px 0 18px; }
.topbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(242, 215, 162, .12); padding: 0 0 19px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 33px; height: 33px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(45deg); }
.brand-mark i { display: block; border: 1px solid var(--gold); border-radius: 5px 1px 5px 1px; background: linear-gradient(135deg, rgba(255,221,139,.75), rgba(167,107,31,.1)); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { opacity: .48; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 15px; letter-spacing: .11em; font-weight: 750; }
.brand-copy strong span { color: var(--gold); }
.brand-copy small { font-size: 8px; letter-spacing: .19em; color: #9f8d77; }
.edition-tag { display: flex; align-items: center; gap: 8px; color: #c8b69c; font-size: 10px; letter-spacing: .13em; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #d6ad54; box-shadow: 0 0 12px rgba(238, 190, 77, .7); }
.intro { padding: 29px 0 23px; text-align: center; }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .28em; }
h1 { margin: 0; font: 500 clamp(29px, 4vw, 45px)/1.1 var(--serif); letter-spacing: -.04em; }
h1 em, .control-card h2 em { color: var(--gold-light); font-weight: 500; }
.intro-copy { margin: 10px auto 0; max-width: 540px; color: #baa991; font-size: 12px; line-height: 1.6; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: stretch; gap: 22px; max-width: 1000px; margin: 0 auto; }
.preview-column { min-width: 0; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.preview-label { color: #d7c5aa; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.sparkle { color: var(--gold); margin-right: 6px; font-size: 12px; }
.square-chip { color: #aa9579; border: 1px solid rgba(233, 192, 107, .24); padding: 5px 8px; border-radius: 99px; font-size: 8px; letter-spacing: .12em; }
.artwork-frame { width: 100%; position: relative; overflow: hidden; aspect-ratio: 1; border: 1px solid rgba(239, 199, 112, .38); border-radius: 8px; background: #25180d; box-shadow: 0 18px 55px rgba(0,0,0,.38), 0 0 0 5px rgba(219, 165, 71, .035); touch-action: none; }
#previewCanvas { display: block; width: 100%; height: 100%; }
.preview-foot { padding: 9px 3px 0; display: flex; align-items: center; gap: 10px; color: #9b8972; font-size: 9px; letter-spacing: .04em; }
.gold-rule { height: 1px; width: 36px; background: linear-gradient(90deg, var(--gold), transparent); }
.control-card { padding: 22px 22px 17px; align-self: stretch; background: linear-gradient(160deg, rgba(53, 37, 23, .97), rgba(30, 21, 14, .98)); border: 1px solid rgba(232, 190, 96, .23); border-radius: 10px; box-shadow: 0 20px 45px rgba(0,0,0,.23); }
.card-kicker { color: #d1b169; font-size: 8px; font-weight: 700; letter-spacing: .2em; }
.card-kicker span { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border: 1px solid rgba(220, 179, 93, .45); border-radius: 50%; color: #efcf7d; letter-spacing: 0; }
.control-card h2 { margin: 15px 0 8px; font: 500 27px/1.05 var(--serif); letter-spacing: -.035em; }
.control-copy { color: #b5a28b; font-size: 11px; line-height: 1.55; margin: 0 0 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.choose-button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px 11px; cursor: pointer; text-align: left; color: var(--ink); border: 1px solid rgba(236, 193, 99, .55); border-radius: 6px; background: linear-gradient(135deg, rgba(218, 174, 82, .14), rgba(158, 109, 45, .07)); transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.choose-button:hover { background: rgba(223, 183, 98, .19); border-color: #f1ce7d; transform: translateY(-1px); }
.choose-button:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.upload-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(230, 193, 109, .26); background: rgba(230, 193, 109, .1); border-radius: 5px; color: var(--gold-light); flex: 0 0 auto; }
.upload-icon svg { width: 18px; height: 18px; }
.choose-button strong, .choose-button small { display: block; }
.choose-button strong { font-size: 11px; font-weight: 650; }
.choose-button small { color: #ac9b84; font-size: 8px; margin-top: 4px; }
.button-chevron { margin-left: auto; color: var(--gold); font-size: 15px; }
.adjust-block { margin-top: 18px; }
.adjust-heading { display: flex; align-items: center; justify-content: space-between; color: #d9c9b2; font-size: 10px; }
.adjust-heading output { color: var(--gold-light); font-variant-numeric: tabular-nums; }
input[type="range"] { display: block; width: 100%; height: 3px; margin: 14px 0 8px; appearance: none; background: linear-gradient(90deg, #d7ac55, #8f642e); border-radius: 99px; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border: 2px solid #271b11; border-radius: 50%; background: #f4d284; box-shadow: 0 0 0 1px #ddae51, 0 1px 8px rgba(242, 194, 90, .4); }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid #271b11; border-radius: 50%; background: #f4d284; box-shadow: 0 0 0 1px #ddae51; }
.range-labels { display: flex; justify-content: space-between; color: #887761; font-size: 8px; }
.drag-note { display: flex; align-items: flex-start; gap: 7px; margin: 13px 0 0; color: #a99579; font-size: 9px; line-height: 1.45; }
.drag-note span { color: var(--gold); font-size: 15px; line-height: 1; }
.reset-button { border: 0; background: none; color: #ccb274; padding: 0; margin-top: 12px; font-size: 9px; cursor: pointer; }
.reset-button:hover:not(:disabled) { color: var(--gold-light); }
.reset-button:disabled { color: #756655; cursor: default; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 188, 97, .28), transparent); margin: 17px 0 13px; }
.ticket-note { display: flex; gap: 9px; align-items: center; margin-bottom: 14px; }
.ticket-icon { flex: 0 0 auto; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(226, 183, 89, .38); border-radius: 50%; color: var(--gold); font-size: 11px; }
.ticket-note p { margin: 0; line-height: 1.4; }
.ticket-note strong, .ticket-note span { display: block; }
.ticket-note strong { color: #f4dfb1; font-size: 10px; font-weight: 650; }
.ticket-note p span { color: #a9957c; font-size: 9px; }
.download-button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 14px; border: 0; border-radius: 5px; background: linear-gradient(105deg, #e8c36c, #c79239); color: #261a0e; font-size: 10px; font-weight: 750; box-shadow: 0 6px 18px rgba(198, 144, 51, .16); cursor: pointer; transition: transform .18s ease, filter .18s ease, opacity .18s ease; }
.download-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.download-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.download-icon { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid rgba(59, 41, 20, .35); border-radius: 50%; font-size: 15px; }
.download-note { margin: 8px 0 0; text-align: center; color: #98856c; font-size: 8px; line-height: 1.45; }
.page-footer { max-width: 1000px; margin: 16px auto 0; padding: 11px 5px 0; border-top: 1px solid rgba(242, 215, 162, .11); display: flex; align-items: center; justify-content: center; gap: 9px; color: #a08b6e; font-size: 8px; letter-spacing: .08em; }
.page-footer span:first-child { color: #d3b160; font-weight: 700; letter-spacing: .17em; }
.footer-ornament { color: var(--gold); font-size: 9px; }

@media (min-width: 1100px) {
  .page-shell { padding-top: 28px; }
  .editor { grid-template-columns: minmax(0, 640px) 310px; }
}
@media (max-width: 760px) {
  .page-shell { width: min(100% - 32px, 540px); padding-top: max(16px, env(safe-area-inset-top)); }
  .topbar { padding-bottom: 14px; }
  .edition-tag { font-size: 8px; letter-spacing: .08em; }
  .brand-mark { width: 27px; height: 27px; }
  .intro { padding: 24px 0 19px; }
  .intro-copy { max-width: 370px; font-size: 11px; }
  .editor { grid-template-columns: 1fr; gap: 15px; }
  .artwork-frame { border-radius: 6px; }
  .control-card { padding: 20px 18px 16px; }
  .control-card h2 { margin-top: 13px; font-size: 25px; }
  .page-footer { flex-wrap: wrap; gap: 6px 9px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
}
@media (max-width: 390px) {
  .page-shell { width: calc(100% - 24px); }
  .edition-tag { font-size: 7px; }
  .brand-copy small { font-size: 7px; }
  h1 { font-size: 29px; }
  .preview-label { font-size: 8px; }
  .square-chip { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
