:root {
  color-scheme: light;
  --paper: #f7edda;
  --paper-light: #fdf7e9;
  --ink: #302016;
  --muted: #695544;
  --red: #a12720;
  --deep-red: #831c17;
  --line: #d6bd96;
  --gold: #a37947;
  --song: "Songti SC", "Noto Serif CJK SC", "STSong", SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  scroll-padding-top: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% -15%, #fff8e8, transparent 62%);
}
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--deep-red);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; height: auto; }

.masthead, .home, .order, .site-footer {
  width: min(100% - 40px, 1060px);
  margin-inline: auto;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 63px;
  border-bottom: 1px solid var(--gold);
}
.wordmark {
  font: 700 22px/1.15 var(--song);
  color: var(--deep-red);
  text-decoration: none;
}
.mast-link, .text-link {
  color: var(--deep-red);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.mast-link { font-size: 14px; }
h1, h2 { font-family: var(--song); margin: 0; }
h1 { font-size: clamp(2.5rem, 7vw, 4.95rem); font-weight: 800; line-height: 1.12; }
h2 { font-size: clamp(1.65rem, 4.5vw, 2.5rem); line-height: 1.2; }
p { margin: 0; }
.eyebrow {
  margin-bottom: 13px;
  color: var(--deep-red);
  font: 700 .9rem/1.25 var(--song);
  letter-spacing: .085em;
}
.eyebrow span {
  padding-right: .65em;
  margin-right: .42em;
  border-right: 1px solid var(--gold);
}
.hero {
  display: grid;
  gap: 23px;
  border-bottom: 1px solid var(--gold);
  padding-block: 31px 26px;
}
.intro { margin: 13px 0 18px; color: var(--muted); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75em;
  min-height: 47px;
  padding: 10px 17px;
  border: 1px solid var(--red);
  border-radius: 3px;
  font-weight: 700;
  font-size: .94rem;
  line-height: 1.25;
  text-decoration: none;
}
.primary { background: var(--red); color: #fff7e6; }
.primary:hover { background: var(--deep-red); }
.secondary { color: var(--deep-red); background: transparent; }
.secondary:hover { background: #f3e3c9; }
.edition {
  margin-top: 10px;
  font-size: .78rem;
  color: var(--muted);
}
.edition span {
  border-left: 1px solid var(--line);
  padding-left: 9px;
  margin-left: 5px;
}
.hero-art {
  margin: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
}
.hero-art img {
  width: min(100%, 210px);
  border: 1px solid #ac8456;
  box-shadow: 4px 6px 0 #e2cda8, 0 9px 18px #59412625;
}
figcaption { color: var(--muted); font-size: .86rem; }
.section { padding-block: 30px; }
.section-heading { margin-bottom: 19px; }
.section-heading > p:last-child:not(.eyebrow) { margin-top: 9px; color: var(--muted); }

.form-section {
  display: grid;
  border-bottom: 1px solid var(--gold);
}
#pet-form { width: 100%; }
.pet-card {
  position: relative;
  min-width: 0;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 15px 15px;
  margin: 0 0 13px;
}
.pet-card legend { padding-inline: 7px; font-weight: 700; color: var(--deep-red); }
.pet-card label, #code-form label { display: block; margin-top: 8px; font-weight: 650; font-size: .92rem; }
.remove-pet {
  position: absolute;
  top: -19px;
  right: 11px;
  min-height: 35px;
  padding: 4px 8px;
  border: 0;
  background: var(--paper-light);
  color: var(--deep-red);
  font-size: .83rem;
}
.optional, .field-hint { color: var(--muted); font-size: .8rem; font-weight: 400; }
.optional { margin-left: .4rem; }
.field-hint { margin-top: 7px; }
input {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 16px;
}
input[type="file"] { padding: 5px; font-size: .86rem; }
input::file-selector-button {
  border: 1px solid var(--line);
  background: #f3e3c9;
  color: var(--ink);
  padding: 6px 9px;
  margin-right: 8px;
  border-radius: 2px;
}
.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.price { font-weight: 650; }
.price strong { font-size: 1.28em; color: var(--deep-red); }
.notice {
  padding: 10px 12px;
  margin-top: 12px;
  border-left: 3px solid var(--red);
  color: var(--deep-red);
  background: #fae5d6;
}
.samples img { width: min(100%, 750px); margin-bottom: 13px; border: 1px solid var(--line); }

.order { padding-bottom: 26px; }
.order-heading { padding-block: 28px 16px; }
.order-heading h1 { font-size: clamp(2.3rem, 7vw, 4.1rem); }
.order-heading > p:last-of-type:not(.eyebrow) { margin-top: 10px; color: var(--muted); }
.order-heading .button { margin-top: 15px; }
.order-panel {
  margin-top: 8px;
  padding: 18px;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: 580px;
}
.order-panel p:not(.field-hint) { margin-top: 10px; }
.order-panel .button { margin-top: 12px; }
.code-fields { display: flex; gap: 8px; margin-top: 5px; }
.code-fields .button { flex: 0 0 auto; margin-top: 0; }
.code-fields input { margin-top: 0; }
#code-form { margin-top: 13px; }
progress { width: 100%; height: 12px; margin-top: 9px; accent-color: var(--red); }
#progress-panel label { display: flex; justify-content: space-between; gap: 16px; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.result-overview {
  width: min(100%, 660px);
  background: var(--paper-light);
  border: 1px solid var(--line);
  padding: 7px;
  margin: 0;
}
.result-overview img { width: 100%; aspect-ratio: 2808 / 2951; }
.result-overview figcaption, .month-grid figcaption {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 4px 2px;
}
.order .section { border-bottom: 1px solid var(--line); }
.order .section h2 { margin-bottom: 15px; }
.month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.month-grid figure {
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--paper-light);
}
.month-grid img, .annual-image { width: 100%; }
.annual-image { max-width: 370px; aspect-ratio: 3508 / 4961; margin-bottom: 10px; }
.site-footer {
  border-top: 1px solid var(--gold);
  color: var(--muted);
  font: 700 .95rem/1.3 var(--song);
  padding-block: 15px 24px;
}
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: inherit; }

@media (min-width: 690px) {
  .masthead, .home, .order, .site-footer { width: min(100% - 70px, 1060px); }
  .masthead { min-height: 74px; }
  .hero {
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 30px;
    padding: 46px 20px 40px 0;
  }
  .hero-art img { width: min(100%, 350px); }
  .intro { font-size: 1.12rem; }
  .section { padding-block: 39px; }
  .form-section { grid-template-columns: 1fr 1.2fr; gap: 36px; }
  .month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .order-heading { padding-block: 40px 20px; }
}

@media (max-width: 355px) {
  .masthead, .home, .order, .site-footer { width: calc(100% - 28px); }
  .downloads .button { padding-inline: 11px; }
}
