/* ============================================================
 * Fate Cycle — LOOM design system (v2)
 *
 * Tokens are measured from the Pixso comp (prd/原型文.pip, frame "iMac"
 * 1280x3616). Do not invent values: if the comp does not define it, derive
 * it from a value that does.
 *
 * Layout is fluid first. Every block flows and scales; the comp's exact
 * numbers are reproduced at >=1280 where the comp itself was drawn. Nothing
 * on any page is absolutely positioned to a page coordinate, so the same
 * markup serves 320px phones through 4K desktops.
 *
 * Breakpoints: 360 / 480 / 768 (iPad portrait) / 1024 (iPad landscape) /
 * 1280 (the comp).
 * ============================================================ */

:root {
  /* --- surfaces (comp: FRAME "iMac" fill, card "背景" fill) --- */
  --page:        #F7F7F9;
  --card:        #FFFFFF;
  --veil:        rgba(255, 255, 255, 0.60);  /* 说明 card back, op .60 */
  --bar:         rgba(0, 0, 0, 0.90);        /* 我的命格 top bar */
  --footer:      rgba(0, 0, 0, 0.80);        /* footer group, op .80 */
  --scrim:       rgba(0, 0, 0, 0.15);        /* hero cover 遮罩层 */
  --disc:        rgba(0, 0, 0, 0.72);        /* MORE INFO / logo discs */

  /* --- ink --- */
  --ink:         #303030;   /* body + button labels */
  --ink-2:       #555557;   /* active menu item, notice text */
  --ink-3:       #8B8C8F;   /* inactive menu item */
  --ink-4:       #B7B9BD;   /* borders, 命格 label */
  --rule:        #DEDFE0;   /* menu dividers */
  --icon:        #808080;   /* line icons on light */
  --on-dark:     #FFFFFF;
  --on-dark-90:  rgba(255, 255, 255, 0.90);

  /* --- 五色配五行 —— L1《素问·金匮真言论》东方青/南方赤/中央黄/西方白/北方黑.
   * Lives here rather than in oriental.css because the 命格 picker in the top
   * bar is on every page, and only three pages load the traditional layer. */
  --el-wood:   #4E7A5B;   /* 青 */
  --el-fire:   #9E2B25;   /* 赤 · 朱砂 */
  --el-earth:  #B08430;   /* 黄 · 赭 */
  --el-metal:  #8E959C;   /* 白 · 银灰 */
  --el-water:  #2B3440;   /* 玄 */

  /* --- accents --- */
  --gold:        #D59C00;   /* prices, material tags */
  --gold-lt:     #FFB45D;   /* LOOM wordmark */
  --ember:       #E35D00;   /* arrows, fire glyph */
  --clay:        #772B00;   /* primary button */

  /* --- radii (comp corner radii) --- */
  --r-card:      3px;
  --r-btn:       6px;
  --r-img:       8px;
  --r-photo:     6px;
  --r-pill:      12.5px;

  /* --- type --- */
  --ui:    "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
           "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --body:  "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  /* OPPOSans is not web-licensed; PingFang SC matches its Latin advance
   * widths to within 0.5px at 48px, so it leads the fallback stack. */
  --displ: "OPPOSans", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
           -apple-system, "Helvetica Neue", sans-serif;
  --mono-d:"Montserrat", -apple-system, "Helvetica Neue", sans-serif;
  --brand: "Bitter", Georgia, serif;
  --wen:   "Noto Serif SC", "STKaiti", "KaiTi", serif;  /* stand-in for 站酷文艺体 */

  --shadow-menu: 0 1px 3px rgba(0, 0, 0, 0.08);  /* comp: DROP_SHADOW r3 #00000014 */

  /* --- fluid layout ---
   * --gutter is the page margin, --wrap the content column. At >=1280 the
   * column is the comp's 1224 (its card row runs 28 → 1252). */
  --gutter: 16px;
  --wrap:   1224px;
  --bar-h:  44px;      /* the 我的命格 bar — the hero fills the rest of the screen */
  --gap:    16px;      /* rhythm between blocks */
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;   /* iOS must not inflate our type */
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;               /* nothing may cause a sideways scroll */
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
/* Anything that answers a click says so, and anything that will not says that
 * too (Jade, 2026-10-19: 「所有可点击的链接，文字，按钮都使用 cursor:pointer」).
 * Text fields keep the I-beam: that is the honest cursor for somewhere you
 * type, so a label is only given the hand when its control is a choice. */
select, summary, [role="button"], [role="tab"],
label:has(select), label:has(input[type="checkbox"]),
label:has(input[type="radio"]), label:has(input[type="file"]) { cursor: pointer; }
button:disabled, a[aria-disabled="true"], .is-disabled { cursor: not-allowed; }

svg { max-width: 100%; }

/* Cross-page navigation (Jade, 2026-10-15: 「页面之间的转换略显生硬」).
 * A short cross-fade and rise in place of the browser's white cut. Chrome
 * 126+ / Safari 18.2+ honour it; everywhere else the navigation is unchanged. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .2s ease both; }
::view-transition-new(root) { animation: vt-in .36s cubic-bezier(.22, .68, .3, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ============================================================
 * Stage & containers
 * ============================================================ */
.stage { position: relative; width: 100%; margin: 0 auto; background: var(--page); }

/* The content column. Full-bleed elements (hero, bars, footer) sit outside it. */
.wrap {
  position: relative;
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: calc(var(--gutter) + var(--safe-l));
  padding-right: calc(var(--gutter) + var(--safe-r));
}
.section { padding-bottom: clamp(36px, 6vw, 64px); }

/* ------------------------------------------------------------
 * 我的命格 bar — comp y=1, 1280x51, fill #000 @ .90
 * ---------------------------------------------------------- */
.lotbar {
  position: relative;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  height: var(--bar-h);
  padding: 0 calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
  background: var(--bar); color: var(--on-dark);
}
.lotbar__label {
  font-family: var(--wen); font-size: clamp(15px, 3.4vw, 22px); line-height: 1.35;
  color: var(--ink-4); opacity: .80; white-space: nowrap;
}
.lotbar__fire { flex: none; width: 26px; height: 26px; }
.lotbar__name {
  font-family: var(--wen); font-size: clamp(15px, 3.4vw, 22px); line-height: 1.3;
  color: var(--on-dark); white-space: nowrap;
  max-width: 34vw; overflow: hidden; text-overflow: ellipsis;
}
.lotbar__swap { flex: none; width: 24px; height: 24px; }

/* 命格 picker — hover on a pointer, tap on touch (Jade, 2026-09-02) */
.lotpick { position: relative; }
.lotpick .lotbar__name { padding: 4px 2px; cursor: pointer; }
.lotmenu {
  position: absolute; right: -8px; top: calc(100% + 8px); z-index: 30;
  min-width: 244px; padding: 8px;
  background: var(--card); border-radius: var(--r-btn);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.lotpick.is-open .lotmenu, .lotpick:focus-within .lotmenu { opacity: 1; visibility: visible; transform: none; }
/* keeps the pointer from falling through the gap between name and menu */
.lotmenu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.lotmenu__item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 10px; border-radius: 4px; text-align: left;
  transition: background .12s ease;
}
.lotmenu__item:hover { background: var(--page); }
.lotmenu__item.is-on { background: #FFF8E8; }
.lotmenu__glyph {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--page);
}
.el-bg-wood  { background: var(--el-wood); }
.el-bg-fire  { background: var(--el-fire); }
.el-bg-earth { background: var(--el-earth); }
.el-bg-metal { background: var(--el-metal); }
.el-bg-water { background: var(--el-water); }
.lotmenu__who { flex: 1; min-width: 0; }
.lotmenu__who b {
  display: block; font-size: 15px; line-height: 20px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lotmenu__who em {
  display: block; font-style: normal;
  font-size: 12px; line-height: 17px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lotmenu__el { flex: none; font-size: 11px; letter-spacing: .1em; color: var(--ink-4); text-transform: uppercase; }
.lotmenu__empty { margin: 0; padding: 14px 10px; font-size: 13px; color: var(--ink-3); }
.lotmenu__add {
  display: block; margin-top: 4px; padding: 11px 10px;
  border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--gold);
}
.lotbar__fire svg, .lotbar__swap svg, .nav__search svg, .notice__icon svg {
  display: block; width: 100%; height: 100%;
}

/* ------------------------------------------------------------
 * Hero — comp: banner 1280x663 + cover 遮罩层 .15
 *
 * The first screen fills the viewport (Jade, 2026-09-16): the black bar plus
 * the banner come to exactly one screen, so the hero is the viewport height
 * minus the bar. A wider window also gets a taller banner — max() takes the
 * ratio-driven height once it exceeds one screen. The photo is object-fit:
 * cover throughout, so it crops rather than distorts.
 * `svh` keeps mobile browser chrome from pushing the fold off-screen.
 * ---------------------------------------------------------- */
.hero {
  position: relative;
  height: max(calc(100svh - var(--bar-h)), 46vw);
  overflow: hidden;
  display: flex; flex-direction: column;
}
@supports not (height: 100svh) {
  .hero { height: max(calc(100vh - var(--bar-h)), 46vw); }
}
.hero--short { height: clamp(280px, 30vw, 380px); }
.hero--short .hero__scrim { background: rgba(0, 0, 0, 0.38); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; background: var(--scrim); }

/* top nav — comp 顶部menu, y=25 inside the hero */
.nav {
  position: relative; z-index: 4;
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px);
  padding: clamp(14px, 2vw, 25px) calc(var(--gutter) + var(--safe-r))
           0 calc(var(--gutter) + var(--safe-l));
  min-height: 56px;
}
.nav__search { flex: none; width: 26px; height: 26px; opacity: .80; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 3vw, 46px); }
.nav__link {
  font-size: clamp(15px, 1.6vw, 20px); line-height: 1.2;
  color: var(--on-dark-90); white-space: nowrap;
}
.nav__link:hover { color: var(--on-dark); }
/* bag — PRD §3.5, with the count badge */
.nav__cart {
  position: relative; flex: none; margin-left: auto;
  width: 30px; height: 30px; opacity: .9;
}
.nav__cart svg { display: block; width: 100%; height: 100%; }
.nav__cart::after {
  content: attr(data-count);
  position: absolute; right: -6px; top: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--ember); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 17px; text-align: center;
  opacity: 0; transform: scale(.6); transition: opacity .18s ease, transform .18s ease;
}
.nav__cart.has-items::after { opacity: 1; transform: none; }
.nav__cart.is-bump { animation: bump .42s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes bump { 40% { transform: scale(1.28); } }

.nav__logo {
  margin-left: 0; flex: none;
  width: clamp(54px, 6vw, 76px); aspect-ratio: 76 / 75; border-radius: 50%;
  background: var(--disc); display: grid; place-items: center;
}
.nav__logo span {
  font-family: var(--brand); font-weight: 700;
  font-size: clamp(14px, 1.6vw, 20px); line-height: 1.35; color: var(--gold-lt);
}
/* The drawn mark scales with the disc rather than with a fixed SVG width. */
.nav__logo svg { width: 62%; height: auto; overflow: visible; }
/* hamburger — only shown once the links no longer fit */
.nav__burger { display: none; flex: none; width: 30px; height: 30px; margin-left: auto; }
.nav__burger i {
  display: block; height: 2px; border-radius: 1px; background: var(--on-dark);
  margin: 6px 0; transition: transform .2s ease, opacity .2s ease;
}
.nav.is-open .nav__burger i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav.is-open .nav__burger i:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* hero copy — comp Banner图内容 @(80,180) */
.herocopy {
  position: relative; z-index: 3;
  margin-top: auto; margin-bottom: clamp(88px, 12vw, 176px);
  padding: 0 calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
  max-width: 720px;
}
.herocopy h1 {
  margin: 0;
  font-family: var(--displ); font-weight: 500;
  font-size: clamp(23px, 5.2vw, 48px); line-height: 1.3;
  color: var(--on-dark);
}
.herocopy h2 {
  margin: clamp(10px, 2.6vw, 34px) 0 0;
  font-family: var(--mono-d); font-weight: 400;
  font-size: clamp(22px, 4.4vw, 48px); line-height: 1.2;
  color: var(--on-dark); opacity: .89;
}
.herocopy .more {
  position: relative; display: grid; place-items: center;
  margin-top: clamp(20px, 3vw, 38px);
  width: clamp(86px, 9vw, 113px); aspect-ratio: 113 / 117; border-radius: 50%;
  background: var(--disc);
}
.herocopy .more b {
  font-weight: 500; font-size: clamp(14px, 1.5vw, 18px); line-height: 1.17;
  color: var(--on-dark); text-align: center;
}
.herocopy .more i {
  position: absolute; left: 50%; bottom: 22%; translate: -50% 0;
  width: 26px; height: 2px; background: var(--ember);
}
.herocopy .more i::after {
  content: ""; position: absolute; right: -1px; top: -3px;
  width: 8px; height: 8px;
  border-top: 2px solid var(--ember); border-right: 2px solid var(--ember);
  transform: rotate(45deg);
}

/* carousel dots — comp page icons, right edge of the hero */
.dots {
  position: absolute; z-index: 3;
  right: calc(var(--gutter) + var(--safe-r)); top: 50%; translate: 0 -50%;
  display: grid; gap: 15px;
}
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); opacity: .80; }
.dots i:nth-child(2) { background: var(--on-dark); opacity: 1; }

/* page title on the inner pages */
.subhead {
  position: relative; z-index: 3; margin-top: auto;
  padding: 0 calc(var(--gutter) + var(--safe-r)) clamp(24px, 4vw, 40px)
             calc(var(--gutter) + var(--safe-l));
  max-width: 900px;
}
.hero--short .subhead { margin-bottom: clamp(74px, 9vw, 110px); }
.subhead h1 {
  margin: 0; font-family: var(--displ); font-weight: 500;
  font-size: clamp(26px, 5vw, 48px); line-height: 1.25; color: var(--on-dark);
}
.subhead p {
  margin: 8px 0 0; font-family: var(--body);
  font-size: clamp(14px, 1.8vw, 20px); line-height: 1.45; color: rgba(255, 255, 255, .88);
}

/* ------------------------------------------------------------
 * Section menu — comp manu bar, sitting on the hero's lower edge
 * ---------------------------------------------------------- */
/* Jade 2026-09-16 §1: the first screen fills the viewport — header, hero and
 * the section menu all run edge to edge, no gutter, no max width. Content
 * below (grid, copy) keeps its measure and stays centred. */
.menubar {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  width: 100%;
  background: var(--card); box-shadow: var(--shadow-menu);
  display: flex; align-items: center; justify-content: safe center;
  gap: clamp(14px, 3vw, 52px);
  min-height: clamp(56px, 7vw, 95px);
  padding: 0 clamp(12px, 3vw, 83px);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
}
.menubar::-webkit-scrollbar { display: none; }
.hero .menubar { bottom: 0; }
.hero--short .menubar { bottom: 0; }
.menubar a {
  font-size: clamp(13px, 1.6vw, 20px); line-height: 1.2;
  color: var(--ink-3); white-space: nowrap;
}
/* The tab you are on: bold, in the brand brown (Jade, 2026-10-19:
 * 「active 样式用加粗棕色」). */
.menubar a.is-active { color: var(--clay); font-weight: 600; }
/* A vertical divider between the tab titles (Jade, 2026-10-16: 「banner tab
 * 换成竖分隔符」). The comp drew a horizontal hairline here; the active item's
 * own style is unchanged. */
.menubar i { flex: none; width: 1px; height: clamp(14px, 1.8vw, 24px); background: var(--rule); }

/* ------------------------------------------------------------
 * Notice bar — comp 通知 bar 1239x63, white, r6
 * ---------------------------------------------------------- */
.notice {
  display: flex; align-items: center; gap: clamp(12px, 2vw, 31px);
  min-height: clamp(52px, 5vw, 63px);
  margin-top: clamp(18px, 2.7vw, 34px);
  padding: 10px clamp(14px, 3.2vw, 41px);
  background: var(--card); border-radius: var(--r-btn);
}
.notice__icon { flex: none; width: clamp(24px, 2.5vw, 32px); height: clamp(24px, 2.5vw, 32px); }
.notice__text { font-size: clamp(14px, 1.6vw, 20px); line-height: 1.35; color: var(--ink-2); }

/* ------------------------------------------------------------
 * Buttons — comp "view all" / "Look Around" / "Find My"
 * ---------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: clamp(48px, 5vw, 58px); padding: 0 clamp(18px, 2vw, 24px);
  background: var(--page); border: 1px solid var(--ink-4); border-radius: var(--r-btn);
  font-size: clamp(15px, 1.6vw, 20px); line-height: 1.2; color: var(--ink);
  text-align: center;
  transition: background .15s ease;
}
.btn:hover { background: #EFEFF2; }
.btn:has(.btn__arrow) { padding-right: clamp(52px, 6vw, 74px); }
.btn__arrow { position: absolute; top: 50%; height: 1px; background: var(--ink); }
.btn__arrow::after {
  content: ""; position: absolute; right: 0; top: -3.5px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  color: var(--ink); transform: rotate(45deg);
}
.btn--primary {
  background: var(--clay); border-color: var(--ink-4); color: var(--on-dark);
  font-weight: 700; opacity: .89;
}
.btn--primary:hover { opacity: 1; background: var(--clay); }
.btn--primary .btn__arrow { background: var(--on-dark); height: 2px; }
.btn--primary .btn__arrow::after { border-width: 2px; color: var(--on-dark); }

/* the comp's centre-aligned pair below the editorial blocks */
.btnrow {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(14px, 2vw, 83px);
  margin-top: clamp(22px, 3vw, 33px);
}
.btnrow .btn { flex: 1 1 220px; max-width: 342px; }

/* ------------------------------------------------------------
 * Product card — comp 商品card 277x341
 * Comp internals, as flow: image 195, +17 name 38, +9 tags 25, +14 price 24,
 * +19 bottom = 341. Below the comp width every value scales with the card.
 * ---------------------------------------------------------- */
.pcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-card);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
@media (hover: hover) {
  .pcard:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .10); transform: translateY(-2px); }
}
.pcard__media { position: relative; overflow: hidden; container-type: inline-size; }
.pcard__img { width: 100%; aspect-ratio: 276 / 195; object-fit: cover; display: block; }

/* ------------------------------------------------------------
 * Hover — element composition (Jade, 2026-09-17: 「按我图片中的细节来实现，
 * 一点比例不对视觉效果就相差很多」).
 *
 * Measured off her mockup (image 900px wide, same 276:195 aspect as ours) and
 * expressed in container units, so the proportions hold at every card size.
 * Measured on the *visible glyph*, not a bounding box — a water drop fills
 * only ~half of a square icon box, so sizing the box to her glyph width
 * renders the drop visibly too small:
 *   glyph centre 18.7% · glyph ≈10.5% tall · bar 34% → 73% (39% long)
 *   bar height 2.7% · row pitch 16.8% of width (≈24% of image height)
 * Overlay 48% black. The left inset never drops below 48px, her stated floor,
 * which is what governs on the ~288px desktop card.
 * ---------------------------------------------------------- */
.pcard__mix {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  row-gap: 3.8cqw;                         /* 16.8 pitch − 13 icon box */
  padding-left: max(48px, 12.2cqw);        /* box left = glyph centre 18.7 − 6.5 */
  background: rgba(0, 0, 0, .48);
  opacity: 0; transition: opacity .22s ease;
}
@media (hover: hover) { .pcard:hover .pcard__mix { opacity: 1; } }
/* touch has no hover — keyboard focus shows it too */
.pcard:focus-visible .pcard__mix { opacity: 1; }
.pcard__mixrow {
  display: grid; align-items: center;
  grid-template-columns: 13cqw 39cqw;
  column-gap: 8.8cqw;                      /* glyph centre → bar start = 15.3 */
}
.pcard__mixrow .eicon { width: 13cqw; height: 13cqw; }
.pcard__bar {
  display: block; height: max(6px, 2.7cqw);
  border-radius: 999px; background: rgba(255, 255, 255, .82); overflow: hidden;
}
.pcard__bar i { display: block; height: 100%; border-radius: 999px; }
.pcard__name {
  margin: clamp(12px, 1.4vw, 17px) clamp(10px, 3vw, 42px) 0;
  font-size: clamp(13px, 1.3vw, 16px); line-height: 1.2;
  color: var(--ink); text-align: center;
}
.pcard__name em { font-style: normal; }
.pcard__tags {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px clamp(8px, 1.2vw, 15px);
  margin: clamp(8px, 0.8vw, 9px) 10px 0;
}
.pcard__price {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin: clamp(10px, 1.2vw, 14px) 0 clamp(14px, 1.6vw, 19px);
  font-family: var(--body); line-height: 1.5;
}
.pcard__price s { font-size: clamp(12px, 1.1vw, 14px); color: var(--ink-4); }
.pcard__price b { font-size: clamp(15px, 1.4vw, 18px); font-weight: 500; color: var(--gold); }
.tag {
  display: inline-flex; align-items: center;
  min-height: 22px; padding: 0 10px;
  border: 1px solid var(--gold); border-radius: var(--r-pill);
  font-family: var(--body); font-size: clamp(9px, 0.9vw, 10px); line-height: 1.5;
  color: var(--gold); white-space: nowrap;
}
.tag--solid { background: var(--gold); color: var(--on-dark); }
/* material tag carries the element it belongs to */
.tag--mat { gap: 6px; padding: 0 11px; min-height: 26px; font-size: clamp(10px, 1vw, 11.5px); }
.eicon { display: block; flex: none; }

/* the grid the cards live in — 4 up at the comp width, fewer as it narrows */
.grid4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 22vw, 277px), 1fr));
  gap: clamp(14px, 2vw, 24px);
  justify-content: space-between;
}

/* ------------------------------------------------------------
 * Editorial cards — comp 说明1 / 说明2 / 案例
 * ---------------------------------------------------------- */
.editorial {
  position: relative;
  display: grid; align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
  padding: clamp(18px, 2.2vw, 26px);
  margin-top: clamp(20px, 2.6vw, 33px);
  background: var(--veil); border-radius: var(--r-card);
}
.editorial--solid { background: var(--card); }
.editorial--flip > .editorial__media { order: 2; }
.editorial__media { width: 100%; }
.editorial__media img,
.editorial__media > svg,
.editorial__media > .ph { width: 100%; height: auto; border-radius: var(--r-img); }
.editorial p, .editorial h3 {
  margin: 0;
  font-family: var(--body); font-size: clamp(14px, 1.55vw, 20px); line-height: 1.45; color: #000;
}
.editorial h3 { font-weight: 400; }
.editorial .gap { display: block; height: 1.45em; }

/* ------------------------------------------------------------
 * Lead copy — comp 说明, centred
 * ---------------------------------------------------------- */
.lead {
  max-width: 1155px; margin: clamp(24px, 4vw, 51px) auto 0;
  font-family: var(--body); font-size: clamp(14px, 1.55vw, 20px); line-height: 1.45;
  color: var(--ink); text-align: center;
}

/* ------------------------------------------------------------
 * Footer — comp footer group, #000 @ .80
 * ---------------------------------------------------------- */
.footer {
  position: relative; background: var(--footer); color: var(--on-dark);
  padding: clamp(30px, 4vw, 48px) calc(var(--gutter) + var(--safe-r))
           calc(clamp(24px, 3vw, 40px) + env(safe-area-inset-bottom, 0px))
           calc(var(--gutter) + var(--safe-l));
}
.footer__inner { width: 100%; max-width: var(--wrap); margin: 0 auto; }
.footer__cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(20px, 4vw, 96px);
  font-size: 15px; line-height: 30px; color: rgba(255, 255, 255, .72);
}
.footer__cols h4 {
  margin: 0 0 6px; font-size: 14px; line-height: 24px;
  color: var(--on-dark); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.footer__cols a:hover { color: var(--on-dark); }
.footer__mailrow {
  display: flex; align-items: center; gap: 9px;
  margin-top: clamp(24px, 3vw, 40px);
}
.footer__mailrow svg { flex: none; width: 26px; height: 26px; }
.footer__mailrow span { font-size: clamp(15px, 1.6vw, 20px); line-height: 1.3; color: var(--on-dark); }
.footer__legal {
  margin-top: clamp(20px, 2.6vw, 34px); padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-family: var(--body); font-size: 12px; line-height: 20px;
  color: rgba(255, 255, 255, .55);
}

/* the strand that flies into the bag (§6 微交互) */
.flyball {
  position: fixed; z-index: 70; pointer-events: none; border-radius: 50%;
  overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: left .7s cubic-bezier(.5, 0, .3, 1), top .7s cubic-bezier(.5, -.4, .3, 1),
              width .7s ease, height .7s ease, opacity .25s ease .45s;
}

/* ------------------------------------------------------------
 * Rich text — the block format the product CMS will fill
 * ---------------------------------------------------------- */
.rt { max-width: 74ch; }
.rt__h {
  margin: clamp(24px, 3vw, 38px) 0 clamp(8px, 1vw, 12px);
  font-size: clamp(17px, 1.8vw, 21px); line-height: 1.4; font-weight: 500; color: var(--ink);
}
.rt > .rt__h:first-child { margin-top: 0; }
.rt__p {
  margin: 0 0 clamp(10px, 1.2vw, 14px);
  font-family: var(--body); font-size: clamp(14px, 1.4vw, 16px); line-height: 1.75; color: var(--ink-2);
}
.rt__fig { margin: clamp(16px, 2vw, 24px) 0; }
.rt__fig figcaption {
  margin-top: 8px; font-family: var(--body);
  font-size: 12px; line-height: 18px; color: var(--ink-3);
}
.rt__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.rt__row .rt__fig { margin: clamp(16px, 2vw, 24px) 0; }
.rt__quote {
  margin: clamp(20px, 2.4vw, 30px) 0 0; padding-left: 18px;
  border-left: 2px solid var(--gold);
  font-family: var(--wen); font-size: clamp(17px, 1.9vw, 22px); line-height: 1.8;
  letter-spacing: .05em; color: var(--ink-2);
}
.rt__quote cite {
  display: block; margin-top: 8px; font-style: normal;
  font-family: var(--body); font-size: 12px; letter-spacing: .1em; color: var(--ink-3);
}

/* ------------------------------------------------------------
 * Shared page furniture
 * ---------------------------------------------------------- */
.phead { position: relative; padding: clamp(32px, 5vw, 56px) 0 clamp(20px, 3vw, 32px); }
.phead h1 {
  margin: 0; font-family: var(--displ); font-weight: 500;
  font-size: clamp(26px, 4vw, 40px); line-height: 1.3; color: var(--ink);
}
.phead p {
  margin: 10px 0 0; font-family: var(--body);
  font-size: clamp(14px, 1.6vw, 20px); line-height: 1.45; color: var(--ink-2);
}

.panel {
  background: var(--card); border-radius: var(--r-card);
  padding: clamp(20px, 3.2vw, 40px);
}
.panel + .panel { margin-top: clamp(16px, 2.2vw, 28px); }
.panel h2 {
  margin: 0 0 clamp(14px, 1.6vw, 20px);
  font-size: clamp(19px, 2vw, 24px); line-height: 1.35; font-weight: 500; color: var(--ink);
}

.field { display: block; margin-bottom: 22px; }
.field[hidden] { display: none; }
.field > span {
  display: block; margin-bottom: 8px;
  font-size: 15px; line-height: 22px; color: var(--ink-2);
}
.field input, .field select, .field textarea {
  width: 100%; height: 50px; padding: 0 14px;
  background: var(--page); border: 1px solid var(--ink-4); border-radius: var(--r-btn);
  /* 16px keeps iOS Safari from zooming the viewport on focus */
  font: 16px/50px var(--ui); color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: right 18px center, right 12px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.field textarea { height: 120px; padding: 12px 14px; line-height: 24px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
}
.field--row { display: flex; flex-wrap: wrap; gap: 0 18px; }
.field--row > label { flex: 1 1 240px; }

.hint { font-family: var(--body); font-size: 13px; line-height: 21px; color: var(--ink-3); }

/* compliance strip — research/04-applied/五行与饰品材质对应.md §6 */
.disclaimer {
  margin-top: 14px; padding: 12px 16px;
  background: var(--page); border-left: 3px solid var(--ink-4); border-radius: 0 3px 3px 0;
  font-family: var(--body); font-size: 12px; line-height: 20px; color: var(--ink-3);
}

.elembar { display: grid; gap: 12px; }
.elembar__row {
  display: grid; grid-template-columns: clamp(64px, 8vw, 120px) 1fr 40px;
  align-items: center; gap: clamp(8px, 1.2vw, 14px);
}
.elembar__k { font-family: var(--wen); font-size: clamp(14px, 1.5vw, 18px); line-height: 1.45; color: var(--ink-2); }
.elembar__t { height: 10px; border-radius: 5px; background: #EAEAEE; overflow: hidden; }
.elembar__t i { display: block; height: 100%; border-radius: 5px; background: var(--gold); }
.elembar__v { font-family: var(--body); font-size: 14px; color: var(--ink-3); text-align: right; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.4vw, 18px); }
.pillar { padding: clamp(14px, 2vw, 22px) 0; text-align: center; background: var(--page); border-radius: var(--r-card); }
.pillar b { display: block; font-family: var(--wen); font-size: clamp(22px, 3vw, 34px); line-height: 1.3; color: var(--ink); }
.pillar span { display: block; margin-top: 4px; font-size: 12px; line-height: 20px; color: var(--ink-3); }

.sortbar {
  display: flex; align-items: center; gap: 10px;
  min-height: clamp(54px, 5vw, 63px);
  padding: 10px clamp(14px, 2vw, 22px);
  margin-bottom: clamp(18px, 2.2vw, 28px);
  background: var(--card); border-radius: var(--r-btn);
  overflow-x: auto; scrollbar-width: none;
}
.sortbar::-webkit-scrollbar { display: none; }
.sortbar__chip {
  flex: none; min-height: 34px; padding: 0 16px;
  border: 1px solid var(--ink-4); border-radius: 17px;
  font-size: 14px; line-height: 32px; color: var(--ink-2); white-space: nowrap;
}
.sortbar__chip.is-on { border-color: var(--gold); color: var(--gold); }
.sortbar__spacer { flex: 1 0 12px; }

/* pager — shop, 16 a page (Jade, 2026-09-17) */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin: clamp(28px, 3.4vw, 44px) 0 0;
}
.pager button {
  min-width: 44px; height: 44px; padding: 0 12px;         /* §5.3: ≥44px tap targets */
  border: 1px solid var(--rule); border-radius: var(--r-btn); background: var(--card);
  font-size: 15px; color: var(--ink-2);
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.pager button:hover { border-color: var(--gold); color: var(--gold); }
.pager button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager button[disabled] { opacity: .35; pointer-events: none; }
.pager__step { font-size: 20px; line-height: 1; }
.pager__gap { min-width: 24px; text-align: center; color: var(--ink-3); }

/* required / optional marks on form labels (Jade, 2026-09-17: 「*」 in the
 * primary button's brown) */
.req { margin-left: 2px; font-style: normal; color: var(--clay); }
.opt { font-style: normal; color: var(--ink-3); }

/* searchable dropdown — js/place.js */
.combo { position: relative; }
.combo__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  display: none; max-height: 264px; margin: 0; padding: 6px 0; overflow-y: auto; list-style: none;
  background: var(--card, #fff); border: 1px solid var(--rule); border-radius: var(--r-btn);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}
.combo.is-open .combo__list { display: block; }
.combo__list li {
  padding: 0 14px; font-size: 15px; line-height: 40px; color: var(--ink-2);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.combo__list li:hover, .combo__list li.is-active { background: var(--page); color: var(--ink); }
.combo__list li.combo__none { cursor: default; font-size: 13px; color: var(--ink-3); }
.combo__list li.combo__none:hover { background: none; }

/* ============================================================
 * Breakpoints
 * ============================================================ */

/* iPad portrait and up */
@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .editorial { grid-template-columns: 1fr 1fr; padding: clamp(20px, 2.2vw, 26px); }
  .editorial--wide { grid-template-columns: 43% 1fr; }
  .editorial--narrow { grid-template-columns: 1fr 33%; }
}

/* iPad landscape and up */
@media (min-width: 1024px) {
  :root { --gutter: 28px; }
}

/* the comp's own width — from here the numbers are the comp's */
@media (min-width: 1280px) {
  :root { --gutter: 28px; --bar-h: 51px; }
  .hero--short { height: 380px; }
  .grid4   { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .notice  { margin-top: 34px; }
}

/* phones */
@media (max-width: 767px) {
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px calc(var(--gutter) + var(--safe-l));
    background: var(--bar);
    max-height: 0; overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav.is-open .nav__links { max-height: 260px; }
  .nav__links .nav__link { padding: 13px 0; width: 100%; }
  .nav__burger { display: block; }
  .nav__logo { order: -1; }
  .nav__search { order: -2; }
  .nav__cart { margin-left: auto; }
  .nav { gap: 12px; }

  .dots { display: none; }
  .herocopy { margin-bottom: clamp(80px, 22vw, 120px); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .btnrow .btn { flex: 1 1 100%; }
  .editorial { grid-template-columns: 1fr; }
  .editorial--flip > .editorial__media { order: 0; }
}

/* very small phones (iPhone SE, 320) */
@media (max-width: 340px) {
  :root { --gutter: 12px; }
  .grid4 { grid-template-columns: 1fr; }
  .lotbar__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; }
}
