:root {
  --pp-ink: #20312c;
  --pp-muted: #5b6a64;
  --pp-paper: #faf8f2;
  --pp-accent: #245c49;
  --pp-border: #d9e0d9;
  font-family: Arial, Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--pp-ink);
  background: var(--pp-paper);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select,
input[type="file"] {
  cursor: pointer;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
input,
select,
textarea {
  min-height: 44px;
  border: 1px solid #bbc8c0;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  max-width: 100%;
}
input,
select,
textarea {
  font-size: 15px;
}
input[type="number"] {
  font-variant-numeric: tabular-nums;
}
button {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
button:hover {
  background: #eef5ef;
  border-color: #7b9788;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: var(--pp-accent);
  color: #fff;
  border-color: var(--pp-accent);
}
button.primary:hover {
  background: #1a4939;
}
:focus-visible {
  outline: 3px solid #3158cb;
  outline-offset: 3px;
}
a {
  color: inherit;
}
header .site-header-inner {
  max-width: 1680px;
  margin: auto;
  padding-inline: 28px;
}
main {
  max-width: 1680px;
  margin: auto;
  padding: 22px 28px;
}
h1 {
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 1.18;
  margin: 12px 0 8px;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 8px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.6;
}
nav.breadcrumb {
  font-size: 13px;
  color: var(--pp-muted);
}
.intro {
  margin-bottom: 20px;
  max-width: 1000px;
}
.intro p {
  margin: 6px 0;
  color: var(--pp-muted);
  font-size: 16px;
}
.intro .privacy {
  font-size: 13px;
}
.workspace-jumps {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.workspace-jumps a {
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: #edf1e9;
}
.workspace-jumps a:hover {
  background: #dde8df;
}
.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.workspace > * {
  min-width: 0;
  scroll-margin-top: 116px;
}
.panel,
.preview-panel {
  background: #fff;
  border: 1px solid var(--pp-border);
  border-radius: 14px;
  min-width: 0;
  box-shadow: 0 3px 14px #263d2b05;
}
.setup-panel {
  padding: 22px;
}
.section-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--pp-muted);
  margin: 0 0 18px;
}
.section-heading {
  border-top: 1px solid var(--pp-border);
  padding-top: 22px;
  margin: 22px 0 14px;
}
.controls {
  display: grid;
  gap: 14px;
}
#controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}
#controls > * {
  grid-column: 1/-1;
}
#controls > .numeric-field {
  grid-column: auto;
}
#controls > .numeric-field > span:first-child {
  min-height: 36px;
  display: flex;
  align-items: end;
  flex-wrap: wrap;
}
.field {
  display: grid;
  gap: 7px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  min-width: 0;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}
.field .unit {
  margin-left: 5px;
  color: #67786e;
  font-size: 12px;
  font-weight: 400;
}
.field:has(input[type="checkbox"]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  padding: 9px 0;
}
.field:has(input[type="checkbox"]) .hint {
  grid-column: 1/-1;
}
.field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--pp-accent);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.controls details {
  border-top: 1px solid var(--pp-border);
  padding-top: 10px;
}
.controls details .field {
  margin-top: 12px;
}
summary {
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 0;
  font-weight: 600;
}
.hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--pp-muted);
  line-height: 1.55;
  margin: 6px 0;
}
.local-file {
  width: 100%;
  font-size: 12px;
  padding: 6px;
  background: #f5f8f3;
  border: 1px dashed #94ad9e;
}
.local-file::file-selector-button {
  font: inherit;
  font-weight: 600;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: #e0ecdf;
  color: #244834;
  margin-right: 8px;
  cursor: pointer;
}
.project-settings {
  margin-top: 20px;
  border-top: 1px solid var(--pp-border);
}
.preview-panel {
  padding: 22px;
}
.output-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
  box-shadow: none;
}
.preview-heading {
  min-width: 0;
  max-width: 470px;
}
.preview-heading .section-note {
  margin-bottom: 0;
}
.primary-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
  max-width: 50%;
  justify-content: flex-end;
  scroll-margin-top: 125px;
}
.primary-downloads button {
  min-height: 44px;
}
.preview-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid #e8ece6;
}
.preview-toolbar button {
  font-size: 12px;
  min-height: 36px;
  padding: 7px 10px;
}
#page-label {
  font-size: 13px;
  min-width: 85px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.history-actions {
  margin-left: auto;
  padding-left: 12px;
  border-left: 1px solid var(--pp-border);
}
.history-actions button {
  background: transparent;
}
.preview-scroll {
  height: min(72vh, 820px);
  min-height: 460px;
  overflow: auto;
  background-color: #edf0e9;
  background-image: radial-gradient(#c5cfc1 0.65px, transparent 0.65px);
  background-size: 12px 12px;
  border: 1px solid #d9dfd3;
  border-radius: 10px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.preview-scroll canvas {
  display: block;
  flex-shrink: 0;
  box-shadow: 0 4px 18px #14251d24;
  margin: auto;
  background-image: conic-gradient(#eee 25%, white 0 50%, #eee 0 75%, white 0);
  background-size: 16px 16px;
}
.preview-caption {
  font-size: 12px;
  color: var(--pp-muted);
  margin: 10px 0 16px;
}
.preview-metrics {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--pp-muted);
  margin: 8px 0;
}
.secondary-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  scroll-margin-top: 120px;
}
.secondary-downloads button {
  font-size: 12px;
  background: #f7f9f5;
}
.preview-panel > details {
  margin-top: 18px;
  border-top: 1px solid var(--pp-border);
}
.measurements dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 16px;
  font-size: 13px;
  max-width: 700px;
  margin: 0 0 12px;
}
.measurements dt {
  color: var(--pp-muted);
}
.measurements dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.status {
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  border: 1px solid #d9e6d9;
  border-radius: 7px;
  padding: 9px 12px;
  background: #f2f7ef;
  margin-bottom: 10px;
}
.status.error {
  border-color: #d9a59b;
  background: #fff4f0;
  color: #842626;
}
.status:empty {
  display: none;
}
.file-list {
  display: grid;
  gap: 12px;
}
.file-list article {
  padding: 14px;
  border: 1px solid var(--pp-border);
  border-radius: 9px;
  background: #fafbf8;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.file-list article > strong {
  display: block;
  margin-bottom: 12px;
}
.file-list article .two {
  margin: 10px 0;
}
#order-list,
#artwork-list {
  max-height: 520px;
  overflow: auto;
  overscroll-behavior: contain;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  padding: 3px;
}
button[data-style] {
  display: flex;
  gap: 14px;
  align-items: center;
  text-align: left;
}
button[data-style][aria-pressed="true"] {
  background: #edf5e9;
  border-color: #476d57;
  box-shadow: inset 3px 0 #476d57;
}
.record-actions {
  margin: 0 0 12px;
}
.record-actions button {
  font-size: 12px;
}
.compact-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.compact-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf2e9;
  font-size: 12px;
  color: #415344;
}
.compact-table td,
.compact-table th {
  border-bottom: 1px solid var(--pp-border);
  padding: 9px 8px;
  text-align: left;
}
.compact-table tr:nth-child(even) td {
  background: #fafbf8;
}
.compact-table input,
.compact-table textarea {
  width: 100%;
  min-width: 90px;
  font-size: 13px;
  border-color: #d4ddd3;
}
.compact-table input[type="checkbox"] {
  min-width: 20px;
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--pp-accent);
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--pp-border);
  border-radius: 8px;
}
.table-scroll + .actions {
  padding-top: 10px;
  font-size: 12px;
}
input[aria-invalid="true"] {
  border-color: #ad3232;
}
progress {
  width: 100%;
  height: 8px;
}
.help {
  max-width: 980px;
  margin: 38px 0;
  border-top: 1px solid var(--pp-border);
  padding-top: 24px;
}
.help h2 {
  margin-top: 24px;
  font-size: 18px;
}
.help p {
  color: var(--pp-muted);
  font-size: 14px;
}
.print-root {
  display: none;
}
.site-footer {
  margin-top: 32px;
}
@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 16px;
  }
  .setup-panel,
  .preview-panel {
    padding: 18px;
  }
  .output-bar {
    flex-direction: column;
  }
  .primary-downloads {
    max-width: 100%;
    justify-content: flex-start;
  }
  .history-actions {
    margin-left: 0;
  }
}
@media (max-width: 760px) {
  main {
    padding: 18px 14px;
  }
  header .site-header-inner {
    padding-inline: 14px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .workspace > * {
    width: 100%;
  }
  .setup-panel {
    padding: 18px;
  }
  .preview-panel {
    padding: 14px;
  }
  #controls {
    gap: 14px 12px;
  }
  .intro {
    margin-bottom: 16px;
  }
  .intro p {
    font-size: 15px;
  }
  .preview-scroll {
    min-height: 300px;
    height: 450px;
    padding: 14px;
  }
  .preview-toolbar {
    gap: 5px;
  }
  .preview-toolbar button {
    min-height: 44px;
    padding: 8px 10px;
  }
  .history-actions {
    border-left: 0;
    border-top: 1px solid #e4e9e0;
    padding: 8px 0 0;
    width: 100%;
  }
  .primary-downloads {
    width: 100%;
  }
  .primary-downloads button {
    flex: 1;
  }
  .secondary-downloads {
    display: grid;
    grid-template-columns: 1fr;
  }
  #order-list,
  #artwork-list {
    grid-template-columns: 1fr;
  }
  .workspace-jumps {
    position: sticky;
    top: 66px;
    z-index: 2;
    padding: 8px 0;
    background: var(--pp-paper);
  }
  .workspace-jumps a {
    flex: 1;
    padding: 10px 5px;
    text-align: center;
  }
  .compact-table,
  .compact-table tbody {
    display: block;
  }
  .compact-table thead {
    display: none;
  }
  .compact-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
    gap: 10px;
    border-bottom: 2px solid #b9c9b9;
  }
  .compact-table td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .compact-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
  }
  .compact-table td:first-child,
  .compact-table td:last-child {
    grid-column: 1/-1;
  }
  .compact-table td:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .compact-table td:first-child::before {
    margin: 0;
  }
  .compact-table td:last-child::before {
    display: none;
  }
  .compact-table input,
  .compact-table textarea {
    min-width: 0 !important;
  }
  .compact-table tr:nth-child(even) td {
    background: transparent;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  body:has(> .print-root) > *:not(.print-root) {
    display: none !important;
  }
  .print-root {
    display: block !important;
  }
  .print-page {
    width: var(--print-width);
    height: var(--print-height);
    break-after: page;
    margin: 0;
    overflow: hidden;
  }
  .print-page:last-child {
    break-after: auto;
  }
  .print-page canvas {
    display: block;
    width: 100%;
    height: 100%;
  }
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }
}
