/* Generated by npm run build:tokens. Edit public/tokens/*.css; preserve source order. */
/* tokens/scales.css */
:root {
  /* 固定尺度。页面有相应的组件或语义令牌时优先使用该角色。 */
  --font-size-9: 9px;
  --font-size-10: 10px;
  --font-size-11: 11px;
  --font-size-13: 13px;
  --font-size-17: 17px;
  --font-size-19: 19px;
  --font-size-21: 21px;
  --font-size-22: 22px;
  --font-size-25: 25px;
  --font-size-27: 27px;
  --font-size-28: 28px;
  --font-size-29: 29px;
  --font-size-32: 32px;
  --font-size-38: 38px;
  --font-size-44: 44px;
  --font-size-56: 56px;
  --font-size-58: 58px;
  --font-size-64: 64px;
  --font-size-72: 72px;
  --length-zero: 0px;
  --letter-spacing-0-2px: 0.2px;
  --letter-spacing-0-03em: 0.03em;
  --letter-spacing-0-04em: 0.04em;
  --letter-spacing-0-5px: 0.5px;
  --letter-spacing-0-8px: 0.8px;
  --letter-spacing-0-15px: 0.15px;
  --letter-spacing-1px: 1px;
  --list-relative-gap: 0.35em;
  --offer-description-width: 38em;
  --list-indent: 1.5em;
  --list-indent-compact: 1.25em;
  --radius-2: 2px;
  --radius-6: 6px;
  --radius-7: 7px;
  --radius-10: 10px;
  --radius-11: 11px;
  --radius-12: 12px;
  --radius-rounded: 999px;
  --size-1: 1px;
  --size-3: 3px;
  --size-4: 4px;
  --size-6: 6px;
  --size-13: 13px;
  --size-14: 14px;
  --size-15: 15px;
  --size-16: 16px;
  --size-18: 18px;
  --size-20: 20px;
  --size-21: 21px;
  --size-22: 22px;
  --size-24: 24px;
  --size-26: 26px;
  --size-28: 28px;
  --size-30: 30px;
  --size-32: 32px;
  --size-34: 34px;
  --size-36: 36px;
  --size-38: 38px;
  --size-42: 42px;
  --size-44: 44px;
  --size-46: 46px;
  --size-48: 48px;
  --size-58: 58px;
  --size-60: 60px;
  --size-180: 180px;
  --size-240: 240px;
  --size-280: 280px;
  --size-420: 420px;
  --size-480: 480px;
  --spacing-1: 1px;
  --spacing-3: 3px;
  --spacing-4: 4px;
  --spacing-6: 6px;
  --spacing-7: 7px;
  --spacing-8: 8px;
  --spacing-9: 9px;
  --spacing-11: 11px;
  --spacing-12: 12px;
  --spacing-13: 13px;
  --spacing-14: 14px;
  --spacing-16: 16px;
  --spacing-17: 17px;
  --spacing-18: 18px;
  --spacing-22: 22px;
  --spacing-24: 24px;
  --spacing-28: 28px;
  --spacing-30: 30px;
  --spacing-32: 32px;
  --spacing-34: 34px;
  --spacing-36: 36px;
  --spacing-38: 38px;
  --spacing-40: 40px;
  --spacing-46: 46px;
  --spacing-48: 48px;
  --spacing-55: 55px;
  --spacing-64: 64px;
  --spacing-110: 110px;
  --spacing-130: 130px;
  --stroke-2: 2px;
}


/* tokens/foundation.css */
/*
 * PimiX V3 设计令牌
 * V3 公共样式、文字角色、语言与响应式覆盖。
 * 说明见 design-tokens.md。
 */
:root {
  --copy-success-bg: #e8f6ec;
  --copy-success-text: #247a40;
  --copy-success-border: #48a767;
  --table-pagination-gap: var(--space-2);
  --table-pagination-padding: var(--space-3);
  color-scheme: light;
  /* ---------- 颜色：基础 ---------- */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-gray-50: #fafafa;   /* 页面底色 */
  --color-gray-100: #f2f2f2;  /* 卡片内的浅灰区块 */
  --color-gray-200: #dedede;  /* 分隔线、禁用 */
  --color-gray-500: #828282;  /* 黑按钮的 1px 描边光 */
  --color-gray-700: #3f3f3f;  /* 次要文字 */
  --color-green-500: #12b33f; /* 唯一强调色 */

  /* ---------- 颜色：语义 ---------- */
  --bg-page: var(--color-gray-50);
  --bg-surface: var(--color-white);          /* 卡片、FAQ 条目、弹窗 */
  --bg-subtle: var(--color-gray-100);        /* 卡片里的图/信息区 */
  --bg-inverse: var(--color-black);          /* 黑色按钮、黑色 CTA 区 */
  --bg-nav: rgba(255, 255, 255, 0.43);       /* 导航条，配合模糊 */
  --text-primary: var(--color-black);
  --text-secondary: var(--color-gray-700);
  --text-inverse: var(--color-white);
  --text-inverse-secondary: var(--color-gray-200);
  --border-subtle: var(--color-gray-200);
  --accent: var(--color-green-500);
  --accent-soft: rgba(18, 179, 63, 0.5);     /* 状态小圆点 */
  --on-accent: var(--color-white);

  /* 状态色（Notionly 没有，本项目订单状态需要；保持低饱和） */
  --status-pending-bg: #fdf3e1;  --status-pending-fg: #a16207;  /* 待付款 */
  --status-active-bg: #eef2ff;   --status-active-fg: #3b4fd8;   /* 待交付 */
  --status-success-bg: #e7f7ec;  --status-success-fg: #0f8a33;  /* 已完成 */
  --status-muted-bg: var(--bg-subtle);    --status-muted-fg: #545454;    /* 已取消/已退款 */
  --status-danger-fg: #c2410c;                                  /* 表单错误 */

  /* ---------- 字体 ---------- */
  --font-sans: "Switzer", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  /* 2026-11-13 字重基准：说明与辅助 500，标题与按钮 600，重点金额 700。 */
  --font-weight-body: 500;
  --font-weight-strong: 600;
  --font-weight-emphasis: 700;
  --text-emphasis-weight: var(--font-weight-emphasis);
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* 字号 / 行高 / 字重 / 字距（实测值）
     中文 display 使用 1.15 行高、正常字距；small 行高为 1.5。英文由 :lang(en) 恢复参考值。 */
  --text-display-size: 72px;  --text-display-lh: 1.15; --text-display-weight: var(--font-weight-strong); --text-display-ls: 0;
  --text-h1-size: 54px;       --text-h1-lh: 1.1;       --text-h1-weight: var(--font-weight-strong);      --text-h1-ls: 0;
  --text-h2-size: 44px;       --text-h2-lh: 1.2;       --text-h2-weight: var(--font-weight-strong);      --text-h2-ls: 0;
  --text-h3-size: 32px;       --text-h3-lh: 1.2;       --text-h3-weight: var(--font-weight-strong);      --text-h3-ls: 0;
  --text-title-size: 23px;    --text-title-lh: 1.4;    --text-title-weight: var(--font-weight-strong);   --text-title-ls: 0;
  --text-lead-size: 18px;     --text-lead-lh: 1.5;     --text-lead-weight: var(--font-weight-body);    --text-lead-ls: 0;
  --text-body-size: 16px;     --text-body-lh: 1.5;     --text-body-weight: var(--font-weight-body);    --text-body-ls: 0;
  --text-button-size: 16px;   --text-button-lh: 1.2;   --text-button-weight: var(--font-weight-strong);  --text-button-ls: 0;
  --text-small-size: 15px;    --text-small-lh: 1.5;    --text-small-weight: var(--font-weight-body);   --text-small-ls: 0;
  --text-caption-size: 12px;  --text-caption-lh: 1.2;  --text-caption-weight: var(--font-weight-body); --text-caption-ls: 0;

  /* ---------- 间距（实测常用值） ---------- */
  --space-1: 2px;
  --space-2: 5px;
  --space-3: 10px;   /* 最常用：按钮内图标间距、小组件间距 */
  --space-4: 15px;
  --space-5: 20px;   /* 卡片网格间距、导航链接间距 */
  --space-6: 27px;   /* 卡片内部分块间距 */
  --space-7: 50px;
  --space-8: 70px;   /* 区块之间 */
  --space-9: 100px;  /* 大区块上下留白 */

  /* ---------- 布局 ---------- */
  --container-max: 1200px;   /* 内容宽度（外框 1240，含两侧 20px） */
  --brand-logo-height: 26px; /* 沿用原 Pimix 字标的显示高度，比例由 SVG 保持 */
  --brand-avatar-size: 40px;
  --brand-logo-compact-height: 22px;
  --container-gutter: 20px;
  --content-narrow: 720px;   /* 标题、段落的最大宽度 */
  --nav-height: 64.4px;
  --nav-top: 22px;           /* 导航条固定在距顶部 22px（实测） */
  --hero-padding-top: 185px;
  --hero-padding-bottom: 30px;
  --hero-min-height: auto; /* 首屏由内容与上下留白决定 */
  --hero-title-width: var(--content-narrow);
  --hero-description-lh: 1.75; /* 18px 说明文字对应 31.5px 行高 */
  --hero-description-weight: var(--font-weight-body);
  --hero-description-gap: 30px; /* 标题与说明之间 */

  /* ---------- 圆角 ---------- */
  --radius-xs: 5px;      /* 折扣角标 */
  --radius-sm: 9px;      /* 按钮、导航条；输入框使用8px控制圆角 */
  --radius-md: 14px;     /* FAQ 条目、列表行 */
  --radius-lg: 16px;     /* 商品卡片 */
  --radius-xl: 18px;     /* 大区块卡片 */
  --radius-2xl: 30px;    /* 黑色 CTA 大区 */
  --radius-pill: 15px; /* 商品标签 */

  /* ---------- 阴影（实测） ---------- */
  --shadow-button-dark:
    rgba(0, 0, 0, 0.33) 0 0.8px 0.8px -0.8px,
    rgba(0, 0, 0, 0.33) 0 2px 2px -1.5px,
    rgba(0, 0, 0, 0.3) 0 4.5px 4.5px -2.5px,
    rgba(0, 0, 0, 0.25) 0 10px 10px -3px,
    rgba(0, 0, 0, 0.11) 0 25px 25px -4px,
    rgb(130, 130, 130) 0 0 0 1px;
  --shadow-raised: rgba(0, 0, 0, 0.07) 0 10px 25px -4px;    /* 白按钮、浮起元素 */
  --shadow-float: rgba(0, 0, 0, 0.07) 0 4px 22.7px 0;       /* 卡片上的胶囊标签 */
  --shadow-card:
    rgba(0, 0, 0, 0.07) 0 2px 2px -2px,
    rgba(0, 0, 0, 0.06) 0 5px 5px -3px,
    rgba(0, 0, 0, 0.03) 0 15px 15px -4px;
  --shadow-overlay: rgba(0, 0, 0, 0.25) 0 30px 80px 0;      /* 弹窗（本项目补充） */

  /* ---------- 效果 ---------- */
  --blur-nav: blur(5px);
  --ease-standard: cubic-bezier(0.44, 0, 0.56, 1);
  --duration-base: 0.3s;

  /* ---------- 组件 ---------- */
  --button-height: 44px;
  --button-padding: 12px 26px;
  --button-gap: 10px;
  --input-height: 40px;
  --card-padding: 25px;
  --faq-item-padding: 17px;
  --badge-padding-block: 6px;
  --badge-padding-inline: 14px;
  --badge-padding: var(--badge-padding-block) var(--badge-padding-inline);
  --tag-padding: 3px 8px;

  /* ---------- 描边（实测：Notionly 用 ::after 伪元素画 1px 边框，几乎所有组件都有） ---------- */
  --border-card: var(--border-width) solid var(--border-subtle);               /* 商品卡、FAQ 条目、导航条、页脚顶边 */
  --border-panel: 1px solid rgba(0, 0, 0, 0.1);   /* 大区块卡片（特色、步骤、邀请） */
  --border-button-dark: 1px solid #000000;        /* 黑色按钮 */
  --border-button-light: 1px solid rgba(0, 0, 0, 0.23); /* 白色按钮、筛选按钮 */
  --border-badge: 1px solid rgba(0, 0, 0, 0.18);  /* "热卖"胶囊标签 */
  --border-badge-inverse: 1px solid #6e6e6e;      /* 黑底上的胶囊标签 */
  --border-icon-button: 1px solid #f2f2f2;        /* 页脚社交图标等小方块 */
  --dot-glow-1: rgba(18, 179, 63, 0.7);           /* 绿点外两圈光晕 */
  --dot-glow-2: rgba(18, 179, 63, 0.5);

  /* ---------- 商品卡（实测 Notionly 商品卡） ---------- */ /* 标签底部到封面的净间距，20px */
  --product-card-padding: 55px 25px 30px;
  --product-card-gap: 27px;
  --product-text-gap: 17px;      /* 名称行和说明之间 */
  --product-badge-offset: 22px;   /* 标签离卡片左上角 */
  --mockup-width: 100%; /* 展示图片填满商品卡媒体内框 */
  --mockup-height: 220px;
  --mockup-fallback-frame: 8px;
  --mockup-frame: 0px; /* 封面本身包含设备图像，无 CSS 边框 */
  --mockup-radius: 0px;
  --filter-gap: 10px; /* 分类筛选按钮之间 */

  /* ---------- 商品详情页：左边介绍按 Lemon Squeezy 结账页左栏的尺度（商品名 24、价格 20、正文 14），右边购买卡和商品卡同宽 ---------- */
  --detail-aside-width: calc((var(--container-max) - var(--space-5) * 2) / 3);
  --detail-columns: minmax(0, 1fr) var(--detail-aside-width);
  --detail-gap: 70px;
  --detail-media-width: 448px;    /* 详情页的展示区（Lemon Squeezy 商品图宽 448） */
  --detail-mockup-height: 220px;  /* 和商品卡的展示区一样高 */
  --detail-main-gap: 27px;        /* 左栏各块之间（同商品卡间距） */
  --prose-gap: 16px;              /* 详情正文段落之间（实测 Lemon Squeezy 段落间距 16） */
  --buybar-height: 76px;          /* 手机底部固定购买条 */

  /* ---------- 补充：深色区块、遮罩、聚焦 ---------- */
  --bg-inverse-raised: transparent; /* 深色 CTA 的描边标签底色 */
  --bg-cta: var(--bg-inverse);
  --text-cta: var(--text-inverse);
  --text-cta-secondary: var(--text-inverse-secondary);
  --bg-cta-badge: var(--bg-inverse-raised);
  --border-cta-badge: var(--border-badge-inverse);
  --bg-device-frame: transparent;
  --border-inverse: #3a3a3a;                 /* 黑底上的虚线 */
  --overlay: rgba(0, 0, 0, 0.35);            /* 弹窗遮罩 */
  --blur-overlay: blur(3px);
  --focus-ring: 0 0 0 3px rgba(0, 0, 0, 0.08);   /* 输入框聚焦光圈 */
  --focus-outline: 2px solid var(--text-primary); /* 键盘焦点描边 */
  --ring-cta: 10px; /* CTA 外框厚度 */
  --border-width: 1px;
  --border-width-strong: 1.5px;
  --press-offset: 1px;                       /* 按下时下沉 */

  /* ---------- 补充：组件尺寸 ---------- */
  --icon-sm: 16px;
  --icon-md: 20px;
  --dot-size: 6px;                /* 胶囊标签里的绿点（实测 6px，外面两圈光晕各 1px） */
  --dot-ring: 1px;
  --avatar-sm: 32px;              /* Logo 方块 */
  --avatar-md: 36px;              /* 步骤序号、关闭按钮 */
  --avatar-lg: 44px;              /* 商品图标 */
  --chip-height: 40px;            /* 紧凑按钮、菜单和下拉选项；商城分类用普通按钮 */
  --seat-size: 20px;              /* 拼车座位格 */
  --qr-size: 84px;                /* 客服二维码 */
  --card-media-height: 240px; /* 外侧展示区，内图高 220px */
  --media-height: 280px;          /* 大区块插图 */
  --ticket-width: 260px;          /* 邀请区的优惠券插图 */
  --ticket-tilt: -5deg;
  --popover-width: 300px;
  --select-menu-max-height: calc(var(--input-height) * 5);
  --calendar-max-height: calc(100dvh - var(--container-gutter) * 2);
  --calendar-max-width: calc(100vw - var(--container-gutter) * 2);
  --calendar-width: calc(var(--avatar-sm) * 8);
  --dialog-width: 480px;
  /* 确认弹窗：2026-11-13 用户选定的带标题紧凑版。 */
  --confirm-dialog-width: 440px;
  --confirm-dialog-padding: var(--field-gap);
  --confirm-dialog-gap: var(--space-5);
  --confirm-dialog-radius: var(--radius-lg);
  --confirm-action-gap: 12px;

  --measure: 420px;               /* 段落最大宽度 */

  /* ---------- 表单与付款页 ----------
     来源：Lemon Squeezy 结账页（Notionly 的购买按钮跳转到这里）实测，2026-11-04。
     只取尺寸和结构；它的紫色主按钮换成本项目的黑色主按钮。 */
  --text-label-size: 14px;  --text-label-lh: 24px;  --text-label-weight: var(--font-weight-body);  /* 字段标题 */
  --text-input-size: 14px;                       /* 结账表单正文 */
  --input-padding-x: 16px;
  --shadow-input: inset 0 0 0 1px rgba(10, 10, 46, 0.16), 0 1px 1px rgba(10, 10, 11, 0.06); /* 用内阴影当描边 */
  --shadow-input-focus: 0 0 0 2px var(--text-primary);
  --field-label-gap: 12px;      /* 字段标题和输入框之间 */
  --field-gap: 24px;           /* 两个字段之间 */
  --segment-height: 36px;      /* 分段切换（如"Google 登录 / 邮箱登录"） */
  --segment-track-padding: 2px;
  --segment-active-border: 1px solid #d1d1db;
  --shadow-segment-active: 0 1px 1px rgba(10, 10, 46, 0.06);
  --button-height-lg: 48px;    /* 提交订单、付款这类最终按钮 */
  --text-total-size: 16px;  --text-total-lh: 28px;  --text-total-weight: var(--font-weight-emphasis);  /* "应付"那一行 */
  --checkout-aside-width: 448px;   /* 左栏：商品摘要 */
  --checkout-form-width: 496px;    /* 右栏：表单 */
  --checkout-top: 120px;           /* 两栏内容离顶部 */
  --bg-checkout-aside: #f7f7f8; /* Lemon Squeezy 摘要栏 */

  /* ---------- 内页标题区（Notionly 模板列表页实测） ----------
     内页没有丝绸背景：纯底色 + 居中 display 大标题 + 一段说明。 */
  --page-header-top: 220px;        /* 大标题离页面顶部 */

  /* ---------- 补充：布局 ---------- */
  /* 断点（CSS 媒体查询里不能用变量，这里只做记录）：目录1440/810，详情960，结账768，紧凑排版640 */
  --grid-columns: 3;              /* 商品网格列数 */
  --split-columns: 1fr 1fr;       /* 邀请区左右分栏 */       /* 常见问题左右分栏 */
  --footer-columns: minmax(0,3fr) minmax(0,1fr) minmax(0,1fr);
  --footer-title-size: 32px;
  --footer-body-size: 15px;
  --footer-padding: 60px 20px 20px;
  --footer-gap: 45px;
  --footer-brand-gap: 35px;
  --footer-list-gap: 13px;
  --footer-description-width: 420px;
  --nav-link-gap: 20px;
  --nav-menu-size: 40px;
  --nav-menu-icon-size: 24px;
  --card-media-padding: 10px 15px;
  --device-width: 280px;
  --device-max-width: 100%;
  --device-height: 214px;
  --device-frame: 8px;
  --device-radius: 12px;
  --device-ratio: 280 / 214;
  --device-fluid-frame: 2.857142cqw;
  --device-fluid-radius: 4.285714cqw;
  --device-fluid-padding: 5.357142cqw;
  --device-fluid-gap: 3.571428cqw;
  --device-fluid-label: 5cqw;
  --device-fluid-point: 4.285714cqw;
  --device-fluid-mark: 11.428571cqw;
  --device-fluid-icon: 5.714285cqw;
  --product-badge-left: 23px;
  --footer-description-size: 16px;
  --radius-control: 8px;
  --input-radius: var(--radius-control);
  --segment-radius: var(--radius-control);
  --text-input-lh: 24px;
  --text-input-weight: var(--font-weight-body);
  --input-padding-y: 8px;
  --text-product-size: 24px;
  --text-product-lh: 32px;
  --text-product-weight: var(--font-weight-strong);
  --text-product-price-size: 20px;
  --text-product-price-lh: 30px;
  --text-product-price-weight: var(--font-weight-emphasis);
  --text-detail-size: 14px;
  --text-detail-lh: 24px;
  --text-detail-weight: var(--font-weight-body);
  --checkout-gutter: 32px;
  --segment-inactive-weight: var(--font-weight-body);
}

/* Light appearance only; accent presets retain the same component geometry. */
:root[data-preset="clay"]{--accent:#ad613e;--accent-soft:rgba(173,97,62,.5);--dot-glow-1:rgba(173,97,62,.7);--dot-glow-2:rgba(173,97,62,.3)}
:root[data-preset="indigo"]{--accent:#5264c5;--accent-soft:rgba(82,100,197,.5);--dot-glow-1:rgba(82,100,197,.7);--dot-glow-2:rgba(82,100,197,.3)}
:root[data-preset="plum"]{--accent:#9755a6;--accent-soft:rgba(151,85,166,.5);--dot-glow-1:rgba(151,85,166,.7);--dot-glow-2:rgba(151,85,166,.3)}

/* 英文沿用相同字体与字重，只保留语言所需的行高和排版。 */
:root:lang(en) {
  --hero-title-width: var(--content-narrow);
  --text-display-lh: 1;
  --text-display-ls: -0.03em;
  --hero-description-lh: 1.5;
  --hero-description-weight: var(--font-weight-body);
  --hero-description-gap: 30px;
  --text-h1-ls: -0.03em;
  --text-h2-ls: -0.03em;
  --text-h3-ls: -0.03em;
  --text-small-lh: 1.2;
  --text-title-ls: -0.02em;
  --text-body-ls: -0.01em;
  --text-small-ls: -0.03em;
  --text-caption-ls: -0.02em;
}

/* 商店首屏与商品目录跟随各自的参考断点。 */
@media (width < 1440px) {
  :root {
    --nav-top: 20px;
    --text-display-size: 61px;
    --hero-padding-top: 175px;
    --hero-padding-bottom: 25px;
  }
}
@media (width < 810px) {
  :root {
    --nav-height: 61px;
    --text-display-size: 46px;
    --hero-padding-top: 155px;
    --hero-padding-bottom: 20px;
    --footer-description-size: 15px;
  }
}
@media (width < 1024px) { :root { --grid-columns: 2; } }
@media (width < 600px) { :root { --grid-columns: 1; } }
@media (width < 768px) {
  :root {
    --checkout-top: 64px;
  }
}
@media (max-width: 640px) {
  body:not(:has(.hero)) {
    --container-gutter: 16px;
    --admin-gutter: var(--container-gutter);
  }
}

/* 平板 ≤960px */
@media (max-width: 960px) {
  :root {
    --split-columns: 1fr;       /* 付款页改成上下排列 */
    --detail-columns: 1fr;      /* 详情页改成上下排列 */
    --detail-gap: 27px;
  }
}

/* 手机 ≤640px */
@media (max-width: 640px) {
  :root {
    --text-h1-size: 36px;
    --text-h2-size: 30px;
    --text-h3-size: 26px;
    --space-8: 50px;
    --space-9: 70px;
    --media-height: 200px;
    --checkout-top: 32px;
    --page-header-top: 140px;
    --detail-mockup-height: 200px;
  }
}

/* 触控手机上使用 16px 输入文字，避免聚焦时视口放大。 */
@media (max-width: 640px) and (pointer: coarse) {
  :root {
    --text-input-size: 16px;
  }
}

/* 账号页面、进度节点与公告导航 */
:root {
  --account-width: 960px;        /* 用户中心几页（订单、优惠券、邀请）的内容宽度，比首页窄，读起来不费眼 */
  --step-dot: 24px;              /* 订单进度的圆点、邀请规则的序号（和 14/24 的字段标题同高） */
  --coupon-stub-width: 120px;    /* 优惠券左边的黑色面额区 */
  --announce-height: 40px;       /* 全站公告条的高度（默认值；文字换行时页面脚本按实际高度改写） */
  --nav-top-announce: calc(var(--nav-top) + var(--announce-height)); /* 有公告时导航离顶部：公告下面再空 22 */
}
@media (max-width: 640px) {
  :root {
    --coupon-stub-width: 96px;
  }
}


/* tokens/components.css */
:root {
  /* 共享文字、表面、分类与价格。 */
  --cashback-surface: #fff0e7;
  --category-chatgpt-bg: #e0f2e5;
  --category-claude-bg: #ffecdc;
  --category-gemini-bg: #e4edff;
  --category-neutral-bg: #eee;
  --category-violet-bg: #ede5fa;
  --control-border: #ccc;
  --control-disabled: #aaa;
  --gallery-control-border: #e3e3e3;
  --gallery-control-hover-bg: #f6f6f6;
  --gallery-control-hover-border: #bdbdbd;
  --ink-control-focus: #222;
  --ink-control-hover: #333;
  --ink-description: #555;
  --ink-heading: #111;
  --ink-hint: #777;
  --ink-label: #444;
  --ink-prose: #252525;
  --ink-subdued: #888;
  --ink-supporting: #666;
  --ink-unavailable: #999;
  --invite-nav-accent: #c94712;
  --invite-nav-ring: #f07838;
  --panel-divider: #ddd;
  --price-accent: #c74716;
  --price-accent-hover: #a93b12;
  --price-divider: #e5e5e5;
  --surface-unavailable: #f8f8f8;

  /* 导航、客服、登录与公共组件。 */
  --button-icon-hover-offset: translateX(6px);
  --login-viewport-gutter: clamp(16px,2.2vw,28px);
  --login-form-gap: clamp(14px,2.3vh,20px);
  --login-form-padding: clamp(18px,3vw,27px);
  --invite-nav-title-gradient: linear-gradient(105deg,#c13e22,#b76200 50%,#bc3260);
  --invite-nav-title-gradient-inverse: linear-gradient(105deg,#ff996b,#ffd078 50%,#ff91ad);
  --nav-invite-ring-fill-color: rgba(240,120,56,.16);
  --nav-links-before-bg-color: rgba(0,0,0,.08);
  --support-arrow-bg-color: #fffffff0;
  --support-arrow-border-color: #d3ded6;
  --support-arrow-box-shadow: 0 2px 8px #0002;
  --support-arrow-focus-outline-color: #347555;
  --support-arrow-text-color: #2a5239;
  --support-prev-offset: translateX(-8px);
  --support-next-offset: translateX(8px);
  --user-pagination-size-width: 80px;

  /* 首页与目录。 */
  --benefit-cashback-p-text-color: #654133;
  --benefit-cashback-text-color: #8f300f;
  --benefit-icon-bg-color: #ffdfca;
  --invite-ticket-divider: rgba(255,255,255,.45);
  --on-dark-muted-text-color: rgba(255,255,255,.85);

  /* 商品详情、结账及订单。 */
  --assure-text-color: #465b4d;
  --attachment-file-bg-color: #edf3ee;
  --attachment-surface-neutral: #f0f0f0;
  --attachment-file-text-color: #427252;
  --breadcrumb-arrow-box-shadow: 0 2px 6px #0000000a;
  --buy-border-color: #cfd9d3;
  --buy-box-shadow: 0 4px 20px #0000000a;
  --cash-empty-text-color: #56645b;
  --checkout-cash-hint: #886248;
  --cash-inline-panel-max-width: 230px;
  --cash-input-row-border-color: #cfaa8d;
  --checkout-account-bg-color: #f2f5f3;
  --checkout-account-border-color: #e0e7e2;
  --checkout-cash-label-input-accent-color: #171717;
  --checkout-coupon-choice-border-color: #eadfd8;
  --checkout-coupon-choice-input-accent-color: #b44b2c;
  --checkout-reward-choice-accent: #b8312f;
  --checkout-coupon-choice-selected-bg-color: #fff7ee;
  --checkout-reward-choice-selected-bg: #fff3f0;
  --checkout-coupon-choice-selected-border: #e4b39c;
  --checkout-reward-choice-selected-border: #e5a59e;
  --checkout-coupon-choice-text-color: #493b35;
  --checkout-discount-value: #a54125;
  --checkout-coupon-choices-max-height: 200px;
  --checkout-coupon-selected-divider-color: #edcfbb;
  --checkout-discount-details-summary-text-color: #806357;
  --checkout-discount-details-text-color: #6d5951;
  --checkout-footnote-divider-color: #e1e8e3;
  --checkout-gift-amount-strong-text-color: #ac4e1e;
  --checkout-gift-amount-text-color: #8e6547;
  --checkout-gift-formula-text-color: #8a654a;
  --checkout-gift-icon-bg-color: #f5dfb5;
  --checkout-gift-icon-text-color: #a75b1b;
  --checkout-gift-notice-bg-color: #fff8e9;
  --checkout-gift-notice-border-color: #edcf9d;
  --checkout-gift-notice-text-color: #71431f;
  --checkout-period-bg-color: #f0f4f1;
  --checkout-period-text-color: #556d5c;
  --checkout-question-text-color: #22513b;
  --checkout-reward-divider-color: #dde5df;
  --checkout-submitted-status-bg-color: #24854d;
  --checkout-submitted-status-hover-bg-color: #1f7543;
  --checkout-desktop-columns: minmax(0,1fr) 360px;
  --checkout-tablet-columns: minmax(0,1fr) 330px;
  --detail-head-p-max-width: 620px;
  --discount-text-color: #a3481f;
  --gallery-counter-text-color: #65796b;
  --gallery-file-error-text-color: #654433;
  --gallery-play-bg-color: #111d;
  --gallery-play-border-color: #ffffffbb;
  --gallery-play-box-shadow: 0 3px 14px #0004;
  --checkout-input-border: #b7c5bc;
  --checkout-input-placeholder: #718077;
  --invoice-choice-bg-color: #f3f3f3;
  --invoice-choice-border: #d6d6d6;
  --checkout-cash-link: #92350b;
  --media-card-p-text-color: #566b5d;
  --price-text-color: #17211c;
  --product-attachment-block-columns: repeat(auto-fill,minmax(min(100%,220px),1fr));
  --product-download-hover-bg-color: #f6faf7;
  --product-download-hover-border: #649577;
  --product-download-max-width: 420px;
  --product-download-small-text-color: #63786a;
  --product-download-text-color: #263d30;
  --product-editorial-image-bg-color: #e9f1e9;
  --product-editorial-image-figcaption-text-color: #5d7064;
  --product-editorial-image-height: 260px;
  --product-editorial-image-height-mobile: 210px;
  --product-editorial-image-height-desktop: 230px;
  --product-editorial-image-max-height: 420px;
  --product-eyebrow-text-color: #536d5b;
  --product-feature-line-divider-color: #dce5df;
  --product-gallery-tabs-button-text-color: #5b7061;
  --product-gallery-tabs-button-width: 68px;
  --product-gallery-track-border-color: #d7e3da;
  --product-gallery-track-height: clamp(230px,24vw,330px);
  --product-highlights-border-color: #dce3df;
  --product-highlights-text-color: #263c30;
  --product-info-grid-divider-color: #dae2dc;
  --product-reward-strip-bg-color: #fff3e9;
  --product-reward-strip-p-text-color: #77411f;
  --product-rich-copy-text-color: #285b3d;
  --product-video-block-video-bg-color: #173e2d;

  /* 邀请奖励与提现。 */
  --invite-copy-status-max-width: 190px;
  --invite-earning-totals-max-width: 460px;
  --invite-earnings-columns: minmax(0,1fr) minmax(180px,240px);
  --invite-hero-columns: minmax(0,1.65fr) minmax(300px,1fr);
  --invite-hero-compact-columns: minmax(0,1fr) minmax(260px,.8fr);
  --invite-how-after-bg-color: #d9d9d9;
  --invite-offer-bg-color: rgba(255,255,255,.66);
  --invite-offer-font-size: clamp(68px,6vw,92px);
  --invite-promotion-h2-font-size: clamp(30px,3.2vw,42px);
  --invite-promotion-p-max-width: 520px;
  --invite-record-friend-columns: minmax(0,2fr) minmax(100px,1fr) minmax(170px,1fr);
  --invite-record-redemptions-columns: minmax(90px,.8fr) minmax(110px,1fr) minmax(0,1.4fr) minmax(100px,.8fr) minmax(170px,1fr);
  --invite-record-rewards-columns: minmax(130px,1fr) minmax(0,2.2fr) minmax(100px,.8fr) minmax(170px,1fr);
  --invite-record-withdrawals-columns: minmax(0,1.6fr) minmax(90px,.8fr) minmax(170px,1fr) minmax(90px,.8fr) minmax(150px,1.2fr);
  --invite-search-max-width: 360px;
  --withdrawal-copy-details-height: 120px;
  --withdrawal-copy-details-min-height: 112px;
  --withdrawal-copy-inline-min-height: 120px;
  --progress-step-columns: var(--step-dot) minmax(0,1fr);
  --progress-connector-offset: calc(var(--step-dot) / 2 - var(--border-width));
  --progress-current-ring: 0 0 0 var(--size-3) var(--bg-subtle);

  /* 买家订单。 */
  --orders-table-columns: minmax(120px,1.1fr) minmax(130px,.9fr) minmax(145px,1.1fr) minmax(80px,.7fr) minmax(165px,1.2fr) minmax(150px,1fr);
  --orders-filter-width: 140px;

  /* 奖励记录。 */
  --reward-copy-bg: #f1f1f1;
  --reward-pending-bg: #fff0e2;
  --reward-pending-text: #8a421c;
  --rewards-amount-text-color: #1c513b;
  --page-backdrop-mask: linear-gradient(to bottom,rgba(0,0,0,.13) 0%,rgba(0,0,0,.13) 68%,transparent 100%);
  --page-backdrop-max-height: 1200px;
  --page-backdrop-min-height: 720px;
  --rewards-nav-border-color: #d5dfd8;
  --rewards-note-bg-color: #fff5ec;
  --rewards-note-border-color: #eebf9d;
  --rewards-note-text-color: #713719;
  --rewards-rate-text-color: #9b3b0c;
  --rewards-row-divider-color: #e2e9e4;

  /* 流式布局与容器。 */
  --benefits-head-margin-bottom: clamp(24px,4vw,50px);
  --buy-padding: clamp(18px,2vw,24px);
  --catalog-card-text-gap: clamp(10px,1.4vw,17px);
  --catalog-support-margin-top: clamp(24px,4vw,50px);
  --container-padding-block: clamp(12px,1.6vw,20px);
  --cta-gap: clamp(24px,3vw,40px);
  --cta-h2-font-size: clamp(26px,2.7vw,36px);
  --hero-h1-font-size: clamp(40px,5vw,72px);
  --home-hero-fluid-padding-bottom: clamp(20px,2.5vw,30px);
  --home-hero-fluid-padding-top: clamp(132px,14vw,185px);
  --hero-title-single-line-h1-font-size: clamp(34px,5vw,72px);
  --invite-gap: clamp(24px,4vw,60px);
  --invite-h2-font-size: clamp(24px,2.7vw,36px);
  --catalog-card-media-height: clamp(150px,70cqi,220px);
  --storefront-footer-margin: clamp(40px,6vw,80px);
  --product-gallery-track-max-height: 330px;
  --promise-margin-top: clamp(24px,3.5vw,45px);
  --home-description-fluid-size: clamp(16px,1.5vw,18px);
}


/* tokens/admin.css */
/* ---------- 运营端补充：布局、表格、看板、编辑器 ----------
   后台和用户端用同一套令牌，这里只补后台特有的尺寸，控件沿用公共角色，面板密度、图表与浮层在此统一。 */
:root {
  --admin-panel-bg: var(--bg-surface);
  --admin-panel-border: var(--border-card);
  --admin-panel-radius: var(--radius-lg);
  --admin-chart-income: var(--accent);
  --admin-chart-refund: var(--status-danger-fg);
  --admin-chart-cost: var(--text-secondary);
  --admin-layer-save: 5;
  --admin-layer-language: 6;
  --admin-layer-settings: 30;
  --admin-layer-topbar: 40;
  --admin-layer-scrim: 45;
  --admin-layer-sidebar: 50;
  --admin-layer-toast: 200;
  --admin-sidebar-width: var(--size-240);          /* 240：左侧菜单宽 */
  --admin-topbar-height: 64px; /* 运营顶部栏 */
  --admin-gutter: var(--space-6);                                     /* 27：内容区左右留白（窄屏跟随 --container-gutter） */
  --admin-content-max: var(--container-max);                          /* 1200：内容区最大宽 */
  --admin-menu-item-height: var(--chip-height);                       /* 40：菜单项高 */
  --admin-count-size: var(--space-5);                                 /* 20：菜单上的待处理数字 */
  --admin-panel-padding: var(--space-5);                              /* 20：后台卡片内边距，比用户端商品卡紧凑 */
  --admin-stat-min: 176px;                       /* 176：看板数字卡最小宽 */
  --admin-aside-width: var(--detail-aside-width);                     /* 387：订单详情右栏 */
  --admin-drawer-width: calc(var(--dialog-width) * 1.25);             /* 600：买家详情抽屉 */
  --admin-textarea-height: calc(var(--input-height) * 2);             /* 80：多行输入框 */
  --table-min-width: calc(var(--content-narrow) + var(--space-9));    /* 820：表格最小宽，窄屏在容器里横向滚动 */
  --table-cell-padding: var(--space-3) var(--space-4);                /* 10 × 15：单元格内边距 */
  --table-row-height: calc(var(--button-height) + var(--space-3));    /* 54：表格行高 */
  --table-divider: var(--border-width) solid var(--border-subtle);    /* 行与行之间的 1px 分隔线 */
  --table-head-bg: var(--bg-page);                                    /* 表头底色 */
  --table-head-fg: var(--text-secondary);                             /* 表头文字（12/600 灰） */
  --table-row-hover: var(--bg-page);                                  /* 鼠标移上去的行 */
  --tab-height: var(--segment-height);                                /* 36：订单状态页签、小按钮 */
  --thumb-size: var(--avatar-lg);                                     /* 44：商品列表封面缩略图 */
  --gallery-thumb-size: 64px;
  --gallery-editor-thumb-size: 68px;
  --cover-preview-width: 307px; /* 运营编辑器内的封面预览宽度 */
  --cover-preview-height: var(--mockup-height);                       /* 220 */
  --editor-min-height: var(--media-height);                           /* 280：富文本编辑区最小高 */
  --timeline-dot: var(--space-3);                                     /* 10：操作记录的圆点 */
}

@media (max-width: 960px) {
  :root {
    --admin-gutter: var(--container-gutter);
  }
}

@media (max-width: 640px) {
  :root {
    --admin-panel-padding: var(--space-4);
    --admin-stat-min: 154px;   /* 154：手机上看板一行两个 */
  }
}


/* tokens/storefront.css */
/* 商城与邀请卡的布局、语言和断点。 */
.home-page {
  --home-benefits-columns: repeat(4,minmax(0,1fr));
  --home-section-gap: 50px;
  --home-footer-offset: 120px;
  --home-content-gap: 70px;
  --home-proof-gap: 60px;
  --home-action-gap: 30px;
  --home-action-row-gap: 10px;
  --home-hero-description-size: 18px;
  --home-hero-description-gap: 30px;
  --home-section-title-size: 54px;
  --home-section-title-lh: 1.1;
  --home-section-title-width: 620px;
  --home-subtitle-gap: 20px;
  /* Service benefits: compact typography approved 2026-11-11. */
  --home-benefits-title-size: 36px;
  --home-benefits-title-lh: 1.3;
  --home-benefits-title-weight: var(--font-weight-strong);
  --home-benefits-subtitle-size: 16px;
  --home-benefits-subtitle-lh: 1.6;
  --home-benefits-subtitle-color: var(--text-secondary);
  --home-benefits-content-gap: 50px;
  --home-feature-title-size: 18px;
  --home-feature-title-lh: 1.5;
  --home-feature-title-weight: var(--font-weight-strong);
  --home-feature-body-size: 16px;
  --home-feature-body-lh: 1.6;
  --home-feature-body-weight: var(--font-weight-body);
  --home-feature-body-color: var(--text-secondary);
  --home-feature-bg: #f4f4f4;
  --home-feature-border: 1px solid rgba(0,0,0,.08);
  --home-feature-icon-gap: 10px;
  --home-feature-padding: 24px;
  --home-bundle-padding: 50px;
  --home-bundle-gap: 120px;
  --home-invite-copy-offset-compact: 96px;
  --home-bundle-title-size: 44px;
  --home-faq-columns: minmax(0,1fr);
  --home-faq-width: 960px;
  --home-faq-title-size: 36px;
  --home-faq-title-lh: 1.3;
  --home-faq-title-weight: var(--font-weight-strong);
  --home-faq-content-gap: 40px;
  --home-faq-question-size: 18px;
  --home-answer-size: 16px;
  --home-cta-padding: 60px 70px 70px;
  --home-cta-radius: 25px;
  --home-cta-text-gap: 9px;
  --home-cta-content-gap: 50px;
  --home-cta-badge-size: 11px;
  --home-cta-title-width: 600px;
  --home-background-min: 120%;
  --home-background-max: 150%;
  --home-background-color-mask: linear-gradient(0deg,rgba(0,0,0,.32) 100%,rgba(0,0,0,.26) 100%,rgba(0,0,0,.98) 100%);
  --home-background-image-mask: linear-gradient(90deg,rgba(0,0,0,.12) 0%,rgba(0,0,0,.1) 100%);
  --home-cta-shadow: rgba(0,0,0,.52) 0 2px 2px -1.5px,rgba(0,0,0,.4) 0 5px 5px -3px,rgba(0,0,0,.4) 0 10px 10px -3px,rgb(130,130,130) 0 0 0 1px;
}
@media (width < 1440px) {
  .home-page {
    --home-proof-gap: 40px;
    --home-section-title-size: 44px;
    --home-benefits-title-size: 32px;
    --home-footer-offset: 100px;
    --home-bundle-padding: 30px;
    --home-bundle-gap: 35px;
    --home-bundle-title-size: 30px;
    --home-faq-title-size: 32px;
    --home-cta-padding: 50px 60px 60px;
    --home-cta-content-gap: 40px;
  }
  :root {
    --footer-title-size: 28px;
    --footer-body-size: 14px;
    --footer-gap: 40px;
  }
}
@media (width < 810px) {
  .home-page {
    --home-content-gap: 50px;
    --home-proof-gap: 45px;
    --home-action-gap: 20px;
    --home-section-title-size: 31px;
    --home-benefits-title-size: 28px;
    --home-footer-offset: 80px;
    --home-benefits-content-gap: 40px;
    --home-feature-body-size: 15px;
    --home-section-title-lh: 1.3;
    --home-bundle-padding: 25px;
    --home-bundle-title-size: 23px;
    --home-faq-title-size: 28px;
    --home-faq-content-gap: 30px;
    --home-faq-question-size: 16px;
    --home-answer-size: 15px;
    --home-cta-padding: 40px 50px 50px;
  }
  :lang(en) .home-page {
    --home-hero-description-size: 16px;
    --home-hero-description-gap: 20px;
  }
  :root {
    --footer-title-size: 26px;
    --footer-body-size: 13px;
    --footer-gap: 45px;
    --footer-columns: minmax(0,1fr);
    --footer-brand-gap: 20px;
    --nav-link-gap: 25px;
  }
}

/* 商品与首页优势区按实际可用宽度切换列数。 */
@media (width < 1024px) { .home-page { --home-benefits-columns: repeat(2,minmax(0,1fr)); } }
@media (width < 600px) { .home-page { --home-benefits-columns: minmax(0,1fr); } }

/* V3: 已审阅商店页面的流式尺寸，内容与字号层级保持原有语义。 */
.home-page,.product-page {
  --layout-gutter: clamp(16px, 2.2vw, 28px);
  --layout-gap: clamp(14px, 1.7vw, 20px);
  --layout-section-gap: clamp(28px, 4vw, 50px);
  --layout-card-padding: clamp(16px, 2vw, 25px);
  --layout-card-gap: clamp(16px, 2.2vw, 27px);
  --layout-feature-padding: clamp(16px, 1.9vw, 24px);
  --layout-panel-padding: clamp(20px, 3vw, 40px);
  --layout-detail-aside: clamp(300px, 30vw, 360px);
  --layout-dialog-padding: clamp(18px, 3vw, 27px);
  --container-gutter: var(--layout-gutter);
}

/* 邀请奖励运营页：暖红行动色、浅金背景，沿用现有字号、间距与圆角。 */
.invite-page, .home-page #invite {
  --invite-accent: #b52d22;
  --invite-accent-hover: #942217;
  --invite-ink: #752a1e;
  --invite-soft: var(--cashback-surface);
  --invite-gold-soft: #fff8e7;
  --invite-border: #efd5c4;
}

/* 邀请卡：画布以逻辑尺寸绘制，PNG 按 3 倍导出。 */
.invite-page {
  --invite-card-width: 380px;
  --invite-card-export-scale: 3;
  --invite-card-padding: var(--space-6);
  --invite-card-title-size: var(--text-lead-size);
  --invite-card-qr-size: 140px;
  --invite-card-brand-width: 92px;
  --invite-card-dialog-width: calc(var(--invite-card-width) + var(--space-6)*2);
  --invite-card-art-size: 42px;
  --invite-card-border: var(--border-subtle);
}

/* 首页主标题保持语义上的两行，窄屏按可用宽度缩放。 */
.home-page{--home-hero-two-line-size:clamp(28px,5vw,var(--text-display-size))}
:lang(en) .home-page{--home-hero-two-line-size:clamp(20px,4.3vw,var(--text-display-size))}
