/* 桂花铺子客服：共用的设计语言（颜色、字、节奏）。值照抄 docs/design/期6_样稿/tokens.css（设计第 11 节），
   只去掉样稿的截图模式；图标的 SVG 命名空间写成百分号编码（页面里不出现任何外部网址的字样，tests/test_static.py 会查）。 */
:root {
  --paper: #ffffff;
  --mist: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #aeaeb2;
  --rule: #e8e8ed;
  --osmanthus: #c7962f;
  --done: #248a3d;
  --human: #b25e00;
  --stop: #d70015;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --t-34: 600 34px/1.18 var(--font);
  --t-24: 600 24px/1.25 var(--font);
  --t-20: 600 20px/1.3 var(--font);
  --t-17: 400 17px/1.5 var(--font);
  --t-15: 400 15px/1.55 var(--font);
  --t-13: 400 13px/1.45 var(--font);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --fast: 180ms;
  --base: 200ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: var(--t-15);
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
button { font: inherit; color: inherit; }
/* 中文段落不留一个字的孤行（“址。”“要吗？”单独一行很难看） */
p, li, .say, .m, .why, .lead, .sub { text-wrap: pretty; }
/* 中文没有按词断行：balance 会切出“本人 / 的订单”。所以靠文案控制——
   一句一行（两句之间用换行），数字和单位之间用不断行空格（U+00A0） */
.nb { white-space: nowrap; }
/* 焦点环：样稿是 0.45 的透明度，叠在白底、mist 底上只有 1.9:1；提到 0.8（白底 3.4:1、mist 3.2:1，WCAG 1.4.11 要 3:1，裁定 R37） */
:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.8); outline-offset: 2px; border-radius: 8px; }

/* 店标：一个桂花金的点 + 店名；全套设计里唯一用到品牌色的地方 */
.mark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.01em; }
/* 店标：四瓣的桂花（桂花就是四瓣），只在这里用桂花金 */
.mark::before { content: ""; width: 15px; height: 15px; flex: none; background: var(--osmanthus);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 20 20'%3E%3Cg%3E%3Cellipse cx='10' cy='5.2' rx='2.9' ry='4'/%3E%3Cellipse cx='10' cy='14.8' rx='2.9' ry='4'/%3E%3Cellipse cx='5.2' cy='10' rx='4' ry='2.9'/%3E%3Cellipse cx='14.8' cy='10' rx='4' ry='2.9'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 20 20'%3E%3Cg%3E%3Cellipse cx='10' cy='5.2' rx='2.9' ry='4'/%3E%3Cellipse cx='10' cy='14.8' rx='2.9' ry='4'/%3E%3Cellipse cx='5.2' cy='10' rx='4' ry='2.9'/%3E%3Cellipse cx='14.8' cy='10' rx='4' ry='2.9'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }

/* 字标（甲 3 任务 10）：英文那面的店标是一张图（static/brand.js 画的），那朵小花已经画在字标里——不再另画；图定高、宽跟着走。
   高度每个页面自己定（--wordmark）；字标的墨色就是 --ink、花是 --osmanthus，全套设计里用到品牌色的还是只有店标 */
.mark.wordmark::before { content: none; }
.mark.wordmark img { display: block; height: var(--wordmark, 28px); width: auto; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.done { background: var(--done); }
.dot.human { background: var(--human); }
.dot.stop { background: var(--stop); }
.dot.quiet { background: var(--ink-3); }

.btn-primary {
  appearance: none; border: 0; cursor: pointer;
  height: 50px; border-radius: 12px; padding: 0 20px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
  transition: transform var(--fast) var(--ease-out), background var(--fast) var(--ease-out);
}
.btn-primary:active { transform: scale(0.98); }
.btn-text {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font-size: 15px; padding: 10px 12px; border-radius: 10px;
}
.btn-text:hover { color: var(--ink); }

/* 语言菜单（甲 3 任务 17，static/i18n/switch.js 画）：开着三门以上语言时，切换链接换成它——按钮写这一页那门的名字（类名照抄原来那个链接，
   样子也就一样），点开往下弹一列链接，每门一个。两门时没有它（还是原来那个链接），页面一个像素都不变。焦点环用上面那条 :focus-visible */
.langs { position: relative; display: inline-flex; }
.langs > button { display: inline-flex; align-items: center; }
.langs > button::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 8px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.langs > button[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(-135deg); }
.langs-list { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 100%; margin: 0; padding: 6px; list-style: none;
  background: var(--paper); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06); }
.langs-list[hidden] { display: none; }
.langs-list a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; color: var(--ink); font-size: 15px;
  text-decoration: none; white-space: nowrap; }
.langs-list a:hover { background: var(--mist); }
.langs-list a[aria-current="true"] { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* ================= 英文那面（甲 3 任务 10）=================
   拉丁字母的页面（<html data-script="latin">，任务 17 起按文字系统、不按语言：每个面设语言的那一处按登记表写上它）：拉丁字体排前面
   （中文字体留在后面，回放里的中文数据照样有字）；行高按拉丁字收一点
   （中文方块字要 1.5–1.55 才透气，拉丁字有上下伸出的笔画，1.4–1.47 就够，再松就散）；大标题的字距收紧。
   中文那面（没有 data-script）一个值都不变。 */
html[data-script="latin"] {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --t-34: 600 34px/1.15 var(--font);
  --t-24: 600 24px/1.2 var(--font);
  --t-20: 600 20px/1.25 var(--font);
  --t-17: 400 17px/1.45 var(--font);
  --t-15: 400 15px/1.47 var(--font);
  --t-13: 400 13px/1.4 var(--font);
}
