.skip-link {
  position: absolute;
  z-index: 3;
  inset: 1rem auto auto 1rem;
  padding: .7rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }
.detail-main a:focus-visible, .detail-main button:focus-visible, .site-header a:focus-visible, footer a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.detail-main { max-width: 72rem; margin: 0 auto; padding: 2rem 6% 4rem; }
.detail-breadcrumb { margin: 0 0 1.75rem; font-size: .85rem; }
.detail-breadcrumb ol { display: flex; flex-wrap: wrap; gap: .45rem .7rem; margin: 0; padding: 0; list-style: none; }
.detail-breadcrumb li + li::before { content: "/"; display: inline-block; color: var(--muted); margin-right: .7rem; }
.detail-breadcrumb a, .detail-back { text-decoration: underline; text-underline-offset: .18em; }

.detail-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; }
.detail-copy h1 { font-size: clamp(2.25rem, 5.2vw, 4.25rem); letter-spacing: -.04em; margin: .9rem 0 1rem; overflow-wrap: anywhere; }
.detail-intro { font-size: 1rem; line-height: 1.7; max-width: 35rem; margin-bottom: 1.2rem; }
.detail-sample { padding: .95rem 1rem 1.1rem; max-width: 35rem; border-left: 3px solid var(--red); background: #f3ebe0; }
.detail-sample-label { margin: 0; font-size: .85rem; color: #4a5c52; }
.detail-note { margin: .4rem 0 .8rem; line-height: 1.5; color: #495a50; font-size: .925rem; }
.detail-purchase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem 1rem;
  max-width: 35rem;
  margin-bottom: 1rem;
  padding: .7rem .9rem;
  border: 1px solid #bdc8b9;
  border-radius: var(--radius);
  background: #edf1e8;
}
.detail-purchase[hidden] { display: none; }
.detail-purchase [hidden] { display: none; }
.detail-purchase [data-offer-price] { font-size: 1.05rem; }
.detail-purchase [data-offer-label] { color: var(--muted); font-size: .8125rem; }
.detail-purchase .buy-now {
  justify-content: center;
  min-width: 6.15rem;
  min-height: 44px;
  padding: .65rem .8rem;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  cursor: pointer;
}
.detail-purchase .buy-now:disabled { opacity: .65; cursor: default; }
.detail-purchase .buy-feedback { font-size: .8125rem; line-height: 1.35; color: #71332b; overflow-wrap: anywhere; }
.detail-purchase .buy-feedback:not(:empty) { margin-top: .35rem; }
.detail-copy:has(.detail-purchase:not([hidden])) .detail-sample .button.dark {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}
.detail-copy:has(.detail-purchase:not([hidden])) .detail-sample .button.dark:hover { background: #e9eee5; }
.detail-visual {
  --stage: #e8dacc;
  --stage-highlight: #f3e7d6;
  --stage-border: #d6c4af;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: clamp(17rem, 31vw, 24rem);
  margin: 0;
  padding: clamp(1.35rem, 4vw, 2.75rem);
  overflow: hidden;
  border: 1px solid var(--stage-border);
  border-radius: .4rem;
  background: radial-gradient(ellipse at 27% 19%, var(--stage-highlight), transparent 73%), var(--stage);
}

.detail-visual--mid-autumn-moon-festival { --stage: #d8ab91; --stage-highlight: #f2d3b3; --stage-border: #c9957c; }
.detail-visual--mandarin-numbers { --stage: #c6d1bf; --stage-highlight: #e7e9d8; --stage-border: #b6c4b0; }
.detail-visual--lantern-riddle-night { --stage: #b77761; --stage-highlight: #e2aa8b; --stage-border: #a66550; }
.detail-visual--chinese-paper-cutting-studio { --stage: #cf9a8c; --stage-highlight: #edc6a9; --stage-border: #ab766a; }
.detail-visual--chinese-idiom-studio { --stage: #c1cdbb; --stage-highlight: #e5e4d1; --stage-border: #aab9a5; }
.detail-visual--solar-terms-journal { --stage: #d3cfad; --stage-highlight: #eee5c9; --stage-border: #c5bf9e; }
.detail-visual--chinese-color-studio { --stage: #a8b6ad; --stage-highlight: #dce2d7; --stage-border: #98a99c; }
.detail-visual--chinese-character-studio { --stage: #d9b79b; --stage-highlight: #ecd7bf; --stage-border: #c9a98e; }

.detail-visual--image { gap: .7rem; padding-block: clamp(1.35rem, 3vw, 2rem) 1.2rem; }
.detail-preview-frame {
  padding: .35rem;
  max-width: 100%;
  background: #fff9ef;
  border: 1px solid rgb(72 44 36 / 22%);
  box-shadow: 0 1rem 2rem rgb(55 35 22 / 15%), 0 .2rem .4rem rgb(55 35 22 / 12%);
}
.detail-preview-frame img { display: block; width: auto; height: auto; max-width: 100%; max-height: 23rem; }
.detail-visual figcaption {
  color: #382e26;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 1rem;
  background: #f8eedb;
}

.detail-paper {
  position: relative;
  min-width: 0;
  background: #fff9ed;
  border: 1px solid rgb(89 65 45 / 28%);
  border-radius: .2rem;
  box-shadow: 0 .9rem 1.9rem rgb(55 35 22 / 16%), 0 .2rem .45rem rgb(55 35 22 / 12%);
}
.detail-visual [lang="zh-Hans"] { font-family: var(--font-cjk); }
.detail-card-pair { display: grid; width: min(100%, 20rem); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.detail-card-pair > :first-child { transform: translate(.2rem, -.55rem) rotate(-7deg); }
.detail-card-pair > :last-child { transform: translate(-.15rem, .55rem) rotate(6deg); }
.detail-word-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .25rem;
  min-height: clamp(9rem, 15vw, 12rem);
  padding: .7rem;
  border-top: .34rem solid #9f433e;
  text-align: center;
}
.detail-word-card:last-child { border-top-color: #306252; background: #edf0df; }
.detail-word-card > span { color: #963a35; font-size: clamp(3rem, 6.4vw, 5rem); line-height: 1.15; }
.detail-word-card:last-child > span { color: #254e43; }
.detail-word-card b { font-family: var(--font-serif); font-size: 1.032rem; }
.detail-word-card small, .detail-idiom-card small { color: #536459; font-size: .75rem; line-height: 1.4; }

.detail-idiom-card {
  display: grid;
  align-content: center;
  gap: .44rem;
  min-height: clamp(8.75rem, 14vw, 11.25rem);
  padding: .8rem .65rem;
  text-align: center;
}
.detail-idiom-card:last-child { background: #e8efe4; }
.detail-idiom-card > span { font-size: clamp(1.2rem, 2vw, 1.7rem); color: #863b36; }
.detail-idiom-card:last-child > span { color: #284e44; }
.detail-idiom-card p { padding-top: .45rem; border-top: 1px solid #d6cbbb; font-size: .72rem; line-height: 1.4; }

.detail-visual--tang-poetry-studio {
  --stage-border: #274348;
  background: radial-gradient(ellipse at 80% 25%, #4c6664, transparent 70%), #203d45;
}
.detail-visual--tang-poetry-studio::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 13%;
  right: 8%;
  width: clamp(4.6rem, 11vw, 7.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f4ddb0;
  box-shadow: 0 0 1.7rem rgb(242 215 172 / 22%);
}
.detail-poem {
  display: grid;
  gap: .85rem;
  width: min(82%, 16rem);
  padding: clamp(1rem, 3vw, 1.75rem);
  transform: translateX(-5%) rotate(-3deg);
}
.detail-poem b { color: #963b35; font-size: .92rem; }
.detail-poem p { font-size: clamp(1.1rem, 2.1vw, 1.75rem); line-height: 1.65; white-space: nowrap; }
.detail-poem small { color: #5b5247; font-size: .69rem; line-height: 1.4; }

.detail-notebook {
  width: min(100%, 16rem);
  padding: 1rem 1.05rem 1.2rem 1.35rem;
  border-left: .35rem solid #6c7d4f;
  transform: rotate(-4deg);
}
.detail-notebook-date { color: #59614a; font-size: .72rem; }
.detail-notebook-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; margin: .55rem 0 .95rem; }
.detail-notebook-title b { color: #435735; font-size: clamp(1.65rem, 3.3vw, 2.4rem); }
.detail-notebook-title span { font: .95rem var(--font-serif); }
.detail-notebook p { font-size: .75rem; font-weight: 600; }
.detail-notebook-lines {
  min-height: 3.7rem;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(1.25rem - 1px), #cdd0b8 calc(1.25rem - 1px) 1.25rem);
}

.detail-palette { width: min(100%, 20rem); padding: 1.1rem .85rem .85rem; }
.detail-palette-title { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .35rem .7rem; margin-bottom: .85rem; }
.detail-palette-title b { font: 1.08rem var(--font-serif); }
.detail-palette-title span { color: #36584d; font-size: .85rem; }
.detail-swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.detail-swatches span { min-width: 0; }
.detail-swatches span::before {
  content: "";
  display: block;
  height: clamp(3rem, 8vw, 5.4rem);
  background: var(--swatch);
  border-block: 1px solid rgb(54 52 36 / 14%);
}
.detail-swatches code { display: block; padding-block: .32rem; font-size: clamp(.5rem, 1vw, .66rem); text-align: center; }

.detail-practice { width: min(100%, 19rem); padding: .85rem clamp(.7rem, 2.6vw, 1.15rem) 1.1rem; }
.detail-practice-title { display: flex; align-items: baseline; gap: .55rem; margin-bottom: .55rem; }
.detail-practice-title span { color: #8f3d37; font-size: 1.3rem; }
.detail-practice-title b { font: .88rem var(--font-serif); }
.detail-practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #b98170; }
.detail-practice-grid > div {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: linear-gradient(90deg, transparent calc(50% - .5px), #d5ae9e calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
              linear-gradient(0deg, transparent calc(50% - .5px), #d5ae9e calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px));
}
.detail-practice-grid > div + div { border-left: 1px solid #b98170; }
.detail-practice-grid span { color: #303a2f; font-size: clamp(1.75rem, 4vw, 3.3rem); line-height: 1; }
.detail-practice-grid > :nth-child(2) span { color: #c3a091; }

.detail-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-block: 1px solid var(--line); margin: 2.3rem 0; padding: 1.2rem 0; }
.detail-facts dt { color: var(--muted); font-size: .8rem; font-weight: bold; }
.detail-facts dd { margin: .35rem 0 0; line-height: 1.45; }
.detail-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.detail-guide h2, .detail-related h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: -.025em; margin: 0 0 .7rem; }
.detail-guide p, .detail-guide ul { margin: 0; line-height: 1.7; }
.detail-guide ul { padding-left: 1.2rem; }
.detail-fulfillment { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.detail-fulfillment p + p { margin-top: .65rem; }
.detail-fulfillment a { text-decoration: underline; text-underline-offset: .18em; }
.detail-back { display: inline-block; margin-top: 2rem; }

.detail-related { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.detail-related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.detail-related li { min-width: 0; padding: .95rem 1rem; background: #f5eee2; border: 1px solid var(--line); }
.detail-related a { display: inline-flex; align-items: center; min-height: 44px; font-weight: bold; text-decoration: underline; text-underline-offset: .18em; }
.detail-related span { display: block; color: var(--muted); font-size: .875rem; line-height: 1.5; }

@media (max-width: 700px) {
  .detail-hero, .detail-guide, .detail-related ul { grid-template-columns: minmax(0, 1fr); }
  .detail-visual { min-height: 15rem; }
  .detail-preview-frame img { max-height: min(56vh, 20rem); }
  .detail-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.detail-siblings { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.detail-siblings .detail-back { margin: 0; font-size: .85rem; }
.detail-sibling { display: grid; gap: .2rem; padding: .5rem 0; min-height: 44px; }
.detail-sibling small { font-size: var(--fs-label); font-weight: bold; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.detail-sibling span { font: 1.1rem/1.3 var(--font-serif); }
.detail-sibling:hover span { color: var(--red); }
.detail-sibling--next { text-align: right; }
@media (max-width: 700px) {
  .detail-siblings { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .detail-siblings .detail-back { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

.detail-breadcrumb { font-size: .875rem; }
.detail-breadcrumb ol { row-gap: 0; }

/* Product page polish */
.detail-breadcrumb li { display: inline-flex; align-items: center; min-height: var(--tap); }
.detail-back { display: inline-flex; align-items: center; min-height: var(--tap); }
.detail-sample .actions { gap: .6rem; margin: .85rem 0 1rem; }

/* Illustrated covers on product and collection pages */
.detail-visual--cover {
  display: block;
  min-height: 0;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: .5rem;
  background: #e8dacc;
  box-shadow: 0 1.2rem 2.6rem rgb(55 35 22 / 16%), 0 .2rem .5rem rgb(55 35 22 / 10%);
}
.detail-cover { display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-visual--cover .detail-page {
  position: absolute;
  right: 5%;
  bottom: 7%;
  width: 30%;
  height: auto;
  padding: .3rem;
  background: #fffaf0;
  border: 1px solid rgb(72 44 36 / 22%);
  box-shadow: 0 .9rem 1.8rem rgb(30 20 12 / 30%), 0 .15rem .35rem rgb(30 20 12 / 18%);
  transform: rotate(4deg);
}
.detail-visual--cover figcaption { position: absolute; left: 4%; bottom: 5%; box-shadow: 0 .3rem .8rem rgb(30 20 12 / 18%); }

/* Listing essentials: collection kicker, quick facts, look inside, questions, mobile buy bar */
.detail-kicker { margin: 0; font-size: var(--fs-label); font-weight: bold; letter-spacing: .12em; text-transform: uppercase; }
.detail-kicker a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--red); text-decoration: none; }
.detail-kicker a:hover { text-decoration: underline; text-underline-offset: .2em; }
.detail-copy .detail-kicker + h1 { margin-top: 0; }
.detail-badges { display: flex; flex-wrap: wrap; gap: .45rem; max-width: 35rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.detail-badges li { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: var(--fs-small); line-height: 1.4; }
.detail-badges li::before { content: "✓"; margin-right: .35rem; color: #4f7a55; font-weight: bold; }
.detail-trust { flex-basis: 100%; margin: 0; color: var(--muted); font-size: var(--fs-small); }

.look-inside { margin-top: 3rem; }
.look-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.25rem; margin-bottom: 1.1rem; }
.look-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: -.025em; }
.look-head p { flex: 1 1 18rem; margin: 0; color: var(--muted); line-height: 1.5; }
.look-sample { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: bold; color: var(--red); text-decoration: underline; text-underline-offset: .18em; }
.look-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 2vw, 1.4rem); margin: 0; padding: 0; list-style: none; }
.look-grid li { min-width: 0; }
.look-page { display: block; padding: .35rem; background: #fffdf8; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 .6rem 1.4rem rgb(55 35 22 / 10%); transition: transform .2s ease, box-shadow .2s ease; }
.look-page:hover, .look-page:focus-visible { transform: translateY(-3px); box-shadow: 0 1rem 2rem rgb(55 35 22 / 16%); }
.look-page img { display: block; width: 100%; height: auto; }
.look-grid span { display: block; margin-top: .55rem; font-size: var(--fs-small); font-weight: bold; color: var(--ink); }

.detail-includes { padding-left: 0 !important; list-style: none; }
.detail-includes li { position: relative; padding-left: 1.6rem; }
.detail-includes li + li { margin-top: .35rem; }
.detail-includes li::before { content: ""; position: absolute; left: .15rem; top: .55em; width: .7rem; height: .7rem; border-radius: 2px; background: var(--red); transform: rotate(45deg) scale(.75); }

.detail-faq { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.detail-faq h2 { margin: 0 0 .5rem; font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: -.025em; }
.detail-faq > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.detail-faq details { border-bottom: 1px solid var(--line); padding: .35rem 0; }
.detail-faq summary { display: flex; align-items: center; min-height: var(--tap); cursor: pointer; font-weight: bold; line-height: 1.4; }
.detail-faq details p { margin: 0 0 .8rem; color: var(--muted); line-height: 1.65; }
.detail-faq a { text-decoration: underline; text-underline-offset: .18em; }

.buy-bar { display: none; }
@media (max-width: 700px) {
  .look-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-faq > div { grid-template-columns: minmax(0, 1fr); }
  .buy-bar:not([hidden]) {
    position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line);
    box-shadow: 0 -.4rem 1rem rgb(30 20 12 / 8%);
  }
  .buy-bar p { display: grid; min-width: 0; margin: 0; font-size: var(--fs-small); line-height: 1.35; }
  .buy-bar strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .buy-bar .button { flex: none; min-height: var(--tap); }
}
@media (prefers-reduced-motion: reduce) {
  .look-page { transition: none; }
  .look-page:hover, .look-page:focus-visible { transform: none; }
}
