:root {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #242424;
  background: #f8f8f6;
  font-synthesis: none;
  --red: #d92d20;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #df8e4f;
  outline-offset: 3px;
}
.shop-header {
  max-width: 1260px;
  margin: auto;
  padding: 31px 42px 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.shop-header > div {
  display: flex;
  align-items: baseline;
  gap: 27px;
}
h1 {
  font-size: 27px;
  letter-spacing: -1px;
  margin: 0;
  font-weight: 850;
  white-space: nowrap;
}
.brand-dot {
  color: var(--red);
  font-family: Arial;
  font-size: 41px;
  line-height: 0;
  margin-left: 2px;
}
.shop-header p {
  font-size: 12px;
  color: #777;
  margin: 0;
}
.demo {
  font-size: 10px;
  color: #666;
  border: 1px solid #bfc0bd;
  padding: 4px 8px;
  white-space: nowrap;
}
.workbench {
  width: min(1176px, calc(100% - 84px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  border-top: 2px solid #282828;
  border-bottom: 1px solid #d6d6d2;
  background: #fff;
  min-height: 704px;
}
.editor {
  padding: 25px 24px;
  border-right: 1px solid #d8d8d5;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 23px;
}
.section-heading h2,
.desk-toolbar h2 {
  font-size: 16px;
  margin: 0;
}
.section-heading > span {
  font:
    10px Arial,
    sans-serif;
  letter-spacing: 1px;
  color: #9a9a98;
}
form > label,
.price-unit label {
  display: block;
  font-size: 12px;
  margin: 0 0 7px;
  font-weight: 600;
}
label small {
  font-size: 10px;
  color: #93938f;
  float: right;
  font-weight: 400;
}
input:not([type="radio"]) {
  width: 100%;
  min-width: 0;
  border: 1px solid #d1d1ce;
  border-radius: 0;
  background: white;
  padding: 10px;
  color: #242424;
  font-size: 14px;
  height: 39px;
  margin-bottom: 18px;
}
input:not([type="radio"]):focus {
  border-color: #333;
  outline: 2px solid #eee;
  outline-offset: 0;
}
.price-unit {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 12px;
}
#price {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 19px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 2px 0 0;
}
legend {
  font-size: 12px;
  font-weight: bold;
  padding: 0;
  margin-bottom: 10px;
}
.style-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.style-options label {
  position: relative;
  cursor: pointer;
}
.style-options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.style-options span {
  display: block;
  border: 1px solid #d3d3ce;
  border-right: 0;
  text-align: center;
  padding: 9px 3px;
  font-size: 12px;
}
.style-options label:last-child span {
  border-right: 1px solid #d3d3ce;
}
.style-options input:checked + span {
  background: #272727;
  color: white;
  border-color: #272727;
}
.style-options input:focus-visible + span {
  outline: 3px solid #df8e4f;
  outline-offset: 3px;
  position: relative;
}
.field-note {
  font-size: 10px;
  color: #858581;
  margin: 10px 0 23px;
  line-height: 1.7;
  min-height: 17px;
}
.preview-caption {
  font-size: 10px;
  color: #73736d;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
}
.preview-caption span {
  font:
    10px Arial,
    sans-serif;
}
.live-preview {
  width: 100%;
  aspect-ratio: 80/45;
  background: white;
  overflow: hidden;
}
.live-preview .price-tag {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.live-preview .tag-name {
  font-size: 20px;
}
.live-preview .tag-price strong {
  font-size: 31px;
}
.live-preview .tag-price .currency {
  font-size: 15px;
}
.live-preview .tag-price .unit {
  font-size: 10px;
}
.live-preview .tag-spec {
  font-size: 9px;
}
.live-preview .tag-main {
  padding: 12px;
}
.live-preview .tag-price {
  padding: 8px;
}
.live-preview .price-tag.large .tag-name {
  font-size: 18px;
}
.live-preview .price-tag.large .tag-price strong {
  font-size: 44px;
}
.live-preview .price-tag.sale .sale-banner {
  font-size: 9px;
  padding: 4px 8px;
}
.live-preview .price-tag.sale .tag-name {
  font-size: 17px;
}
.live-preview .price-tag.sale .tag-price strong {
  font-size: 35px;
}
.validation {
  min-height: 16px;
  color: #bd281e;
  font-size: 11px;
  margin: 8px 0;
  line-height: 1.5;
}
.primary {
  display: block;
  width: 100%;
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  padding: 11px 6px;
  font-size: 13px;
  font-weight: bold;
}
.primary:hover {
  background: #b9281e;
}
.cancel-edit {
  width: 100%;
  background: white;
  color: #666;
  border: 0;
  padding: 12px 0 0;
  font-size: 11px;
}
.local-note {
  font-size: 10px;
  line-height: 1.9;
  color: #93938d;
  margin: 18px 0 0;
}
.desk {
  background: #eaeae7;
  padding: 24px 34px 21px;
  min-width: 0;
}
.desk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 23px;
}
.desk-toolbar > div {
  display: flex;
  align-items: center;
  gap: 16px;
}
.desk-toolbar > div > span {
  font-size: 11px;
  color: #777;
}
.desk-toolbar button {
  border: 1px solid #252525;
  background: #252525;
  color: white;
  font-size: 12px;
  padding: 9px 13px;
  display: flex;
  gap: 13px;
  align-items: center;
  white-space: nowrap;
}
.desk-toolbar button:hover {
  background: #464646;
}
.desk-toolbar button:disabled {
  opacity: 0.45;
  cursor: default;
}
.desk-toolbar svg {
  width: 17px;
  height: 17px;
}
.ruler {
  display: flex;
  justify-content: space-between;
  padding: 0 0 13px;
  height: 27px;
  position: relative;
  color: #777;
  font:
    9px Consolas,
    monospace;
  margin: 0 auto;
  width: 100%;
  max-width: 690px;
}
.ruler:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, #aaa 0 1px, transparent 1px 5px);
  border-bottom: 1px solid #aaa;
}
.paper {
  width: 100%;
  max-width: 690px;
  min-height: 530px;
  margin: 9px auto 0;
  background: #fff;
  padding: 30px;
  box-shadow: 0 2px 8px #0000000d;
  position: relative;
}
.print-sheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px 16px;
}
.label-cell {
  min-width: 0;
}
.price-tag {
  border: 2px solid #242424;
  background: #fff;
  aspect-ratio: 80/45;
  display: flex;
  position: relative;
  overflow: hidden;
  min-width: 0;
  color: #202020;
}
.tag-main {
  padding: 17px 12px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tag-name {
  font-size: 24px;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag-spec {
  font-size: 10px;
  color: #626262;
  line-height: 1.5;
  margin-top: 9px;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag-price {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-content: center;
  background: var(--red);
  color: white;
  padding: 10px 8px;
  width: 43%;
  text-align: center;
  flex-shrink: 0;
  min-width: 0;
}
.tag-price strong {
  font-family: Arial, sans-serif;
  font-size: 34px;
  letter-spacing: -1.4px;
  line-height: 1.1;
  white-space: nowrap;
}
.tag-price .currency {
  font-size: 16px;
  font-family: Arial, sans-serif;
  align-self: center;
  margin-right: 3px;
}
.tag-price .unit {
  display: block;
  width: 100%;
  font-size: 10px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.tag-price.long-price strong {
  font-size: 24px;
  letter-spacing: -1px;
}
.tag-price.long-price .currency {
  font-size: 12px;
  margin-right: 1px;
}
.price-tag.large {
  display: grid;
  grid-template-rows: 34% 66%;
  padding: 9px 12px;
}
.price-tag.large .tag-main {
  padding: 0;
  justify-content: start;
}
.price-tag.large .tag-name {
  font-size: 22px;
  line-height: 1.2;
  -webkit-line-clamp: 1;
}
.price-tag.large .tag-spec {
  display: none;
}
.price-tag.large .tag-price {
  padding: 0;
  background: #fff;
  color: #202020;
  width: 100%;
  justify-content: flex-start;
  align-content: center;
  flex-wrap: nowrap;
  align-items: baseline;
}
.price-tag.large .tag-price strong {
  font-size: 57px;
  letter-spacing: -2px;
}
.price-tag.large .tag-price .currency {
  font-size: 24px;
  align-self: baseline;
  margin-right: 4px;
}
.price-tag.large .tag-price .unit {
  width: auto;
  margin-left: 5px;
  font-size: 11px;
  margin-top: 0;
}
.price-tag.large .tag-price.long-price strong {
  font-size: 41px;
}
.price-tag.sale {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 22% 78%;
  border-color: var(--red);
}
.sale-banner {
  grid-column: 1/-1;
  background: var(--red);
  color: white;
  font-size: 10px;
  letter-spacing: 2px;
  padding: 5px 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sale-banner small {
  font:
    8px Arial,
    sans-serif;
  letter-spacing: 1px;
}
.price-tag.sale .tag-main {
  padding: 10px;
}
.price-tag.sale .tag-name {
  font-size: 23px;
}
.price-tag.sale .tag-price {
  width: 100%;
  padding: 9px 5px;
  background: white;
  color: var(--red);
}
.price-tag.sale .tag-price strong {
  font-size: 39px;
}
.price-tag.sale .tag-price.long-price strong {
  font-size: 26px;
}
.cell-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding-top: 8px;
}
.cell-actions button {
  border: 0;
  background: none;
  color: #85857d;
  padding: 1px 0;
  font-size: 10px;
}
.cell-actions button:hover {
  color: #d92d20;
  text-decoration: underline;
}
.label-cell.is-editing .price-tag {
  outline: 2px solid #e8894f;
  outline-offset: 4px;
}
.paper-caption {
  text-align: center;
  font-size: 9px;
  letter-spacing: 1px;
  color: #b4b4ae;
  margin: 30px 0 0;
}
.desk-tip {
  color: #87877e;
  font-size: 10px;
  margin: 18px 0 0;
  line-height: 1.8;
}
.empty-sheet {
  text-align: center;
  padding: 90px 15px;
  color: #92928b;
}
.empty-sheet > span {
  font-size: 43px;
  font-weight: 200;
  color: #b9b9b1;
}
.empty-sheet h3 {
  font-size: 16px;
  color: #65655f;
  font-weight: 500;
}
.empty-sheet p {
  font-size: 12px;
  line-height: 1.8;
}
footer {
  width: min(1176px, calc(100% - 84px));
  margin: 0 auto;
  padding: 19px 0 25px;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 10px;
  color: #92928b;
}
footer a {
  color: #666;
  text-decoration: none;
}
footer p {
  margin: 0;
  flex: 1;
}
footer button {
  border: 0;
  background: none;
  color: #777;
  font-size: 10px;
  padding: 5px 0;
}
@media (max-width: 1050px) {
  .shop-header {
    padding: 25px 25px;
  }
  .shop-header > div {
    display: block;
  }
  .shop-header p {
    margin-top: 8px;
  }
  .workbench {
    width: calc(100% - 50px);
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .editor {
    padding: 23px 20px;
  }
  .desk {
    padding: 24px;
  }
  .desk-toolbar > div {
    display: block;
  }
  .desk-toolbar > div > span {
    display: block;
    margin-top: 6px;
  }
  .paper {
    padding: 22px;
    min-height: 530px;
  }
  .print-sheet {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: auto;
  }
  .tag-name {
    font-size: 27px;
  }
  .tag-price strong {
    font-size: 42px;
  }
  footer {
    width: calc(100% - 50px);
  }
}
@media (max-width: 670px) {
  .shop-header {
    padding: 25px 18px 21px;
    gap: 8px;
  }
  h1 {
    font-size: 22px;
    letter-spacing: -0.7px;
  }
  .brand-dot {
    font-size: 30px;
  }
  .shop-header p {
    font-size: 10px;
  }
  .demo {
    font-size: 9px;
    padding: 4px 5px;
  }
  .workbench {
    width: calc(100% - 28px);
    display: block;
  }
  .editor {
    border-right: 0;
    padding: 22px 21px;
  }
  .section-heading {
    margin-bottom: 20px;
  }
  .editor form {
    display: block;
  }
  .live-preview {
    max-width: 290px;
    margin: 0 auto;
  }
  .live-preview .tag-name {
    font-size: 23px;
  }
  .live-preview .tag-price strong {
    font-size: 36px;
  }
  .live-preview .tag-price.long-price strong {
    font-size: 27px;
  }
  .live-preview .price-tag.large .tag-price.long-price strong {
    font-size: 37px;
  }
  .field-note {
    margin-bottom: 20px;
  }
  .preview-caption {
    max-width: 290px;
    margin: 0 auto 9px;
  }
  .primary {
    padding: 13px;
  }
  .local-note {
    margin-top: 13px;
  }
  .desk {
    padding: 22px 16px 20px;
    border-top: 1px solid #d5d5ce;
  }
  .paper {
    padding: 25px 19px;
    min-height: 430px;
  }
  .desk-toolbar {
    margin-bottom: 18px;
  }
  .desk-toolbar button {
    padding: 10px;
  }
  .tag-name {
    font-size: 25px;
  }
  .tag-price strong {
    font-size: 38px;
  }
  .print-sheet {
    gap: 23px;
  }
  .paper-caption {
    margin-top: 25px;
  }
  footer {
    width: calc(100% - 36px);
    flex-wrap: wrap;
    gap: 15px;
    font-size: 10px;
  }
  footer p {
    order: 3;
    width: 100%;
    flex: auto;
    line-height: 1.7;
  }
  footer button {
    margin-left: auto;
  }
  .live-preview .price-tag.sale .tag-price.long-price strong {
    font-size: 25px;
  }
}
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    min-width: 0 !important;
  }
  .shop-header,
  .editor,
  .desk-toolbar,
  .ruler,
  .desk-tip,
  footer,
  .paper-caption,
  .cell-actions,
  .empty-sheet {
    display: none !important;
  }
  .workbench,
  .desk,
  .paper {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .print-sheet {
    display: grid !important;
    grid-template-columns: 80mm 80mm !important;
    gap: 5mm 10mm !important;
    justify-content: center !important;
    max-width: none !important;
    margin: 0 !important;
  }
  .label-cell {
    break-inside: avoid;
    page-break-inside: avoid;
    width: 80mm;
    height: 45mm;
  }
  .price-tag {
    width: 80mm;
    height: 45mm;
    aspect-ratio: auto;
    border-width: 0.5mm;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    outline: none !important;
  }
  .tag-main {
    padding: 4mm;
  }
  .tag-name {
    font-size: 21pt;
  }
  .tag-spec {
    font-size: 8pt;
  }
  .tag-price strong {
    font-size: 29pt;
  }
  .tag-price .currency {
    font-size: 14pt;
  }
  .tag-price .unit {
    font-size: 9pt;
  }
  .tag-price.long-price strong {
    font-size: 23pt;
  }
  .price-tag.large .tag-price strong {
    font-size: 48pt;
  }
  .price-tag.large .tag-price.long-price strong {
    font-size: 35pt;
  }
  .price-tag.sale .tag-price strong {
    font-size: 33pt;
  }
  .price-tag.sale .tag-price.long-price strong {
    font-size: 23pt;
  }
  .price-tag.sale .tag-name {
    font-size: 20pt;
  }
  .sale-banner {
    font-size: 9pt;
  }
  .sale-banner small {
    font-size: 7pt;
  }
  .price-tag.large .tag-name {
    font-size: 20pt;
  }
}
/* Longer inputs keep their full text inside the physical label. */
.price-tag.long-name .tag-name,
.live-preview .price-tag.long-name .tag-name {
  font-size: 15px;
  -webkit-line-clamp: 4;
  line-height: 1.25;
}
.price-tag.large.long-name {
  grid-template-rows: 43% 57%;
}
.price-tag.large.long-name .tag-name,
.live-preview .price-tag.large.long-name .tag-name {
  font-size: 15px;
  -webkit-line-clamp: 2;
}
.price-tag.large.long-name .tag-price strong {
  font-size: 46px;
}
.price-tag .tag-price.long-price strong,
.live-preview .price-tag .tag-price.long-price strong {
  font-size: 18px;
  letter-spacing: -0.7px;
}
.price-tag .tag-price.long-price .currency {
  width: 100%;
  font-size: 12px;
  margin: 0 0 3px;
}
.price-tag.large .tag-price.long-price strong,
.live-preview .price-tag.large .tag-price.long-price strong {
  font-size: 35px;
}
.price-tag.large .tag-price.long-price .currency {
  width: auto;
  margin: 0 4px 0 0;
  font-size: 17px;
}
.price-tag.sale .tag-price.long-price strong,
.live-preview .price-tag.sale .tag-price.long-price strong {
  font-size: 21px;
}
@media print {
  .price-tag.long-name .tag-name {
    font-size: 12pt;
  }
  .price-tag.large.long-name .tag-name {
    font-size: 12pt;
  }
  .price-tag.large.long-name .tag-price strong {
    font-size: 38pt;
  }
  .price-tag .tag-price.long-price strong {
    font-size: 19pt;
  }
  .price-tag.sale .tag-price.long-price strong {
    font-size: 19pt;
  }
  .price-tag.large .tag-price.long-price strong {
    font-size: 32pt;
  }
}
