:root {
  --ink: #fff6e2;
  --green: #dce7d8;
  --cream: #091e18;
  --red: #f3d897;
  --muted: #bbcbbb;
  --line: #365546;
  --panel: #123226;
  --field: #0c251b;
  --gold: #d8ba79;
  color-scheme: dark;
  --serif: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--cream);
  font:
    100%/1.55 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a,
label {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.file-input:focus-visible + label {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.skip {
  position: absolute;
  top: -7rem;
  left: 1rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--gold);
  padding: 0.6rem;
  z-index: 5;
}

.skip:focus {
  top: 1rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #0b241b;
}

.header-inner,
main,
footer {
  width: min(calc(100% - 3rem), 77rem);
  margin-inline: auto;
}

.header-inner {
  height: 4.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark,
footer > a {
  font: 600 1.65rem/1.2 var(--serif);
  text-decoration: none;
  letter-spacing: -0.06em;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.wordmark img {
  filter: brightness(0) saturate(100%) invert(88%) sepia(21%) saturate(671%)
    hue-rotate(344deg) brightness(100%) contrast(90%);
}

.wordmark svg {
  width: 1.65rem;
  height: 1.65rem;
  color: var(--red);
}

.header-link {
  font-size: 0.92rem;
  text-underline-offset: 0.25rem;
}

.intro {
  padding: clamp(2.6rem, 5.5vw, 5.2rem) 0 clamp(1.75rem, 4vw, 3.5rem);
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin: 0 0 0.65rem;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
}

h1 {
  font-size: clamp(2.65rem, 6.6vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

h1 > span {
  color: var(--red);
}

.intro > p:last-child {
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.03rem;
  margin-top: 1rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.preview-panel {
  position: sticky;
  top: 1.1rem;
  min-width: 0;
}

.stage {
  position: relative;
  aspect-ratio: 1;
  scroll-margin-top: 3.3rem;
  overflow: hidden;
  isolation: isolate;
  border-radius: 0.4rem;
  background: #10271b url("/assets/christmas-tree-background.png") center / cover no-repeat;
}
.selected-size {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.8rem 0 0;
  font-weight: 600;
  font-size: 1rem;
}
.selected-size span {
  color: var(--gold);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
#ornament-artboard {
  display: block;
  position: absolute;
  user-select: none;
  -webkit-user-select: none;
}
#ornament-artboard[data-text-draggable],
#ornament-artboard[data-crop-active] {
  touch-action: none;
}
#ornament-artboard[data-text-active],
#ornament-artboard[data-crop-active] {
  cursor: grab;
}
#ornament-artboard[data-dragging],
#ornament-artboard[data-text-dragging] {
  cursor: grabbing;
}
#ornament-artboard:focus-visible {
  outline: 2px solid #fff7cd;
  outline-offset: 4px;
}
.crop-controls {
  min-width: 0;
  margin: 1rem 0 0;
  padding: 0.8rem 1rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--panel);
}
.crop-controls legend {
  padding: 0 0.35rem;
  margin-left: -0.35rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
}
.crop-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.crop-top label,
.pan-row label {
  font-size: 0.9rem;
  font-weight: 550;
}
.crop-top output {
  color: var(--muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}
.crop-top #crop-reset {
  margin: 0 0 0 auto;
}
.lettering-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
.lettering-fields .label {
  margin: 0 0 0.25rem;
}
.lettering-fields .text-input {
  min-width: 0;
  height: 3rem;
  padding: 0.4rem 0.55rem;
}
.lettering-position {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.lettering-position .text-button {
  padding: 0.24rem 0;
  font-weight: 400;
}
.text-controls .crop-position {
  margin-top: 0.15rem;
}
.editor .text-controls {
  margin-top: 1.5rem;
}
.editor .text-controls .lettering-fields > div {
  min-width: 0;
}
.editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.editor-actions .button {
  min-height: 3.1rem;
  padding-inline: 0.75rem;
}
.editor-checkout {
  padding-bottom: 1rem;
}
.sample-result {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.sample-result .sample-qr {
  width: 100%;
  margin: 0;
}
.sample-result .sample-result-copy {
  grid-column: 2;
  font-size: 0.9rem;
}
.sample-result .status {
  margin-top: 0;
}
.sample-result:has(#sample-qr[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
.sample-result:has(#sample-qr[hidden]) .sample-result-copy {
  grid-column: 1;
}
.sample-result a {
  color: var(--gold);
  text-underline-offset: 3px;
}
@media (max-width: 480px) {
  .lettering-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }
}
.crop-controls input[type="range"] {
  width: 100%;
  vertical-align: middle;
  height: 2rem;
  margin: 0.1rem 0;
  accent-color: var(--gold);
  cursor: pointer;
}
.crop-controls input:disabled {
  cursor: default;
  opacity: 0.6;
}
.crop-position {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  border-top: 1px solid var(--line);
  margin-top: 0.25rem;
  padding-top: 0.4rem;
}
.pan-row {
  min-width: 0;
}
.photo-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
}
.preview-photo-picker .button {
  min-height: 2.4rem;
  padding: 0.35rem 0.95rem;
}
.preview-photo-picker .status {
  min-height: 0;
}
.stage.has-photo ~ .preview-photo-picker #photo-formats {
  display: none;
}
.preview-panel:has(#layer-text[aria-pressed="true"]) .preview-photo-picker,
.preview-panel:has(#layer-controls[hidden]) .preview-photo-picker {
  display: none;
}
.preview-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin: 0 0 0.6rem;
}
.layer-picker {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.layer-picker span {
  color: var(--muted);
  font-size: 0.84rem;
  margin-right: 0.25rem;
}
.layer-picker button {
  color: var(--green);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.9rem;
  line-height: 1.3;
}
.layer-picker button:hover {
  background: #1c3d2d;
}
.layer-picker button[aria-pressed="true"] {
  border-color: #aa935f;
  background: #244632;
  color: var(--ink);
  font-weight: 650;
}

.switch {
  display: flex;
  padding: 0.15rem;
  border: 1px solid #637c60;
  border-radius: 2rem;
}

.switch button {
  background: none;
  border: 0;
  color: var(--green);
  font-size: 0.88rem;
  border-radius: 2rem;
  padding: 0.45rem 0.9rem;
}

.switch button[aria-pressed="true"] {
  background: #2a4b36;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px #a78e58;
}

.preview-note,
.fine-print,
.hint {
  color: var(--muted);
  font-size: 0.875rem;
}

.preview-note {
  margin: 0.65rem 0 0.55rem;
}

.bundle-selection {
  margin-bottom: 1.75rem;
}

.bundle-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.bundle-picker legend,
.bundle-editor-heading h2 {
  margin: 0;
  padding: 0;
  font: 500 1.35rem/1.2 var(--serif);
  letter-spacing: -0.02em;
}

.bundle-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 38rem;
  margin-top: 0.65rem;
}

.bundle-option {
  position: relative;
  display: grid;
  cursor: pointer;
}

.bundle-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.bundle-option > span {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--field);
  line-height: 1.2;
  color: var(--muted);
  font-size: 0.875rem;
}

.bundle-option strong {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
}

.bundle-option input:checked + span {
  border-color: var(--gold);
  background: #244332;
  color: var(--ink);
}

.bundle-option input:checked + span strong,
.bundle-savings {
  color: var(--red);
}

.bundle-option input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.bundle-option input:disabled + span {
  opacity: 0.7;
  cursor: default;
}

.bundle-savings {
  margin: 0.55rem 0 0;
  font-size: 0.875rem;
}

.bundle-ornaments {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.15rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.bundle-editor-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  max-width: 38rem;
}

.ornament-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  max-width: 38rem;
  margin-top: 0.25rem;
}

@media (max-width: 540px) {
  .bundle-options,
  .ornament-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ornament-choice {
  display: grid;
  justify-items: start;
  gap: 0.2rem;
  min-height: 3.25rem;
  padding: 0.45rem 0.65rem;
  text-align: left;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
}

.ornament-choice[aria-pressed="true"] {
  border-color: var(--gold);
  background: #274735;
}

.ornament-choice small {
  color: var(--muted);
}

.ornament-choice[data-ready="true"] small {
  color: var(--gold);
}

.ornament-choice:disabled {
  opacity: 0.7;
  cursor: default;
}

.next-ornament {
  margin-bottom: 0.65rem;
}

.editor section {
  padding: 0 0 2rem;
}

.editor section + section {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 1.2rem;
}

.label,
.media-modes legend {
  display: block;
  font-weight: 650;
  font-size: 0.95rem;
  margin: 1rem 0 0.4rem;
}

.hint {
  margin: 0.18rem 0 0;
}

.file-action {
  position: relative;
  display: inline-flex;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  border-radius: 2rem;
  min-height: 2.8rem;
  padding: 0.55rem 1.2rem;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.button-light {
  color: var(--green);
  border: 1px solid #72836c;
  background: #102d21;
}

.button-light:hover {
  background: #234633;
  border-color: var(--gold);
}

.button-green {
  background: #963a36;
  color: var(--ink);
  border: 1px solid #b99a61;
}

.button-green:hover {
  background: #aa4942;
}

.button:disabled,
.file-input:disabled + label {
  cursor: wait;
  opacity: 0.66;
}

.text-button {
  border: 0;
  background: none;
  color: var(--red);
  padding: 0.55rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.88rem;
}

.text-input {
  display: block;
  width: 100%;
  border: 1px solid #6a7e65;
  border-radius: 0.3rem;
  background: var(--field);
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  min-height: 3rem;
}

.text-input::placeholder {
  color: #9bad9b;
}

.back-text-controls .hint,
.preview-sharing-note {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.preview-sharing-note {
  margin-top: 1rem;
}

.section-copy {
  font-size: 0.97rem;
  color: var(--muted);
  margin: -0.45rem 0 1rem;
}

.media-modes {
  padding: 0;
  border: 0;
  display: flex;
  gap: 1.25rem;
  margin: 0 0 1.1rem;
}

.media-modes legend {
  margin: 0 0 0.35rem;
}

.media-modes label,
.consent {
  cursor: pointer;
}

.media-modes input,
.consent input {
  accent-color: var(--gold);
  width: 1.05rem;
  height: 1.05rem;
  vertical-align: text-bottom;
}

.record-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.mic-dot {
  width: 0.55rem;
  height: 0.55rem;
  background: #e69a8f;
  border-radius: 50%;
}

.recording .mic-dot {
  border-radius: 1px;
  background: #fff6e2;
}

.timer {
  font-variant-numeric: tabular-nums;
  color: var(--red);
  margin: 0.55rem 0;
  font-weight: 600;
}

.player,
#player-wrap video {
  display: block;
  width: 100%;
  max-height: 17rem;
  background: #15231b;
  border-radius: 0.3rem;
  margin: 0.65rem 0;
}

#player-wrap audio {
  width: 100%;
  color-scheme: dark;
}

.fine-print {
  line-height: 1.5;
  margin-top: 1rem;
}

.status {
  font-size: 0.92rem;
  color: #d1dfbd;
  overflow-wrap: anywhere;
}

.status:not(:empty) {
  margin: 0.7rem 0;
}

.status.error {
  color: #ffb6a8;
}

.reserve-section {
  padding-bottom: 0;
}

.consent {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 1rem 0;
}

.consent input {
  flex: none;
  margin: 0;
  align-self: flex-start;
  position: relative;
  top: 0.12rem;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(2rem, 7vw, 6rem);
  padding: 1.75rem 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
}

footer > a {
  font-size: 1.3rem;
  color: var(--ink);
}

footer span {
  font-size: 0.82rem;
}
footer .privacy-link {
  text-underline-offset: 0.16em;
}

@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .preview-panel {
    position: static;
    margin-bottom: 2rem;
  }
  .preview-panel {
    width: min(100%, 30rem);
    margin-inline: auto;
  }
  .editor {
    max-width: 38rem;
    margin-inline: auto;
  }
  .header-inner,
  main,
  footer {
    width: calc(100% - 2.25rem);
  }
  .header-inner {
    height: 4rem;
  }
  .wordmark {
    font-size: 1.38rem;
  }
  .wordmark svg {
    width: 1.32rem;
  }
  .header-link {
    font-size: 0.83rem;
  }
}

@media (max-width: 380px) {
  .preview-tools {
    gap: 0.3rem;
  }
  .switch button {
    padding-inline: 0.65rem;
  }
  .header-inner,
  main,
  footer {
    width: calc(100% - 1.6rem);
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.shape-options {
  border: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 0 0.6rem;
}

.shape-options legend {
  font-weight: 650;
  font-size: 0.95rem;
  margin: 0 0 0.55rem;
}

.shape-options label {
  position: relative;
  min-width: 0;
}

.shape-options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.shape-options span {
  display: block;
  height: 100%;
  border: 1px solid #536e5b;
  background: #102d21;
  border-radius: 0.5rem;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
}
.shape-options strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}
.shape-options small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.shape-options label:hover span {
  border-color: var(--gold);
}

.shape-options input:checked + span {
  background: #2a4b36;
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.shape-options input:checked + span small {
  color: #f3d897;
}

.shape-options input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.size-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.3rem;
}

.private-link {
  background: var(--panel);
  border: 1px solid #536b4f;
  border-radius: 0.4rem;
  padding: 1.1rem;
  margin-top: 1.2rem;
}

.private-link h3 {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
}

.sample-qr {
  display: block;
  width: min(13.5rem, 100%);
  height: auto;
  background: white;
  margin: 1rem 0 0.5rem;
}

.private-link p {
  font-size: 0.92rem;
  color: var(--muted);
}

.private-link button,
.private-link a {
  margin-top: 0.75rem;
}

.private-link a {
  display: inline-block;
  font-weight: 650;
  text-underline-offset: 3px;
}

@media (min-width: 761px) and (max-height: 960px) {
  .layout {
    grid-template-columns:
      minmax(0, min(49%, max(18rem, calc(100dvh - 21rem))))
      minmax(0, 1fr);
  }
}

@media (min-width: 761px) and (max-height: 590px) {
  .preview-panel {
    position: static;
  }
}
