:root {
  font:
    15px/1.5 'PingFang SC',
    'Microsoft YaHei',
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
.sibling {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  padding: 7px 12px;
  cursor: pointer;
}
button:hover,
.sibling:hover {
  border-color: var(--active-line);
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
button[aria-pressed='true'],
button[aria-current='true'] {
  background: var(--blush);
  border-color: var(--active-line);
  color: var(--primary);
}
.accent,
.ink-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  background: var(--coral);
  color: #542f26;
  border: 1px solid #cf8472;
  border-radius: 11px;
  padding: 11px 20px;
  font-weight: 700;
}
.accent:hover, .ink-btn:hover { background: #f58f83; border-color: #b96853; }
.ink-btn { box-shadow: 0 2px 0 #cb8976; }
.plain {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: inherit;
}
.top {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar,
.hub,
.bench,
footer {
  width: min(1160px, calc(100% - 48px));
  margin: auto;
}
.bar {
  height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bar nav,
footer {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}
.bar nav [aria-current] {
  color: var(--primary);
  font-weight: 700;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  letter-spacing: -0.045em;
}
h2 {
  font-size: 21px;
}
h3 {
  font-size: 17px;
}
.hub {
  padding: 25px 0;
}
.feature {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 272px;
  padding: 36px clamp(20px, 5vw, 70px);
  border: 1px solid var(--line);
  border-radius: 25px;
  background: radial-gradient(ellipse at 85% 0, #fff1dd 0, transparent 49%),
    linear-gradient(106deg, #fce5dc, #fbd6ce 65%, #f9ddd3);
}
.feature h1 {
  font-weight: 850;
  line-height: 1.2;
  font-size: clamp(33px, 4.5vw, 59px);
  color: var(--ink);
}
.feature h1 span { color: var(--primary); -webkit-text-stroke: 3px #fff8ed; paint-order: stroke fill; }
.feature p {
  color: var(--muted);
  margin: 9px 0 18px;
}
.hero-art {
  position: relative;
  height: 210px;
  pointer-events: none;
}
.ticket-stack {
  position: absolute;
  width: min(65%, 254px);
  aspect-ratio: 1.55;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
}
.ticket-stack::before {
  content: '';
  position: absolute;
  inset: 3% -5% -3% 6%;
  border: 1px solid #b9d2d2;
  border-radius: 11px;
  background: repeating-linear-gradient(0deg, transparent 0 15px, #fff9 15px 16px), var(--sky);
  transform: rotate(16deg);
  box-shadow: 1px 5px 8px #73504118;
}
.sample-ticket {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template: repeat(2,minmax(0,1fr)) / repeat(3,minmax(0,1fr));
  align-items: center;
  justify-items: center;
  gap: 4% 5%;
  padding: 6%;
  border: 1px solid #ddc4ac;
  border-radius: 11px;
  background: #fffaf0;
  box-shadow: 0 4px 8px #73504124;
}
.sample-ticket::before {
  content: '';
  width: 30%;
  height: 12%;
  position: absolute;
  top: -7%;
  left: 34%;
  transform: rotate(4deg);
  background: repeating-linear-gradient(75deg, #ffdc91e8 0 6px, #ffebb2ee 6px 11px);
  clip-path: polygon(2% 0, 100% 0, 97% 26%,100% 55%,97% 78%,100% 100%,0 100%,3% 72%,0 46%,3% 22%);
}
.sample-ticket img { width: 88%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 1px #684b3824); }
.paper-star {
  position: absolute;
  line-height: 1;
  color: var(--butter);
  -webkit-text-stroke: 1.3px #b18360;
  filter: drop-shadow(0 2px 0 #fff8);
}
.star-gold { left: 6%; top: 50%; font-size: 42px; transform: rotate(-16deg); }
.star-blue { right: 4%; top: 70%; color: var(--sky); font-size: 28px; transform: rotate(12deg); }
.paper-cloud {
  position: absolute;
  top: 0;
  right: 0;
  width: 21%;
  max-width: 89px;
  aspect-ratio: 2.05;
  background: radial-gradient(ellipse 28% 46% at 27% 63%,#fffdf8 96%,transparent 100%),
    radial-gradient(ellipse 30% 62% at 53% 64%,#fffdf8 96%,transparent 100%),
    radial-gradient(ellipse 26% 40% at 76% 68%,#fffdf8 96%,transparent 100%);
  filter: drop-shadow(1px 1.5px 0 #c3997e);
  transform: rotate(7deg);
}
.hub section + section {
  margin-top: 27px;
}
.tool-grid {
  margin: 13px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tool-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 8px 8px 15px;
  transition:
    transform 0.16s,
    box-shadow 0.16s;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px #673f2b16;
}
.tool-card h3,
.tool-card p {
  margin: 10px 8px 0;
}
.tool-card h3 span {
  float: right;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  background: var(--paper);
  color: var(--primary);
  border-radius: 50%;
  font-size: 14px;
}
.tool-card p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.cover {
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  gap: 7px;
  overflow: hidden;
}
.cover > img {
  height: 69%;
  max-width: 29%;
  object-fit: contain;
  transform: rotate(-9deg);
}
.cover > img:nth-child(2) {
  transform: rotate(8deg) translateY(-4px);
}
.food {
  background: #fff0cd;
}
.portrait {
  background: #f9dfda;
}
.portrait > img {
  height: 86%;
  max-width: 50%;
  box-shadow: 0 3px 8px #64364e25;
}
.garden {
  background: #e4f0ee;
}
.dots {
  background: var(--sky);
}
.dots i {
  width: 56px;
  height: 78px;
  background-color: #fff5ec;
  background-image: radial-gradient(#ef9d90 22%, transparent 26%);
  background-size: 14px 14px;
  transform: rotate(-12deg);
  border-radius: 4px;
}
.dots i:nth-child(2) {
  background-image: radial-gradient(#90b4b8 23%, transparent 28%);
  transform: rotate(8deg);
}
.dots i:last-child {
  background-image: radial-gradient(#e5bc66 21%, transparent 26%);
}
.mix {
  background: #fbe6d8;
}
.solo {
  background: #faedce;
}
.mini-print {
  background: white;
  display: grid;
  grid-template-columns: repeat(2, 47px);
  gap: 4px;
  padding: 10px;
  transform: rotate(7deg);
  box-shadow: 0 2px 8px #593e4f30;
}
.mini-print img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.solo .mini-print {
  transform: rotate(-6deg);
}
footer {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 16px 0;
  margin-top: 20px;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.bench {
  padding: 22px 0 10px;
}
.tool-heading,
.layout-head,
.panel-head,
.dialog-head,
.checkout,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tool-heading {
  margin-bottom: 19px;
}
.tool-heading h1 {
  font-size: clamp(25px, 3.4vw, 39px);
}
.tool-heading p,
.note,
.layout-head p,
.muted {
  color: var(--muted);
  font-size: 13px;
}
.back {
  color: var(--primary);
  font-size: 13px;
}
.panel,
#layout-panel,
.checkout,
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  padding: 18px;
}
.panel + .panel,
#layout-panel,
.checkout {
  margin-top: 14px;
}
button,
input,
select {
  max-width: 100%;
}
.buttons,
.tabs,
.filters,
.chips,
.page-nav,
.fields {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tabs,
.filters,
.fields,
.chips {
  margin: 10px 0;
}
.tabs button,
.chips button,
.page-nav button {
  font-size: 13px;
}
.filters input,
.field input:not([type='checkbox']),
.field select,
input.contact {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 35px;
  background: #fff;
  padding: 5px 8px;
}
.filters input {
  flex: 1;
  min-width: 120px;
}
.filters select {
  padding: 6px;
  border-radius: 7px;
  border: 1px solid var(--line);
}
.field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.field input[type='number'] {
  width: 70px;
}
.field input[type='color'] {
  width: 42px;
  padding: 2px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px;
  font-size: 12px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.tile img {
  display: block;
  width: 100%;
  height: 65px;
  object-fit: contain;
}
.tile[aria-pressed='true']::after {
  content: '✓';
  position: absolute;
  right: 5px;
  top: 4px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  width: 18px;
  height: 18px;
}
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  font-size: 13px;
}
.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 17px;
  margin-top: 12px;
}
.canvas-col {
  min-width: 0;
  text-align: center;
}
.stage {
  background-color: var(--stage);
  background-image: radial-gradient(#dfcbbb 1px, transparent 1px);
  background-size: 12px 12px;
  border-radius: 10px;
  padding: 16px;
  display: grid;
  place-items: center;
}
.stage.dark {
  background: #83858d;
}
.page-nav {
  margin-bottom: 8px;
}
.stage #sheet-wrap {
  position: relative;
  width: min(75%, 310px);
  background: white;
  box-shadow: 0 2px 8px #30202c28;
  line-height: 0;
}
.stage #sheet-wrap.wide {
  width: min(96%, 490px);
}
.stage.transparent #sheet-wrap {
  background: transparent;
}
.stage canvas {
  width: 100%;
  height: auto;
}
.canvas-col > button {
  margin-top: 8px;
}
#regions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.region {
  pointer-events: auto;
  position: absolute;
  border: 1px dashed #97684f;
  background: transparent;
  border-radius: 2px;
  padding: 0;
}
.region span {
  position: absolute;
  left: 3px;
  top: 3px;
  color: var(--ink);
  background: #fff7eeed;
  border-radius: 4px;
  padding: 3px;
  font-size: 10px;
  line-height: 1.2;
}
.region[aria-pressed='true'] {
  border: 2px solid var(--primary);
  background: #e693730d;
}
.settings {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.group {
  padding: 12px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.group h3 {
  font-size: 15px;
  margin-bottom: 6px;
}
.checkout {
  position: sticky;
  bottom: 5px;
  z-index: 1;
  box-shadow: 0 3px 13px #69415915;
}
.panel-head {
  flex-wrap: wrap;
}
.panel-head h2 {
  font-size: 18px;
}
#notice,
.alert {
  background: #fff0e3;
  color: #813f27;
  margin: 9px 0;
  padding: 10px;
  border-radius: 8px;
}
.art-row {
  display: grid;
  grid-template-columns: 75px 1fr;
  align-items: start;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.art-row > img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  background: var(--stage);
  border-radius: 8px;
}
.spec {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.drop {
  display: grid;
  gap: 3px;
  place-items: center;
  border: 1px dashed var(--active-line);
  background: var(--wash);
  padding: 18px;
  width: 100%;
  color: var(--primary);
}
.drop small {
  font-size: 12px;
  color: var(--muted);
}
.drop.over {
  background: var(--blush);
}
.swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.swatches button {
  font-size: 12px;
}
.swatches i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
}
.theme-tile img {
  width: 35px;
  height: 35px;
}
.theme-tile .sample {
  display: flex;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
}
.theme-tile {
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px;
  min-width: 0;
}
.theme-tile button {
  font-size: 12px;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 9px;
}
dialog {
  color: var(--ink);
  width: min(640px, calc(100% - 22px));
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 12px 50px #55362638;
}
dialog::backdrop {
  background: #55362663;
  backdrop-filter: blur(2px);
}
.dialog-head {
  margin-bottom: 10px;
}
.dialog-head button {
  font-size: 19px;
  line-height: 1;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 9px;
  max-height: 45vh;
  overflow: auto;
}
.proof {
  display: grid;
  justify-items: center;
  gap: 6px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  text-align: center;
  font-size: 13px;
}
.proof canvas {
  max-width: 96%;
  height: 105px;
  object-fit: contain;
}
.proofs-total {
  margin: 10px 0;
  font-weight: 700;
}
.big-preview {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 65vh;
  background: #fff;
  object-fit: contain;
}
.record {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.contact {
  width: 100%;
  margin: 6px 0 12px;
}
.order-number {
  font: 700 19px monospace;
  overflow-wrap: anywhere;
  color: var(--primary);
  padding: 14px 0;
}
.page-nav,
.zone-list {
  max-height: 100px;
  overflow: auto;
}
.page-nav button {
  min-width: 34px;
}
.actions-end {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.small {
  font-size: 12px;
}
.studio-home-link {
  margin-left: auto;
  margin-right: 7px;
}
@media (max-width: 720px) {
  .bar,
  .hub,
  .bench,
  footer {
    width: calc(100% - 24px);
  }
  .bar {
    height: 56px;
  }
  .bar nav {
    gap: 12px;
    font-size: 12px;
  }
  .hero-art {
    height: 155px;
  }
  .feature {
    padding: 20px;
    min-height: 208px;
    grid-template-columns: 1.2fr 1fr;
  }
  .feature p {
    font-size: 13px;
  }
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .tool-card h3 {
    font-size: 15px;
  }
  .tool-card p {
    font-size: 12px;
  }
  .cover {
    height: 83px;
  }
  .layout-grid {
    grid-template-columns: 1fr;
  }
  .panel,
  #layout-panel,
  .checkout {
    padding: 12px;
  }
  .tiles {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 5px;
  }
  .tile img {
    height: 52px;
  }
  .tool-heading {
    align-items: flex-end;
  }
  .sibling {
    font-size: 12px;
    flex-shrink: 0;
    padding: 5px;
  }
  .settings .fields {
    gap: 6px;
  }
  .checkout {
    font-size: 13px;
  }
  .feature h1 {
    font-size: 28px;
  }
  .stage #sheet-wrap {
    width: min(78%, 250px);
  }
  .spec button,
  .spec select {
    font-size: 12px;
  }
  .art-row {
    grid-template-columns: 50px 1fr;
  }
  .art-row > img {
    width: 50px;
    height: 50px;
  }
  .button-row,
  .layout-head {
    flex-wrap: wrap;
  }
}
.single-live {
  display: block;
  height: 130px;
  width: auto;
  margin: 7px 0;
  background: #fff;
  border: 1px solid var(--line);
}
.zoom-scroll {
  overflow: auto;
  max-height: 65vh;
}
.zoom-scroll .zoomed {
  width: 160%;
  max-width: none;
  max-height: none;
}
.art-row .button-row strong {
  overflow-wrap: anywhere;
}
.record,
.proof {
  overflow-wrap: anywhere;
}
@media (max-width: 550px) {
  .feature {
    display: block;
    min-height: 204px;
    padding: 19px 16px;
  }
  .ticket-stack { width: 80%; }
  .star-gold { left: 0; top: 71%; font-size: 21px; }
  .star-blue { right: 1%; top: 82%; font-size: 17px; }
  .feature h1 {
    font-size: clamp(24px, 6.5vw, 32px);
    white-space: nowrap;
  }
  .feature p {
    max-width: 60%;
    font-size: 12px;
    margin: 9px 0 16px;
  }
  .feature .ink-btn {
    padding: 9px 12px;
    gap: 10px;
    font-size: 13px;
    white-space: nowrap;
  }
  .hero-art {
    position: absolute;
    inset: 18% 1% auto auto;
    width: 37%;
    height: 65%;
  }
}
.dimension-art {
  display: block;
  max-height: 32vh;
  max-width: 95%;
  object-fit: contain;
  margin: 0 auto 12px;
}
#dialog-body form > .field {
  display: grid;
  gap: 2px;
  align-items: start;
  margin: 6px 0;
}
#dialog-body form > .field .contact {
  margin: 0 0 8px;
}
