:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #292127;
  background: #f8f5f2;
  font-synthesis: none;
  --ink: #292127;
  --muted: #68585c;
  --line: #e8dbd5;
  --accent: #9e2348;
  --accent-light: #fae8ed;
  --accent-hover: #7c1a37;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 290px; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.topbar { background: white; border-bottom: 1px solid var(--line); }
.topbar-inner {
  width: min(1190px, calc(100% - 64px));
  min-height: 76px;
  margin: auto;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.16rem; line-height: 1.15; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: .79rem; font-weight: 500; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent); color: white; font-size: 1.6rem; }
.primary { border: 0; background: var(--accent); color: white; border-radius: 11px; font-size: .94rem; font-weight: 650; padding: 12px 19px; min-height: 44px; }
.primary:hover:enabled { background: var(--accent-hover); }
.primary:disabled { opacity: .53; cursor: default; }

.studio { width: min(1190px, calc(100% - 64px)); margin: 26px auto; display: grid; grid-template-columns: minmax(320px, .7fr) minmax(0, 1.3fr); gap: 22px; align-items: start; }
.settings, .preview { background: white; border: 1px solid var(--line); border-radius: 21px; box-shadow: 0 6px 24px #43252d0b; min-width: 0; }
.settings { padding: 24px; }
h1 { font-size: clamp(1.48rem, 3vw, 1.85rem); line-height: 1.12; margin: 1px 0 24px; letter-spacing: -.035em; }
fieldset { margin: 0 0 19px; padding: 0; border: 0; min-inline-size: 0; }
fieldset:last-of-type { margin-bottom: 0; }
legend { padding: 0; margin-bottom: 9px; font-weight: 700; font-size: 1rem; }
.upload-rights { margin: 0 0 9px; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.upload { position: relative; border: 1px dashed #c89ca9; border-radius: 13px; background: #fffbfa; }
.upload:hover, .upload.dragging { background: var(--accent-light); }
.upload:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.upload-button { display: flex; gap: 12px; padding: 12px; align-items: center; cursor: pointer; }
.upload-button span:last-child { min-width: 0; }
.upload-button strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); font-size: .91rem; }
.upload-button small { display: block; font-size: .76rem; margin-top: 4px; color: var(--muted); }
.upload-icon { display: grid; place-items: center; background: var(--accent-light); color: var(--accent); font-size: 1.28rem; width: 37px; height: 37px; border-radius: 10px; flex: none; }
#photo { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-tools { display: grid; gap: 12px; margin-top: 9px; }
.photo-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.photo-actions { justify-content: flex-start; }
.sheet-designs { margin-bottom: 14px; padding: 9px 12px; border: 1px solid #dfe3d1; background: #f0f1e4; border-radius: 12px; }
.sheet-design-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 5px 12px; position: relative; }
.sheet-design-list { display: flex; flex-wrap: wrap; gap: 5px; }
.sheet-design-row #add-design { display: inline-flex; align-items: baseline; gap: 5px; font-weight: 650; }
.sheet-designs #remove-design { margin-top: 4px; }
.sheet-design-list button { max-width: 100%; padding: 6px 11px; border: 1px solid transparent; border-radius: 99px; background: transparent; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.sheet-design-list button[aria-pressed="true"] { border-color: #b7c4af; background: #fffdf8; font-weight: 700; }
.sheet-design-help-button { padding: 4px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .79rem; text-decoration: underline; text-decoration-color: #9faa97; text-underline-offset: .22em; }
.sheet-design-help-button:hover, .sheet-design-help-button[aria-expanded="true"] { color: var(--ink); text-decoration-color: currentColor; }
.sheet-design-help {
  display: none; position: absolute; z-index: 3; inset: 100% auto auto 0;
  width: min(100%, 370px); margin: 0; padding: 12px 14px; border: 1px solid #b7c4af;
  border-radius: 10px; background: #fffdf8; color: var(--ink); font-size: .85rem;
  line-height: 1.45; box-shadow: 0 6px 20px #253c301c;
}
.sheet-design-help p { margin: 0; }
.sheet-design-help p + p { margin-top: 8px; }
.sheet-design-help-button[aria-expanded="true"] + .sheet-design-help { display: block; }
@media (hover: hover) {
  .sheet-design-row:not(.help-dismissed):has(.sheet-design-list button:first-child:hover, .sheet-design-help-button:hover, .sheet-design-help:hover) .sheet-design-help { display: block; }
}
.photo-sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.photo-sliders label { display: grid; gap: 3px; font-size: .79rem; }
.photo-sliders .photo-zoom { grid-column: 1 / -1; }
.photo-zoom span { display: flex; justify-content: space-between; align-items: baseline; }
.photo-sliders input[type="range"] { width: 100%; margin: 0; min-height: 24px; accent-color: var(--accent); }
.link-button { border: 0; background: transparent; padding: 4px; color: var(--accent); font-size: .86rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.fields label { display: flex; flex-direction: column; gap: 5px; font-size: .86rem; font-weight: 550; color: var(--muted); }
.fields input { width: 100%; color: var(--ink); background: white; border: 1px solid #e2d3cf; border-radius: 9px; min-height: 41px; padding: 8px 10px; font-size: 1rem; }
input[aria-invalid="true"] { border-color: #b12950; }
.dimensions.with-height { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 4px; margin-bottom: 10px; background: #f5eeeb; border-radius: 11px; }
.segmented label { position: relative; min-width: 0; }
.segmented label:last-child { grid-column: 1 / -1; }
.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: .86rem; }
.segmented input:checked + span { background: white; color: var(--accent); font-weight: 700; box-shadow: 0 1px 5px #48203417; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }
.shape-circle, .shape-oval, .shape-rectangle { width: 14px; height: 14px; border: 1.5px solid currentColor; flex: none; }
.shape-circle { border-radius: 100%; }
.shape-oval { height: 10px; border-radius: 50%; }
.shape-star { width: 15px; height: 15px; flex: none; background: currentColor; clip-path: polygon(50% 0, 64% 33%, 100% 38%, 74% 63%, 81% 100%, 50% 82%, 19% 100%, 26% 63%, 0 38%, 36% 33%); }
.shape-heart { width: 15px; height: 14px; flex: none; background: currentColor; clip-path: polygon(50% 100%, 7% 55%, 0 34%, 4% 16%, 16% 4%, 31% 0, 43% 8%, 50% 21%, 57% 8%, 69% 0, 84% 4%, 96% 16%, 100% 34%, 93% 55%); }
.shape-rectangle { border-radius: 2px; width: 17px; }
.check { display: flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--muted); }
fieldset > .check { margin-top: 12px; }
.check input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; flex: none; }
.message { font-size: .86rem; margin: 11px 0 0; line-height: 1.35; color: #9c2442; }

.preview { overflow: hidden; }
.preview-top, .preview-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; }
.preview-top h2 { font-size: 1.02rem; margin: 0; }
.preview-top span, .preview-bottom span { color: var(--muted); font-size: .81rem; }
.preview-bottom strong { color: var(--accent); font-size: .83rem; }
.preview-bottom { flex-wrap: wrap; }
.board {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 20px;
  background-color: #eee8e4;
  background-image: radial-gradient(circle, #cbbeb7 1px, transparent 1px);
  background-size: 14px 14px;
  border-block: 1px solid var(--line);
}
#sheet { display: block; width: min(100%, 390px); height: auto; background: white; box-shadow: 0 7px 25px #34252030; }
#sheet.can-pan { cursor: grab; }
#sheet.can-pan:active { cursor: grabbing; }

@media (max-width: 820px) {
  .studio, .topbar-inner { width: calc(100% - 36px); }
  .studio { gap: 14px; }
  .settings { padding: 17px; }
}
@media (max-width: 670px) {
  .studio { grid-template-columns: 1fr; margin-top: 15px; }
  .topbar-inner { min-height: 68px; }
  .board { min-height: 0; padding: 16px; }
  .primary { padding-inline: 12px; font-size: .84rem; }
}
@media (max-width: 360px) {
  .topbar-inner, .studio { width: calc(100% - 20px); }
  .brand { gap: 7px; font-size: 1rem; }
  .brand-mark { width: 33px; height: 33px; }
  .brand small { font-size: .7rem; }
  .dimensions.with-height { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.editor-page {
  --accent: var(--forest);
  --accent-light: #edf2e5;
  --line: var(--panel-border);
}
.editor-page .site-header { grid-template-columns: auto minmax(0, 1fr); }
.editor-page .editor-navigation { grid-template-columns: minmax(0, 1fr); justify-self: end; }
.editor-main { padding-top: clamp(18px, 2.4vw, 33px); }
.editor-intro { margin-bottom: clamp(17px, 2vw, 26px); }
.editor-intro h1 {
  margin: 0;
  font-size: clamp(1.95rem, 3.7vw, 3.35rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.editor-intro img { display: block; width: clamp(60px, 6vw, 88px); height: auto; margin-block: 0 2px; }
.editor-intro p { max-width: 55ch; margin: 0; color: var(--muted); line-height: 1.45; }
.editor-view-switch { display: none; }
.editor-page .studio {
  width: 100%;
  margin: 0;
  align-items: stretch;
  grid-template-columns: minmax(310px, .82fr) minmax(0, 1.18fr);
  gap: clamp(14px, 3vw, 42px);
}
.editor-page :is(.settings, .preview) {
  background: var(--panel-cream);
  border-color: var(--panel-border);
  border-radius: clamp(18px, 2.4vw, 30px);
  box-shadow: var(--panel-shadow);
}
.editor-page .settings { padding: clamp(17px, 3vw, 34px); }
.editor-page .preview { overflow: clip; }
.editor-page :is(.settings, .preview) h2 {
  font-size: clamp(1.23rem, 2.3vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.editor-page .settings h2 { margin: 0 0 14px; }
.editor-page .settings fieldset {
  margin-bottom: 12px;
  padding: 7px 0 0;
  border: 0;
}
.editor-page .settings fieldset:last-of-type { margin-bottom: 0; }
.editor-page .settings legend { margin: 0; padding: 0; }
.editor-disclosure summary { min-height: 38px; padding-block: 8px; color: var(--ink); cursor: pointer; font-weight: 650; }
.editor-disclosure summary::marker { color: #647d67; }
.editor-inscription { margin-block: 9px 14px; border-block: 1px solid var(--panel-border); }
.editor-inscription .fields { padding: 3px 0 13px; }
.editor-disclosure .photo-tools { margin-top: 4px; }
.editor-page .upload { background: #f7f5e9; border-color: #b7c5aa; }
.editor-page .upload:is(:hover, .dragging) { background: var(--accent-light); }
.editor-page .upload-icon { background: #e4ecd8; }
.editor-page .fields :is(input, select) { min-height: 44px; border-color: #c7d1bf; border-radius: 11px; }
.editor-page .fields select {
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  min-width: 0;
  padding: 8px 26px 8px 10px;
  border: 1px solid #c7d1bf;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #49624d 50%) right 13px center / 5px 5px no-repeat,
    linear-gradient(135deg, #49624d 50%, transparent 50%) right 8px center / 5px 5px no-repeat #fff;
}
.editor-page input[aria-invalid="true"] { border-color: #a63d57; }
.editor-page :is(.segmented, .upload:focus-within) { border-radius: 12px; }
.editor-page .segmented { display: flex; flex-wrap: wrap; background: #edeedc; }
.editor-page .segmented label { flex: 1 0 auto; }
.editor-page .segmented span { min-height: 38px; padding-inline: 8px; }
.editor-page .segmented input:checked + span { background: #fffdf8; box-shadow: 0 1px 5px #253c3018; }
.editor-page .link-button { text-decoration: underline; text-underline-offset: .2em; }
.editor-page .message { color: #8d304b; }
.editor-page .message.success { color: #285742; }
.editor-page .preview-top { flex-wrap: wrap; gap: 6px 12px; padding: 12px clamp(15px, 2.5vw, 26px); }
.editor-page .preview-top > span {
  padding: 5px 9px;
  border: 1px solid #d6deca;
  border-radius: 999px;
  background: #eef2e6;
}
.editor-page #layout-info { flex: 1 1 100%; color: var(--muted); font-size: .83rem; font-weight: 600; }
.editor-page .board {
  min-height: 0;
  padding: clamp(18px, 3vw, 36px);
  background:
    radial-gradient(ellipse at 42% 42%, #f7f6eb 0 29%, transparent 68%),
    linear-gradient(140deg, #dce5cd, #e8ecdf 54%, #f0e2d4);
}
.editor-page #sheet { width: min(100%, clamp(260px, 39vh, 370px)); box-shadow: 0 10px 24px #283e2c29, 0 0 0 1px #8e9f863d; }
.editor-page .editor-print-actions { padding: 13px clamp(15px, 2.5vw, 26px) 15px; }
.editor-result-buttons { display: flex; flex-wrap: wrap; gap: 7px 9px; }
.editor-page .sheet-pages { flex: 1 1 100%; }
.editor-page .sheet-pages:not(:has(:is(#split-sheets, #sheet-page-nav):not([hidden]))) { display: none; }
.editor-page .sheet-page-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.editor-page .sheet-pages .link-button:disabled { opacity: .5; cursor: default; }
.editor-page #split-sheets { padding: 7px 10px; border: 1px solid #b7c4af; border-radius: 9px; font-weight: 650; }
.editor-page .editor-print-actions .button { min-height: 44px; padding: 9px 16px; }
.editor-page .editor-print-actions .button-main { border: 1px solid transparent; }
.editor-page .editor-download { border-color: #b7c4af; background: transparent; color: var(--forest); }
.editor-page .editor-download:hover:enabled { background: var(--accent-light); }
.editor-page .editor-print-actions .button:disabled { opacity: .58; cursor: default; }
.editor-page :is(.editor-print-delivery, .editor-pdf-note) { margin: 7px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.editor-page .editor-pdf-note { font-size: .77rem; }
.editor-page .editor-order-request { max-width: 760px; margin: clamp(24px, 4vw, 48px) auto 0; }
.editor-page .editor-order-note { margin: -4px 0 14px; color: var(--muted); line-height: 1.45; }

@media (min-width: 1000px) and (min-height: 820px) {
  .editor-page .preview-content { position: sticky; top: 100px; }
}
@media (max-width: 760px) {
  .editor-page .studio { grid-template-columns: minmax(0, 1fr); }
  :root:has(.editor-page) { scroll-padding-block-start: 10px; }
  .editor-page .site-masthead { position: static; }
  .editor-page .editor-navigation { justify-self: stretch; }
  .editor-view-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: sticky;
    top: 0;
    z-index: 4;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--panel-border);
    border-radius: 13px;
    background: var(--panel-cream);
  }
  .editor-view-switch button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-weight: 650; }
  .editor-view-switch button[aria-pressed="true"] { background: #e4ecd8; }
  .editor-page [data-view="settings"] .preview,
  .editor-page [data-view="preview"] .settings { display: none; }
}
@media (max-width: 440px) {
  .editor-page .dimensions.with-height { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-page .segmented span { gap: 5px; padding-inline: 4px; }
}
