/* AI易订 · 前端样式
   视觉语言：Cobalt —— 白色画布、墨色文字、唯一的品牌蓝 #0052ff、胶囊按钮、24px 卡片圆角、等宽数字。
   约束：站点 CSP 为 style-src 'self'，因此不使用内联样式、外部字体或外部图片；图形全部是内联 SVG 或 data: URI。
   状态钩子：[hidden]、:disabled、[aria-selected]、[aria-pressed]、[aria-busy]、#identity[data-state]、
   #account-message[data-error]、#account-task[data-status]、html[data-mode]、html.delivery-open。 */

/* ---------- 1. 令牌 ---------- */
:root {
  color-scheme: light;
  --primary: #0052ff;
  --primary-hover: #0048e0;
  --primary-active: #003ecc;
  --primary-disabled: #a8b8cc;
  --primary-soft: #eef3ff;
  --primary-soft-line: #c9d8ff;
  --ink: #0a0b0d;
  --body: #5b616e;
  --placeholder: #6c727d;
  --muted-soft: #a8acb3;
  --hairline: #dee1e6;
  --hairline-soft: #eef0f3;
  --canvas: #ffffff;
  --surface-soft: #f7f7f7;
  --surface-strong: #eef0f3;
  --surface-dark: #0a0b0d;
  --surface-dark-elevated: #16181c;
  --surface-dark-line: #2a2d33;
  --on-dark: #ffffff;
  --on-dark-soft: #a8acb3;
  --accent: #f4b000;
  --success: #067647;
  --success-soft: #e9f7ef;
  --success-line: #05b169;
  --danger: #cf202f;
  --danger-soft: #fdeeef;
  --warning: #8a5700;
  --warning-soft: #fff6dc;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 100px; --r-full: 9999px;
  --gutter: 24px;
  --container: 1120px;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 24px 64px rgba(10, 11, 13, 0.22);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; scrollbar-gutter: stable; }
html.delivery-open, html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--canvas); color: var(--ink);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body > main { flex: 1 0 auto; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.25; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
code, pre { font-family: var(--font-mono); }
svg { flex: none; }
::selection { background: #cddcff; color: var(--ink); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

/* ---------- 3. 按钮 ---------- */
button.primary, button.secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border: 0; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600; line-height: 1.15; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, opacity .15s ease;
}
button.primary { background: var(--primary); color: #fff; }
button.primary:hover { background: var(--primary-hover); }
button.primary:active { background: var(--primary-active); }
button.primary:disabled { background: var(--primary-disabled); cursor: not-allowed; }
button.secondary { background: var(--surface-strong); color: var(--ink); }
button.secondary:hover { background: #e4e7ec; }
button.secondary:active { background: #dadee5; }
button.secondary:disabled { color: var(--muted-soft); cursor: not-allowed; }
button.wide { width: 100%; min-height: 56px; padding: 16px 32px; }
.text-button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 2px;
  border: 0; background: none; color: var(--primary); font-size: 14px; font-weight: 600;
  border-radius: var(--r-xs); cursor: pointer; white-space: nowrap;
}
.text-button:hover { color: var(--primary-active); text-decoration: underline; text-underline-offset: 3px; }
.text-button:disabled { color: var(--muted-soft); cursor: not-allowed; text-decoration: none; }

/* 处理中：busy() 设置 aria-busy；查询/提交按钮只在请求进行中被禁用 */
button[aria-busy="true"], #lookup-submit:disabled, #admin-lookup-submit:disabled, #account-submit:disabled, #copy-all-codes:disabled {
  cursor: progress;
}
button[aria-busy="true"]::before, #lookup-submit:disabled::before, #admin-lookup-submit:disabled::before, #account-submit:disabled::before, #copy-all-codes:disabled::before {
  content: ""; width: 16px; height: 16px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite;
}
button.primary[aria-busy="true"], #account-submit:disabled, #copy-all-codes:disabled { background: var(--primary); color: #fff; opacity: .85; }
button.secondary[aria-busy="true"], #lookup-submit:disabled, #admin-lookup-submit:disabled { color: var(--ink); }

/* ---------- 4. 表单 ---------- */
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
label .field-help { font-weight: 400; margin-left: 6px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-soft); color: var(--muted-soft); cursor: not-allowed; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%235b616e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 16px;
}
textarea { min-height: 132px; resize: vertical; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; }
textarea[readonly] { background: var(--surface-soft); }
input[type="number"] { font-family: var(--font-mono); }
.field { margin-bottom: 24px; }
.field-help { font-size: 13px; line-height: 1.6; color: var(--body); }
.field > .field-help, .field > .secure-note { margin-top: 8px; }
.inline-status { margin-top: 8px; min-height: 0; font-size: 14px; color: var(--body); }
.inline-status:empty { margin-top: 0; }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row > input { flex: 1 1 auto; min-width: 0; }
.input-row > button { flex: none; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-row label { margin-bottom: 0; }
.field > .section-row { margin-bottom: 8px; }
.muted { color: var(--body); }
.secure-note {
  display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--body);
}
.secure-note::before {
  content: ""; width: 16px; height: 16px; margin-top: 3px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='7' width='10' height='7' rx='1.6' fill='none' stroke='%235b616e' stroke-width='1.4'/%3E%3Cpath d='M5.4 7V5.3a2.6 2.6 0 0 1 5.2 0V7' fill='none' stroke='%235b616e' stroke-width='1.4'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* ---------- 5. 胶囊标签 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--surface-strong); color: var(--ink);
  font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.pill:empty { display: none; }

/* ---------- 6. 页头 ---------- */
.header {
  display: flex; align-items: center; gap: 32px;
  max-width: calc(var(--container) + 2 * var(--gutter)); width: 100%; height: 64px; margin: 0 auto; padding: 0 var(--gutter);
}
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; border-radius: var(--r-sm); }
/* 横版 Logo（矢量、透明底，适合白色或浅灰背景）：页头 32px 高，页脚 24px 高 */
.brand-logo { display: block; flex: none; width: 176px; height: 32px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1790 326'%3E%3Cpath fill='%230146db' d='M162.1 2.5L471.5 2.4L475.5 2.6L476.7 3.5L446.5 73.3L438.8 87.5L430.9 97.5L423.1 105.5L410.5 114.8L399.5 120.6L382.5 126.6L363.5 129.2L168.5 129.1L146.5 131.1L132.5 135.1L121.5 139.2L109.5 146.1L99.5 153.3L86.2 166.5L80.3 174.5L74.3 183.5L61.1 208.5L53.5 209.2L13.5 209.2L3.9 208.5L3.5 207.5L6.1 200.5L58.4 79.5L70.2 57.5L74.9 50.5L88.5 34.5L103.5 22.2L116.5 14.3L128.5 9.2L141.5 5.2L152.5 3.2ZM440.8 143.5L518.5 143.1L521.5 143.3L521.9 144.5L476.8 252.5L465.9 274.5L453.5 290.5L446.5 297.2L436.5 304.9L422.5 312.7L402.5 319.7L383.5 322.1L47.5 322.3L40.5 322.1L39.7 321.5L73.3 243.5L84.5 224.7L92.5 214.5L103.5 203.3L116.5 193.5L131.5 185.2L148.5 179.2L163.5 176.3L174.5 175.6L358.5 175.6L375.5 174.7L392.5 171L407.5 164.9L421.5 156.6L435.7 145.5Z'/%3E%3Cpath fill='%230b192d' fill-rule='evenodd' d='M834.6 46.5L844.5 45.9L855.5 49.5L863.8 56.5L867 61.5L868.9 66.5L869.9 71.5L869.7 78.5L868.7 83.5L866.5 88.5L862.9 93.5L858.5 97.8L853.5 100.8L847.5 102.9L835.5 103L826.5 99.8L822.1 96.5L817.3 91.5L814.4 86.5L813.1 82.5L812 76.5L812.1 70.5L813.5 64.5L815.5 60.7L820.1 54.5L824.8 50.5L828.5 48.4ZM1214.9 46.5L1219.5 45.6L1223.5 45.8L1228.5 47.2L1232.4 49.5L1254.3 69.5L1262.7 79.5L1264.3 86.5L1264 89.5L1262.6 92.5L1255.5 99.7L1245.3 107.5L1241.5 109L1236.5 109.6L1232.5 108.8L1228.5 106.8L1198.3 76.5L1196.2 73.5L1195.1 70.5L1194.9 66.5L1197.1 60.5L1208.5 50ZM941.4 52.5L948.5 51.6L1119.5 51.7L1127.5 53.3L1132.5 56.2L1134.9 58.5L1137.9 63.5L1139.4 69.5L1139.6 140.5L1138.9 145.5L1136.9 150.5L1131.5 156.9L1125.5 159.8L1117.5 160.9L999.5 161.2L991.7 173.5L991.9 174.5L994.5 174.9L1137.5 175L1144.4 176.5L1151.1 180.5L1155.9 186.5L1158 195.5L1157.7 221.5L1155.8 247.5L1153 265.5L1149.7 277.5L1143.8 288.5L1137.5 295.6L1131.5 299.6L1120.5 303.9L1106.5 305.7L1098.5 305.7L1078.5 303.7L1073.5 301.8L1070.2 297.5L1069.5 291.5L1069.5 273.5L1070.3 270.5L1072.5 266.9L1074.5 265.3L1078.5 263.8L1095.5 264.7L1103.5 263.8L1107.9 260.5L1110.7 255.5L1113.9 239.5L1115.8 211.5L1113.5 208.1L1108.5 207.5L1093.5 207.4L1091.5 208.2L1087 222.5L1080.7 238.5L1073.8 251.5L1064.7 264.5L1052.5 278.5L1040.5 289.7L1030.5 297.7L1015.5 306.6L1011.5 307.8L1007.5 307.8L1000.7 304.5L992.5 297.7L990.2 294.5L989.5 290.5L990.2 286.5L992.7 283.5L1014.5 266.6L1030.6 249.5L1043.9 229.5L1048.7 218.5L1051.9 208.5L1051.5 207.5L1029.5 207.5L1022 222.5L1014.6 234.5L1000.5 252.4L983.5 268.2L969.5 278.6L956.5 286.9L937.5 296.7L930.5 298.8L926.5 298.8L921.5 296.9L915.2 290.5L911 284.5L909.3 280.5L909.6 275.5L911.4 272.5L933.5 260.8L956.5 244.7L964.9 237.5L979.4 222.5L985.7 213.5L988.3 208.5L987.7 207.5L986.5 207.3L966.5 207.8L955.3 218.5L942.5 228.7L930.5 236.6L924.5 238.7L918.5 238L915.5 236.2L904.5 224.2L902.4 220.5L902.1 215.5L903.5 211.8L928.5 191.8L941.7 178.5L953.6 161.5L943.5 160.6L937 158.5L931.2 153.5L928.1 146.5L928.1 67.5L930.2 61.5L932.5 58.2L937.5 54.2ZM1296.6 54.5L1438.5 54.3L1442.5 55.2L1445.5 56.9L1447.9 59.5L1449.7 63.5L1449.9 84.5L1447.8 89.5L1445.5 91.9L1439.5 94.2L1405.5 94.4L1403.6 95.5L1403.4 254.5L1402.6 267.5L1398.9 281.5L1393.6 290.5L1384.5 298.5L1371.5 303.7L1363.5 305.1L1352.5 305.7L1321.5 303.7L1315.5 301.6L1313.5 299.5L1311.6 295.5L1310.9 289.5L1311.1 271.5L1312.5 266.6L1315.2 262.5L1317.5 261.1L1321.5 260.2L1348.5 261.1L1354.5 258.2L1356.8 255.5L1358 252.5L1358.7 244.5L1358.6 95.5L1357.5 94.6L1354.5 94.4L1297.5 94.2L1291.5 92.6L1288.3 89.5L1286.3 84.5L1286.3 64.5L1287.2 61.5L1290 57.5L1293.5 55.3ZM641.9 56.5L706.5 55.9L709.5 56.3L710.7 57.5L764.9 195.5L800.9 290.5L802.8 296.5L802.5 297.7L800.5 298.5L794.5 298.7L754.5 298.7L748.5 298.6L745.6 297.5L739.2 282.5L721.8 235.5L720.5 234.3L650.5 234.1L628.5 234.5L626.5 235.4L603.1 296.5L601.5 298.2L598.5 298.7L554.5 298.7L548.5 298.5L547.5 297.5L562.3 257.5L619 111.5L638.3 62.5L640.5 57.8ZM969.3 81.5L971.5 80.9L992.5 80.7L1095.5 81L1097.8 83.5L1097.9 93.5L1096.5 94.9L1090.5 94.9L969.5 94.7L968.2 93.5L968 89.5L968 83.5ZM674.3 105.5L697.7 167.5L705 188.5L704.5 189.7L647.5 189.8L643.7 189.5L642.9 188.5L672.1 109.5ZM969.2 119.5L1096.5 119.4L1097.9 120.5L1098.1 129.5L1096.5 132.1L1091.5 132.8L972.5 132.7L969.5 132L968.2 130.5L968.1 120.5ZM1189.3 122.5L1243.5 122L1249.5 123.3L1253.5 125.9L1256.5 130.5L1257.9 137.5L1258.1 235.5L1258.5 236.3L1259.5 236.3L1282.5 220.5L1288.5 218.4L1291.8 219.5L1294.5 222.5L1297.8 234.5L1299.6 248.5L1298.9 252.5L1296.5 256.1L1280.9 268.5L1250.5 289.8L1237.5 298.8L1226.5 304.9L1221.5 304.8L1216.9 301.5L1213.2 296.5L1205.2 282.5L1203.9 277.5L1204 273.5L1205 270.5L1213.1 261.5L1214.9 257.5L1215.7 253.5L1215.4 161.5L1214.5 160.5L1212.5 160.3L1189.5 159.7L1185.5 157.9L1183.2 155.5L1181.3 150.5L1181.2 131.5L1184.1 125.5ZM821 128.5L861.5 128.5L864.5 128.9L865.5 130.5L865.8 295.5L865.1 297.5L863.5 298.4L820.5 298.6L818.5 298.3L816.6 296.5L816.7 131.5L817.5 129.1Z'/%3E%3Cpath fill='%234a586b' fill-rule='evenodd' d='M1515.4 189.5L1527.5 190.2L1534.5 192.3L1540.5 195.2L1548.8 201.5L1554 209.5L1553.5 210.6L1537.5 220.7L1536.5 220.5L1532.9 215.5L1528.5 212.1L1523.5 210.3L1518.5 209.8L1513.5 210.2L1508.5 212.1L1504.2 215.5L1500.5 220.5L1497.8 228.5L1497.8 239.5L1500.3 247.5L1503 251.5L1506.5 254.8L1513.5 257.9L1522.5 257.8L1528.5 255.7L1531.5 253.8L1537.5 247.4L1554.1 257.5L1553.9 259.5L1549.8 265.5L1541.5 272.5L1532.5 276.8L1521.5 278.6L1509.5 278.1L1501.5 275.8L1495.5 272.9L1488.5 267.8L1484.4 263.5L1479.3 255.5L1476.2 246.5L1474.8 237.5L1474.9 227.5L1477.2 217.5L1479.3 212.5L1485 204.5L1491.5 198.2L1496.5 195.1L1505.5 191.3ZM1599 189.5L1611.5 190.1L1616.5 191.2L1625.5 195.4L1632.5 200.4L1638.8 207.5L1641.7 212.5L1644.7 220.5L1646.5 230.5L1646.3 239.5L1644.7 248.5L1642.9 253.5L1637 263.5L1630.5 269.8L1622.5 274.8L1613.5 277.7L1606.5 278.6L1598.5 278.6L1588.5 276.6L1581.5 273.6L1573.5 267.9L1569.3 263.5L1564.4 255.5L1561.3 246.5L1560 238.5L1560.1 228.5L1561.3 221.5L1564.4 212.5L1568.5 206L1573.7 200.5L1582.5 194.3L1590.5 191.1ZM1698.3 189.5L1708.5 190.2L1714.5 192.4L1720.5 196.1L1726.5 201.9L1732.5 196.2L1739.5 192.1L1745.5 190.2L1751.4 189.5L1759.5 190L1764.5 191.2L1772.5 195.2L1776.5 198.6L1780.7 203.5L1782.8 207.5L1785.8 218.5L1786.2 250.5L1785.5 277L1764.5 277.4L1763.6 276.5L1763.5 228.5L1762.8 220.5L1759.8 214.5L1757.5 212.2L1753.3 210.5L1748.5 209.9L1742.5 211L1738.5 213.4L1735.2 217.5L1733.8 221.5L1733.2 226.5L1732.9 276.5L1731.5 277.2L1711.5 277.1L1710.7 275.5L1710.7 227.5L1710 220.5L1707.6 215.5L1704.5 212.4L1700.4 210.5L1695.5 210L1691.5 210.4L1686.6 212.5L1683.5 215.6L1681 220.5L1680.3 276.5L1679.5 277.2L1658.5 277.1L1657.9 266.5L1658.1 191.5L1678.5 191.2L1679.5 192.3L1680.5 197.4L1688.5 192.1ZM1596.9 210.5L1606.5 210L1613.5 212.3L1619.8 218.5L1623.7 228.5L1623.8 238.5L1620.7 248.5L1616.5 253.6L1608.5 257.7L1598.5 257.9L1591.5 254.8L1586.1 249.5L1583.1 241.5L1582.3 231.5L1584.9 221.5L1587.2 217.5L1590.5 214ZM1443.1 249.5L1448.5 248.6L1453.5 249.4L1458.5 252.5L1462 257.5L1463 263.5L1462 269.5L1458.4 274.5L1452.5 277.8L1446.5 278.2L1439.5 275.8L1436 272.5L1434 268.5L1433.2 262.5L1434.2 257.5L1437.5 252.9Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.header nav { display: flex; gap: 24px; }
.header nav a { color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; border-radius: var(--r-xs); }
.header nav a:hover { color: var(--primary); }

/* ---------- 7. 首屏（深色编辑区） ---------- */
.hero { background: var(--surface-dark); color: var(--on-dark); padding: 64px var(--gutter) 168px; overflow: hidden; }
.hero-inner {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 4px 12px;
  border-radius: var(--r-pill); background: var(--surface-dark-elevated); color: var(--on-dark-soft);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.hero-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
html[data-mode="simulation"] .hero-eyebrow::after {
  content: "模拟环境"; margin-left: 4px; padding: 0 8px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--ink); letter-spacing: 0;
}
.hero h1 { color: var(--on-dark); font-size: 52px; font-weight: 400; line-height: 1.12; letter-spacing: 0; }
.hero-lede { margin-top: 20px; max-width: 30em; color: var(--on-dark-soft); font-size: 17px; line-height: 1.7; }
.hero-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.hero-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--on-dark-soft); font-size: 14px; }
.hero-points svg {
  width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--surface-dark-elevated);
  fill: none; stroke: #8fb0ff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.hero-points strong { display: block; color: var(--on-dark); font-size: 15px; font-weight: 600; }
.hero-art svg { display: block; width: 100%; height: auto; max-width: 520px; margin-left: auto; }
.art-brand { fill: var(--primary); }
.art-coin { fill: var(--accent); }
.art-card-dark { fill: var(--surface-dark-elevated); stroke: var(--surface-dark-line); }
.art-card-light { fill: #fff; }
.art-track { fill: var(--surface-dark-line); }
.art-up { fill: var(--success-line); }
.art-check { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.art-pill { fill: var(--primary-soft); }
.hero-art text { font-family: var(--font-sans); }
.art-t-strong { fill: #fff; font-size: 15px; font-weight: 700; }
.art-t-soft { fill: var(--on-dark-soft); font-size: 14px; }
.art-t-hero { fill: #fff; font-size: 40px; font-weight: 400; }
.art-t-mono { fill: var(--success-line); font-family: var(--font-mono); font-size: 14px; }
.art-t-ink { fill: var(--ink); font-size: 16px; font-weight: 600; }
.art-t-code { fill: var(--body); font-family: var(--font-mono); font-size: 15px; letter-spacing: .04em; }
.art-t-pill { fill: var(--primary); font-size: 12px; font-weight: 600; }

/* ---------- 8. 工作区卡片 ---------- */
.workspace { position: relative; z-index: 1; max-width: calc(var(--container) + 2 * var(--gutter)); margin: -120px auto 0; padding: 0 var(--gutter); }
.main-card {
  padding: 32px; border: 1px solid var(--hairline); border-radius: var(--r-xl); background: var(--canvas);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.card-top h2 { font-size: 28px; font-weight: 400; }
.card-sub { margin-top: 4px; font-size: 14px; color: var(--body); }
#mode-pill { flex: none; }
html[data-mode="simulation"] #mode-pill, html[data-mode="simulation"] #admin-mode { background: var(--warning-soft); color: var(--warning); }
html[data-mode="simulation"] #mode-pill::before, html[data-mode="simulation"] #admin-mode::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
html[data-mode="live"] #mode-pill { background: var(--success-soft); color: var(--success); }
html[data-mode="unavailable"] #mode-pill { background: var(--danger-soft); color: var(--danger); }

/* 选项卡：灰色轨道上的白色胶囊 */
.tabs {
  display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-strong);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--body); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--canvas); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--hairline); }
.tabs button:focus-visible { outline-offset: -2px; }
.tab-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-selected="true"] .tab-icon { color: var(--primary); }
#tab-account { margin-left: auto; }
#tab-account::after {
  content: ""; width: 12px; height: 12px; opacity: .7;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 2.5h5.5V8M9.2 2.8 2.5 9.5' fill='none' stroke='%235b616e' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.panel { padding-top: 32px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h3, .lookup-intro h3 { font-size: 20px; font-weight: 600; }

/* ---------- 9. 购买卡密 ---------- */
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 184px; padding: 20px; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: var(--canvas); color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.product:hover:not(:disabled) { border-color: var(--primary-soft-line); box-shadow: var(--shadow-soft); }
.product strong { font-size: 22px; font-weight: 600; line-height: 1.2; padding-right: 32px; }
.product small { font-size: 13px; color: var(--body); }
.product .check {
  position: absolute; top: 18px; right: 18px; width: 24px; height: 24px;
  display: grid; place-items: center; border: 1.5px solid var(--hairline); border-radius: 50%;
  color: transparent; font-size: 13px; font-weight: 700; line-height: 1;
}
.product .price {
  margin-top: auto; display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-mono); font-size: 24px; font-weight: 500; line-height: 1.3;
}
.product .price em { font-family: var(--font-sans); font-style: normal; font-size: 12px; font-weight: 400; color: var(--body); }
.product[aria-pressed="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.product[aria-pressed="true"] .check { border-color: var(--primary); background: var(--primary); color: #fff; }
.product:disabled { cursor: not-allowed; opacity: .6; }
.product:disabled .price em { color: var(--danger); }
/* 套餐加载中 / 加载失败 */
#products > p.muted {
  grid-column: 1 / -1; min-height: 184px; display: grid; place-items: center;
  border: 1px dashed var(--hairline); border-radius: var(--r-lg);
  background: linear-gradient(100deg, var(--surface-soft) 30%, #fff 50%, var(--surface-soft) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite; color: var(--body); font-size: 14px;
}
html[data-mode="unavailable"] #products > p.muted { animation: none; background: var(--danger-soft); border-color: #f4c7cb; color: transparent; position: relative; }
html[data-mode="unavailable"] #products > p.muted::after {
  content: "套餐暂时无法加载，请使用页面顶部的“重新连接”。"; position: absolute; inset: 0; display: grid; place-items: center;
  padding: 16px; text-align: center; color: var(--danger); font-size: 14px;
}

.buy-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px;
  margin: 24px 0 16px; padding: 20px 24px; border-radius: var(--r-lg); background: var(--surface-soft);
}
.quantity-row { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; }
.quantity-row label { grid-column: 1 / -1; }
#quantity { width: 120px; text-align: center; }
.purchase-summary { font-family: var(--font-mono); font-size: 20px; font-weight: 500; text-align: right; }
.purchase-summary:not(:empty)::before {
  content: "合计"; display: block; font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--body);
}
.sale-result {
  margin-top: 16px; padding: 20px 24px; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  display: grid; gap: 6px; justify-items: start;
}
.sale-result strong { font-size: 17px; }
.sale-result small { font-family: var(--font-mono); font-size: 13px; color: var(--body); word-break: break-all; }
.sale-result p { color: var(--body); }
.sale-result p:has(button) { margin-top: 8px; }
.sale-result > button { margin-top: 8px; }
.sale-result > p[role="status"]::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid var(--primary); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite;
}

/* ---------- 10. 卡密充值 ---------- */
#credential { min-height: 148px; }
.identity-card {
  margin-bottom: 24px; padding: 16px 20px; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: var(--surface-soft); display: grid; gap: 4px;
}
.identity-card .section-row strong { font-size: 14px; }
.identity-email { margin: 6px 0 2px; font-family: var(--font-mono); font-size: 16px; font-weight: 500; word-break: break-all; }
.identity-card .text-button { justify-self: start; }
/* 正在向服务器核验身份：重新核实按钮可见但被禁用 */
.identity-card:has(#identity-retry:disabled:not([hidden])) #identity-status::before {
  content: ""; width: 10px; height: 10px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite;
}
.identity-card[data-state="valid"] { background: var(--success-soft); border-color: #bfe5cf; }
.identity-card[data-state="valid"] #identity-status { background: var(--success); color: #fff; }
.identity-card[data-state="recognized"] #identity-status { background: var(--primary-soft); color: var(--primary); }
.identity-card[data-state="invalid"], .identity-card[data-state="conflict"], .identity-card[data-state="expired"] { background: var(--danger-soft); border-color: #f4c7cb; }
.identity-card[data-state="invalid"] #identity-status, .identity-card[data-state="conflict"] #identity-status, .identity-card[data-state="expired"] #identity-status { background: var(--danger); color: #fff; }
.identity-card[data-state="incomplete"], .identity-card[data-state="accepted_identity_incomplete"], .identity-card[data-state="accepted_expiry_unknown"], .identity-card[data-state="unavailable"] { background: var(--warning-soft); border-color: #f2dc9f; }
.identity-card[data-state="incomplete"] #identity-status, .identity-card[data-state="accepted_identity_incomplete"] #identity-status, .identity-card[data-state="accepted_expiry_unknown"] #identity-status, .identity-card[data-state="unavailable"] #identity-status { background: var(--accent); color: var(--ink); }

/* 充值任务进度 */
.order-result {
  margin-top: 24px; padding: 24px; border: 1px solid var(--hairline); border-radius: var(--r-xl);
  display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; row-gap: 8px; align-items: start;
}
.order-result > * { grid-column: 2; }
.order-result .status-art {
  grid-column: 1; grid-row: 1 / span 4; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 24px; line-height: 1;
}
.order-result:has(.status-line.done) .status-art { background: var(--success-soft); color: var(--success); }
.order-result:has(.status-line.stopped) .status-art { background: var(--warning-soft); color: var(--warning); }
.order-result:has(.status-line:not(.done):not(.stopped)) .status-art { animation: pulse 1.6s ease-in-out infinite; }
.order-result h3 { font-size: 20px; }
.task-reason { color: var(--body); }
.status-line { position: relative; height: 6px; margin: 8px 0; border-radius: var(--r-pill); background: var(--surface-strong); overflow: hidden; }
.status-line::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%;
  border-radius: inherit; background: var(--primary); animation: indeterminate 1.4s ease-in-out infinite;
}
.status-line.done::after { width: 100%; background: var(--success-line); animation: none; }
.status-line.stopped::after { width: 100%; background: var(--accent); animation: none; }
.status-meta { font-family: var(--font-mono); font-size: 13px; line-height: 1.8; color: var(--body); word-break: break-all; }
.order-result .text-button { justify-self: start; }

/* ---------- 11. 订单查询 ---------- */
.lookup-intro { margin-bottom: 24px; }
.lookup-intro .field-help { margin-top: 6px; max-width: 46em; }
.lookup-form { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 16px 16px; align-items: start; }
#lookup-form .input-row { align-items: flex-start; }
#lookup-value { flex: 1 1 auto; min-width: 0; }
#lookup-value[data-mode="order"] { height: 52px; min-height: 52px; resize: none; font-family: inherit; }
.lookup-copy-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
#lookup-copy-fallback { width: 100%; }
.lookup-code { display: block; overflow-wrap: anywhere; font-family: var(--font-mono); margin: 8px 0; }
.lookup-form > #lookup-verification-field, .lookup-form > .field-help { grid-column: 1 / -1; }
#lookup-verification-field .field-help, #lookup-verification-field + .field-help { margin-top: 8px; }
/* 查询状态行：完成/自动更新（中性）、出错或待补充（结果区隐藏时，琥珀色）、请求中（蓝色 + 转圈） */
#lookup-status:not(:empty), #admin-lookup-status:not(:empty) {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 10px 14px;
  border-radius: var(--r-md); background: var(--surface-soft); color: var(--ink);
}
#lookup-status:not(:empty):has(~ .lookup-result[hidden]), #admin-lookup-status:not(:empty):has(+ .lookup-result[hidden]) { background: var(--warning-soft); color: var(--warning); }
#panel-lookup:has(#lookup-submit:disabled) #lookup-status:not(:empty), .surface:has(#admin-lookup-submit:disabled) #admin-lookup-status:not(:empty) { background: var(--primary-soft); color: var(--primary); }
#panel-lookup:has(#lookup-submit:disabled) #lookup-status:not(:empty)::before, .surface:has(#admin-lookup-submit:disabled) #admin-lookup-status:not(:empty)::before {
  content: ""; width: 14px; height: 14px; margin-top: 4px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite;
}
.lookup-result { margin-top: 20px; display: grid; gap: 16px; transition: opacity .2s ease; }
.lookup-result[aria-busy="true"] { opacity: .55; }
.lookup-result > .lookup-summary {
  padding: 40px 24px 32px; border: 1px dashed var(--hairline); border-radius: var(--r-lg); text-align: center;
}
.lookup-result > .lookup-summary::before {
  content: ""; display: block; width: 56px; height: 56px; margin: 0 auto 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Ccircle cx='28' cy='28' r='28' fill='%23eef0f3'/%3E%3Ccircle cx='26' cy='26' r='9' fill='none' stroke='%235b616e' stroke-width='2.2'/%3E%3Cpath d='m33 33 7 7' stroke='%235b616e' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lookup-result > .lookup-summary strong { display: block; font-size: 16px; }
.lookup-result > .field-help { padding: 0 4px; }
.lookup-sale-card, .lookup-voucher { padding: 20px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--canvas); }
.lookup-voucher > .lookup-summary strong { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 17px; }
.lookup-voucher > .lookup-summary .field-help { margin-top: 4px; }
.lookup-attempt-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lookup-attempt-heading strong { font-size: 16px; }
.lookup-sale { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 24px; margin: 16px 0 0; }
.lookup-sale div { min-width: 0; }
.lookup-sale dt { font-size: 12px; color: var(--body); }
.lookup-sale dd { margin: 2px 0 0; font-weight: 500; word-break: break-all; }
.lookup-sale div:first-child dd { font-family: var(--font-mono); font-size: 14px; }
.lookup-attempt { margin-top: 12px; padding: 16px; border-radius: var(--r-md); background: var(--surface-soft); }
.lookup-attempt-title::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; vertical-align: 2px;
  border-radius: 50%; background: var(--primary); animation: pulse 1.6s ease-in-out infinite;
}
.lookup-attempt.lookup-completed { background: var(--success-soft); }
.lookup-attempt.lookup-completed .lookup-attempt-title::before { background: var(--success-line); animation: none; }
.lookup-attempt.lookup-stopped { background: var(--warning-soft); }
.lookup-attempt.lookup-stopped .lookup-attempt-title::before { background: var(--accent); animation: none; }
.lookup-attempt-reason { margin-top: 8px; color: var(--ink); font-size: 14px; }
.lookup-attempt-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 12px; color: var(--body); }
.lookup-attempt-meta span { word-break: break-all; }
.lookup-attempt-meta span:first-child { font-family: var(--font-mono); }

/* ---------- 12. 订单记录 ---------- */
.history-head { margin-bottom: 12px; }
#history-list { border-top: 1px solid var(--hairline); }
#history-list:empty::before { content: "订单记录会显示在这里。"; display: block; padding: 24px 4px; color: var(--body); font-size: 14px; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--hairline); }
.history-item > div { min-width: 0; display: grid; gap: 2px; }
.history-item strong { font-size: 16px; font-weight: 600; }
.history-item small { font-family: var(--font-mono); font-size: 13px; color: var(--body); word-break: break-all; }
#history-list > p.muted {
  padding: 48px 24px; text-align: center; border-bottom: 1px solid var(--hairline);
}
#history-list > p.muted::before {
  content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%23eef0f3'/%3E%3Crect x='20' y='16' width='24' height='32' rx='4' fill='%23fff' stroke='%235b616e' stroke-width='2'/%3E%3Cpath d='M26 26h12M26 32h12M26 38h7' stroke='%23a8acb3' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='44' cy='44' r='7' fill='%230052ff'/%3E%3Cpath d='M44 40.5v7M40.5 44h7' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- 13. 使用流程 ---------- */
.steps { margin-top: 96px; padding: 80px var(--gutter); background: var(--surface-soft); }
.steps-inner { max-width: var(--container); margin: 0 auto; }
.steps h2 { font-size: 36px; font-weight: 400; }
.steps-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps-list li { padding: 32px; border: 1px solid var(--hairline); border-radius: var(--r-xl); background: var(--canvas); }
.step-index { display: inline-block; font-family: var(--font-mono); font-size: 14px; color: var(--primary); font-weight: 500; }
.steps-list h3 { margin-top: 16px; font-size: 18px; }
.steps-list p { margin-top: 8px; font-size: 14px; color: var(--body); }

/* ---------- 14. 页脚 ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--hairline); background: var(--canvas); }
.footer-inner {
  max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 32px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 13px; color: var(--body);
}
.footer-brand { display: inline-flex; align-items: center; margin-right: auto; }
.footer-brand .brand-logo { width: 132px; height: 24px; }

/* ---------- 15. 管理后台 ---------- */
#admin { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 48px var(--gutter) 96px; }
.admin-intro { margin-bottom: 32px; }
.admin-eyebrow { margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--primary); }
.admin-intro h1 { font-size: 40px; font-weight: 400; }
.admin-intro .muted { margin-top: 8px; }
.login-box {
  max-width: 440px; padding: 32px; border: 1px solid var(--hairline); border-radius: var(--r-xl); background: var(--canvas);
  display: grid; gap: 12px;
}
.login-box label { margin-bottom: 0; }
.login-box button.primary { min-height: 52px; }
.admin-toolbar { margin-bottom: 24px; }
.admin-actions { display: flex; align-items: center; gap: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric { padding: 20px 24px; border: 1px solid var(--hairline); border-radius: var(--r-lg); display: grid; gap: 4px; }
.metric strong { font-family: var(--font-mono); font-size: 32px; font-weight: 500; line-height: 1.2; }
.metric span { font-size: 13px; color: var(--body); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.surface { margin-bottom: 24px; padding: 28px; border: 1px solid var(--hairline); border-radius: var(--r-xl); background: var(--canvas); }
.surface h2 { font-size: 20px; margin-bottom: 8px; }
.surface > .field-help { margin-bottom: 16px; }
.surface .lookup-form { grid-template-columns: minmax(0, 1fr); }
.admin-status { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--hairline-soft); font-size: 14px; color: var(--body); }
.admin-status:first-child { border-top: 0; }
.admin-status::before { content: ""; width: 8px; height: 8px; margin-top: 8px; flex: none; border-radius: 50%; background: var(--primary); }
.admin-status strong { color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--r-lg); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 16px; background: var(--surface-soft); color: var(--body); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
td { padding: 12px 16px; border-top: 1px solid var(--hairline-soft); vertical-align: top; }
#sales-table td:first-child, #task-table td:first-child { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
tbody tr:hover td { background: #fafbfc; }
td.empty-row { padding: 32px 16px; text-align: center; color: var(--body); font-family: var(--font-sans); font-size: 14px; }

/* ---------- 16. 弹窗 ---------- */
dialog.delivery-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px));
  padding: 0; border: 0; border-radius: var(--r-xl); background: var(--canvas); color: var(--ink); box-shadow: var(--shadow-float);
}
dialog.delivery-dialog[open] { display: flex; flex-direction: column; animation: dialog-in .18s ease-out; }
dialog.delivery-dialog::backdrop { background: rgba(10, 11, 13, .56); }
.delivery-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.delivery-heading h2 { font-size: 22px; font-weight: 600; }
.delivery-close {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--surface-strong); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
}
.delivery-close:hover { background: #e4e7ec; }
.delivery-description { padding: 8px 24px 0; color: var(--body); font-size: 14px; }
.delivery-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 24px; font-size: 13px; color: var(--body); }
#delivery-count { background: var(--success-soft); color: var(--success); }
#delivery-order { font-family: var(--font-mono); color: var(--ink); word-break: break-all; }
.delivery-scroll { flex: 1 1 auto; min-height: 96px; overflow: auto; margin: 0 24px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-soft); }
.delivery-code-text { margin: 0; padding: 16px 20px; font-size: 15px; line-height: 1.9; white-space: pre-wrap; word-break: break-all; }
.delivery-code-text:empty { display: none; }
.copy-codes-fallback { padding: 16px 20px; border-top: 1px solid var(--hairline); }
.copy-codes-fallback textarea { min-height: 96px; background: var(--canvas); }
.delivery-footer { display: grid; gap: 10px; padding: 20px 24px 24px; }
.delivery-footer .field-help { text-align: center; }

.account-dialog form { display: grid; gap: 12px; padding: 20px 24px 24px; overflow: auto; }
.account-dialog label { margin-bottom: 0; }
/* 状态区为空时只收起样式，不用 display:none，读屏器才能播报之后写入的提示 */
.account-message:empty { padding: 0; background: none; }
.account-message { padding: 12px 16px; border-radius: var(--r-md); background: var(--primary-soft); color: var(--ink); font-size: 14px; }
.account-message[data-error="true"] { background: var(--danger-soft); color: var(--danger); }
#account-form:has(#account-task[data-status="result_received"]:not([hidden])) .account-message { background: var(--success-soft); color: var(--success); }
.account-task { display: grid; gap: 10px; }
.account-task code { font-size: 13px; color: var(--ink); word-break: break-all; }
.account-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.account-steps li { position: relative; padding-top: 14px; font-size: 12px; color: var(--body); }
.account-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: var(--r-pill); background: var(--surface-strong); }
#account-task[data-status="queued"] .account-steps li:nth-child(1)::before,
#account-task[data-status="waiting_result"] .account-steps li:nth-child(-n+2)::before { background: var(--primary); }
#account-task[data-status="queued"] .account-steps li:nth-child(2)::before,
#account-task[data-status="waiting_result"] .account-steps li:nth-child(3)::before { background: var(--primary-soft-line); animation: pulse 1.4s ease-in-out infinite; }
#account-task[data-status="queued"] .account-steps li:nth-child(-n+2),
#account-task[data-status="waiting_result"] .account-steps li { color: var(--ink); }
#account-task[data-status="result_received"] .account-steps li::before { background: var(--success-line); }
#account-task[data-status="result_received"] .account-steps li { color: var(--success); }
#account-task[data-status="expired"] .account-steps li:nth-child(1)::before { background: var(--primary); }
#account-task[data-status="expired"] .account-steps li:nth-child(n+2)::before { background: #f4c7cb; }

/* ---------- 17. 提示条 ---------- */
dialog.account-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: hidden; }
.account-dialog .delivery-heading { padding-bottom: 20px; border-bottom: 1px solid var(--hairline-soft); flex: none; }
.aq-dialog-description { margin-top: 8px; color: var(--body); font-size: 13px; line-height: 1.6; }
.account-scroll { overflow: auto; min-height: 0; overscroll-behavior: contain; }
.account-dialog form { overflow: visible; padding-bottom: 12px; }
.account-input { display: grid; gap: 12px; }
.account-dialog[data-view="result"] form { padding: 0; }
.account-result { display: grid; gap: 16px; padding: 20px 24px 24px; }
.aq-notice { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--primary-soft-line); border-radius: var(--r-lg); background: var(--primary-soft); }
.aq-status-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: none; background: var(--canvas); color: var(--primary); border-radius: 50%; font-size: 18px; font-weight: 700; }
.aq-notice strong { font-size: 14px; }.aq-notice p { color: var(--body); font-size: 13px; margin-top: 2px; }
.aq-notice[data-outcome="partial"] { background: var(--warning-soft); border-color: #ecd59a; }
.aq-notice[data-outcome="partial"] .aq-status-icon { color: var(--warning); }
.aq-notice[data-outcome="failed"] { background: var(--danger-soft); border-color: #f4c7cb; }
.aq-notice[data-outcome="failed"] .aq-status-icon { color: var(--danger); }
.aq-account { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--hairline); border-radius: var(--r-lg); }
.aq-account-symbol { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; color: var(--primary); background: var(--primary-soft); font-size: 30px; }
.aq-account-copy { min-width: 0; flex: 1; }.aq-account h3 { margin-top: 4px; font-size: 19px; overflow-wrap: anywhere; }
.aq-account-copy p { font-size: 12px; color: var(--body); margin-top: 4px; }
.aq-eyebrow { display: block; font-size: 11px; letter-spacing: .04em; font-weight: 600; color: var(--body); }
.aq-account-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; flex: none; }
.aq-plan-badge { display: inline-flex; padding: 4px 10px; border-radius: var(--r-pill); background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; max-width: 180px; overflow-wrap: anywhere; }
.aq-requery { min-height: 36px; padding: 6px 12px; font-size: 12px; }
.aq-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aq-stat { min-width: 0; padding: 18px; border: 1px solid var(--hairline); border-radius: var(--r-lg); }
.aq-stat strong { display: block; margin: 8px 0 6px; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.aq-stat strong small { font-size: 13px; font-weight: 400; }.aq-stat p { color: var(--body); font-size: 12px; }
.aq-panel { border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.aq-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 20px; background: var(--surface-soft); border-bottom: 1px solid var(--hairline); }
.aq-panel-heading h3 { font-size: 16px; }.aq-panel-heading > span { color: var(--body); font-size: 12px; }
.aq-panel-heading .aq-eyebrow { font-size: 9px; letter-spacing: .08em; color: var(--primary); margin-bottom: 4px; }
.aq-subscription { padding: 18px 20px; font-size: 14px; white-space: pre-line; }
.aq-unconfirmed { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; color: var(--body); margin-top: 12px; }
.aq-billing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.aq-detail { padding: 18px 20px; min-width: 0; }.aq-detail dt { font-size: 12px; color: var(--body); margin-bottom: 6px; }
.aq-detail dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }.aq-detail-wide { grid-column: 1 / -1; border-top: 1px solid var(--hairline-soft); }
.aq-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.aq-table .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.aq-table th { font-weight: 400; font-size: 12px; color: var(--body); background: var(--canvas); }
.aq-table th,.aq-table td { text-align: left; padding: 16px; border-bottom: 1px solid var(--hairline-soft); vertical-align: middle; overflow-wrap: anywhere; }
.aq-table th:first-child { width: 30%; }.aq-table th:nth-child(2) { width: 19%; }.aq-table th:nth-child(3) { width: 15%; }.aq-table th:last-child { width: 36%; }
.aq-table tbody tr:last-child td { border-bottom: 0; }.aq-row-description { display: block; font-size: 12px; color: var(--body); margin-top: 4px; }
.aq-amount { font-weight: 600; font-variant-numeric: tabular-nums; }.aq-transaction-status { display: inline-block; background: var(--surface-strong); border-radius: var(--r-pill); padding: 3px 8px; font-size: 11px; }
.aq-files { display: flex; flex-wrap: wrap; gap: 8px; }.aq-download { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 10px; border: 1px solid var(--primary-soft-line); border-radius: 8px; font-size: 12px; color: var(--primary); background: var(--primary-soft); text-decoration: none; white-space: nowrap; }
.aq-download:hover { border-color: var(--primary); }.aq-download:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.aq-download:disabled { background: var(--surface-soft); color: var(--body); border-color: var(--hairline); opacity: .65; cursor: not-allowed; }
.aq-download-help { margin: 0; padding: 14px 20px; font-size: 12px; color: var(--body); background: var(--surface-soft); border-top: 1px solid var(--hairline-soft); }
.aq-file-note { display: block; margin-top: 6px; font-size: 11px; color: var(--warning); }.aq-empty { text-align: center; padding: 32px 20px; }.aq-empty strong { font-size: 14px; }.aq-empty p { margin-top: 6px; font-size: 12px; color: var(--body); }
.aq-more { border: 1px solid var(--hairline); border-radius: var(--r-lg); }.aq-more summary { padding: 14px 20px; font-size: 13px; cursor: pointer; }.aq-more dl { margin: 0; border-top: 1px solid var(--hairline-soft); }.aq-result-actions { display: flex; justify-content: flex-end; }
@media (max-width: 640px) {
  dialog.account-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .account-dialog .delivery-heading { padding: 18px 16px; }.account-dialog .delivery-heading h2 { font-size: 20px; }
  .account-dialog form { padding: 16px; }.account-dialog[data-view="result"] form { padding: 0; }
  .account-result { padding: 16px; gap: 12px; }.aq-account { padding: 16px; flex-wrap: wrap; gap: 12px; }
  .aq-account-actions { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }.aq-account h3 { font-size: 17px; }
  .aq-overview { grid-template-columns: 1fr; gap: 8px; }.aq-stat { padding: 14px 16px; display: grid; grid-template-columns: 1fr 1.4fr; align-items: center; column-gap: 12px; }.aq-stat strong { font-size: 17px; margin: 0; text-align: right; }.aq-stat p { grid-column: 1 / -1; margin-top: 6px; }
  .aq-panel-heading { padding: 14px 16px; }.aq-panel-heading > span { font-size: 11px; }.aq-subscription { padding: 16px; }
  .aq-billing-grid { grid-template-columns: 1fr; }.aq-detail { padding: 14px 16px; }.aq-detail + .aq-detail { border-top: 1px solid var(--hairline-soft); }
  .aq-table,.aq-table tbody,.aq-table tr { display: block; }.aq-table thead { display: none; }.aq-table tr { padding: 8px 16px; border-bottom: 1px solid var(--hairline); }.aq-table tr:last-child { border: 0; }
  .aq-table td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border: 0; text-align: right; }.aq-table td::before { content: attr(data-label); flex: none; font-weight: 400; color: var(--body); font-size: 12px; }.aq-table td:first-child { display: block; text-align: left; }.aq-table td:first-child::before { display: none; }
  .aq-table td:last-child { flex-wrap: wrap; }.aq-files { justify-content: flex-end; }.aq-file-note { width: 100%; }.aq-download-help { padding: 14px 16px; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translateX(-50%);
  width: max-content; max-width: min(560px, calc(100vw - 32px));
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 20px;
  border-radius: var(--r-lg); background: var(--surface-dark); color: var(--on-dark);
  font-size: 14px; line-height: 1.55; box-shadow: var(--shadow-float); animation: toast-in .2s ease-out;
}
.toast::before {
  content: "!"; flex: none; width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center;
  border-radius: 50%; background: #ff8a8a; color: var(--ink); font-size: 13px; font-weight: 700;
}

/* ---------- 18. 动效 ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes indeterminate { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .status-line:not(.done):not(.stopped)::after { left: 0; width: 60%; }
}

/* ---------- 19. 响应式 ---------- */
@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-art { display: none; }
  .hero h1 { font-size: 44px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  :root { --gutter: 16px; }
  /* iOS Safari 会在聚焦小于 16px 的输入框时自动放大页面 */
  textarea { font-size: 16px; }
  .header { gap: 16px; }
  .header nav { display: none; }
  .header .brand-logo { width: 154px; height: 28px; }
  .hero { padding: 40px var(--gutter) 128px; }
  .hero h1 { font-size: 34px; line-height: 1.2; }
  .hero-lede { font-size: 15px; }
  .hero-points { margin-top: 24px; gap: 10px; }
  .hero-points li { font-size: 13px; }
  .workspace { margin-top: -96px; }
  .main-card { padding: 20px 16px; border-radius: var(--r-lg); }
  .card-top h2 { font-size: 22px; }
  .tabs { margin: 0 -4px; }
  #tab-account { margin-left: 0; }
  .panel { padding-top: 24px; }
  .product { min-height: 160px; padding: 16px; }
  .product strong { font-size: 19px; }
  .product .price { font-size: 20px; }
  .buy-bar { padding: 16px; }
  .purchase-summary { text-align: left; }
  .lookup-form { grid-template-columns: minmax(0, 1fr); }
  .order-result { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .order-result > *, .order-result .status-art { grid-column: 1; grid-row: auto; }
  .steps { margin-top: 64px; padding: 56px var(--gutter); }
  .steps h2 { font-size: 28px; }
  .steps-list li { padding: 24px; }
  #admin { padding-top: 32px; }
  .admin-intro h1 { font-size: 30px; }
  .surface { padding: 20px 16px; border-radius: var(--r-lg); }
  .admin-toolbar { align-items: flex-start; }
  dialog.delivery-dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .toast { bottom: 16px; }
}
@media (max-width: 479px) {
  .products { gap: 10px; }
  .product { min-height: 0; padding: 14px; gap: 2px; }
  .product strong { font-size: 18px; padding-right: 28px; }
  .product small { display: none; }
  .product .check { top: 14px; right: 14px; width: 22px; height: 22px; }
  .product .price { margin-top: 18px; font-size: 18px; }
  .input-row { flex-wrap: wrap; }
  .input-row > button { flex: 1 1 100%; }
  .metrics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .metric { padding: 16px; }
  .metric strong { font-size: 26px; }
  .history-item { flex-wrap: wrap; }
}

/* 商品管理 */
.product-card-image { display:block; width:100%; height:120px; object-fit:cover; border-radius:12px; margin-bottom:16px; }
.product-thumb { display:block; width:64px; height:44px; object-fit:cover; border-radius:8px; }
.product-id { display:block; font-size:12px; color:var(--body); margin-top:4px; max-width:240px; overflow-wrap:anywhere; }
.product-delete { color:var(--danger); margin-left:8px; }
.product-search-row { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:20px 0; }
.product-search-row input { width: min(100%,360px); }
.product-editor { margin-top:20px; padding:24px; border:1px solid var(--hairline); border-radius:var(--r-lg); background:var(--surface-soft); }
.product-editor h3 { margin-bottom:20px; }
.product-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.product-field-wide { grid-column:1 / -1; }
.product-editor fieldset { min-width:0; border:1px solid var(--hairline); border-radius:12px; padding:20px; margin:20px 0; background:var(--canvas); }
.product-editor legend { font-size:15px; font-weight:600; padding:0 8px; }
.product-editor fieldset > .field-help { margin-bottom:16px; }
.product-editor select { width:100%; }
.product-editor input[readonly] { background:var(--surface-strong); color:var(--body); }
.product-checkbox { display:flex; align-items:center; gap:8px; margin-top:12px; font-weight:400; }
.product-checkbox input { width:18px; height:18px; min-height:0; }
.product-image-preview { display:block; width:200px; max-width:100%; max-height:160px; object-fit:contain; margin-top:16px; }
.product-editor-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.product-preview-result { margin-top:16px; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--ink); }
#product-message[data-error="true"] { color:var(--danger); }
@media(max-width:640px) { .product-form-grid { grid-template-columns:1fr; } .product-editor { padding:16px; } .product-editor fieldset { padding:14px; } .product-management > .section-row { align-items:flex-start; flex-direction:column; gap:12px; } .product-card-image { height:100px; } }

.product-sku-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin-top:8px; }
.product-sku-actions .product-delete { margin-left:0; }

/* 购买价格切换 */
.price-tier-row { display:flex; align-items:center; flex-wrap:wrap; gap:12px 16px; margin-bottom:20px; }
.price-tier-switch { display:inline-flex; gap:4px; padding:4px; border-radius:var(--r-pill); background:var(--surface-strong); border:1px solid var(--hairline); }
.price-tier-switch button { min-width:88px; min-height:36px; padding:7px 20px; border:0; border-radius:var(--r-pill); background:transparent; color:var(--body); font:inherit; font-size:14px; cursor:pointer; }
.price-tier-switch button[aria-pressed="true"] { background:var(--primary); color:#fff; font-weight:600; }
.price-tier-switch button:disabled { cursor:wait; opacity:.65; }
@media(max-width:640px) { .price-tier-row { gap:8px 12px; } .price-tier-switch button { min-width:76px; padding-inline:16px; } }

#product-pricing .price-constant-field, #product-pricing .price-rounding-field { grid-column:1; }
#product-pricing .price-precision-field, #product-pricing .agent-constant-field { grid-column:2; }
@media(max-width:640px) { #product-pricing .price-constant-field, #product-pricing .price-precision-field, #product-pricing .price-rounding-field, #product-pricing .agent-constant-field { grid-column:1 / -1; } }

/* Customer accounts and wallet */
.customer-auth{margin-left:auto}.header nav{margin-left:auto}.customer-auth #guest-actions,.customer-auth #member-actions{display:flex;align-items:center;gap:14px}.customer-auth [hidden]{display:none!important}.customer-auth .primary{padding:10px 20px}.balance-button{border:1px solid #d8e2ff;background:#eef3ff;color:#1253d9;padding:9px 14px;border-radius:24px;white-space:nowrap;font-weight:700}.user-menu{position:relative}.user-menu summary{cursor:pointer;font-weight:600;max-width:180px;overflow-wrap:anywhere}.user-menu>div{position:absolute;right:0;top:32px;z-index:20;width:150px;background:#fff;border:1px solid #dce1eb;border-radius:14px;box-shadow:0 12px 30px #11182720;padding:8px}.user-menu button{display:block;width:100%;border:0;background:none;text-align:left;padding:12px;border-radius:8px}.user-menu button:hover{background:#eef3ff}.customer-dialog{width:min(520px,calc(100vw - 32px));max-height:90dvh;overflow-y:auto;border:1px solid #dbe1ec;border-radius:24px;padding:28px;color:#101828;background:#fff;box-shadow:0 24px 80px #0004}.customer-dialog::backdrop{background:#10182880;backdrop-filter:blur(3px)}.customer-dialog h2{font-size:23px;margin:0}.user-form{display:grid;gap:16px;margin-top:20px}.user-form label{display:grid;gap:8px;font-weight:600}.user-form input{width:100%;min-width:0}.auth-links{display:flex;justify-content:space-between;margin-top:18px}.registration-reminder{background:#fff5d6;border:2px solid #e9ab26;border-radius:14px;padding:16px;color:#714300}.registration-reminder strong{font-size:17px}.registration-reminder p{font-size:13px;line-height:1.8;margin:8px 0 0}.user-form .inline-status{margin:0;color:#ad321e}.wallet-balance{font-size:34px;font-weight:700;margin:24px 0 8px}.wallet-ledger-row{display:flex;justify-content:space-between;gap:16px;border-top:1px solid #e8ebf1;padding:14px 0}.wallet-ledger-row small{display:block;font-size:11px;color:#617089;overflow-wrap:anywhere;margin-top:4px}.wallet-ledger-row>div:last-child{text-align:right;white-space:nowrap}.topup-result:empty{display:none}.topup-result{background:#f3f6fc;padding:16px;border-radius:14px;margin:18px 0}.payment-choice{display:flex;align-items:center;gap:14px;margin:20px 0;flex-wrap:wrap}.payment-choice label{font-weight:600;margin:0}.payment-choice select{width:auto;min-width:150px}.customer-auth button:focus-visible,.user-menu summary:focus-visible{outline:3px solid #87abff;outline-offset:3px}
@media(max-width:640px){.header{flex-wrap:wrap;gap:12px}.header nav{display:none}.customer-auth{max-width:100%}.customer-auth #member-actions{gap:10px}.user-menu summary{max-width:110px}.balance-button{font-size:12px;padding:8px 10px}.customer-dialog{padding:20px}.wallet-dialog .input-row{flex-wrap:wrap}.wallet-dialog .input-row input{width:100%}.payment-choice .field-help{width:100%}}
.header{position:relative;z-index:5;height:auto;min-height:72px;padding-top:12px;padding-bottom:12px}@media(max-width:640px){.customer-auth{width:100%;margin:0}.customer-auth #guest-actions,.customer-auth #member-actions{justify-content:flex-end}.header .brand{margin-right:auto}}
/* Personal center page */
.user-menu a{display:block;width:100%;text-align:left;padding:12px;border-radius:8px;color:inherit;text-decoration:none;font-size:inherit;line-height:inherit}.user-menu a:hover{background:#eef3ff}.user-menu a:focus-visible{outline:3px solid #87abff;outline-offset:3px}.personal-center{max-width:1184px;margin:0 auto;padding:48px var(--gutter) 64px;min-height:calc(100dvh - 220px)}.personal-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:20px}.personal-heading h1{font-size:36px;line-height:1.25;margin:6px 0 12px}.personal-eyebrow{font-size:12px;color:var(--primary);font-weight:700;letter-spacing:2px}.personal-heading>.secondary{white-space:nowrap}.personal-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.personal-card{border:1px solid var(--hairline);border-radius:24px;padding:28px;background:var(--canvas)}.personal-card h2{font-size:20px;margin:0 0 16px}.personal-details{display:grid;gap:20px;margin:24px 0}.personal-details dt{font-size:12px;color:var(--body);margin-bottom:6px}.personal-details dd{margin:0;font-size:17px;font-weight:600;overflow-wrap:anywhere}.personal-wallet{background:var(--primary-soft);border-color:var(--primary-soft-line)}.personal-balance{font-size:40px;font-weight:700;margin:18px 0 8px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.personal-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.personal-ledger{margin-top:24px}.personal-ledger .section-row h2{margin-bottom:0}.personal-ledger table{min-width:650px}.personal-ledger td{vertical-align:middle}.personal-sale-id{display:block;color:var(--body);font-size:11px;margin-top:6px}.personal-amount{white-space:nowrap;font-variant-numeric:tabular-nums}.amount-credit{color:#057a55}.personal-empty{padding:36px 0 20px;color:var(--body);text-align:center}.personal-card>p+button{margin-top:16px}
@media(max-width:640px){.personal-center{padding-top:28px}.personal-heading{align-items:flex-start;flex-direction:column;gap:16px}.personal-heading h1{font-size:28px}.personal-grid{grid-template-columns:1fr;gap:16px}.personal-card{padding:20px;border-radius:20px}.personal-balance{font-size:34px}.personal-ledger{margin-top:16px}.personal-ledger .section-row{gap:8px;flex-wrap:wrap}}
.personal-card,.personal-grid>*{min-width:0}.personal-ledger .table-wrap{max-width:100%;overflow-x:auto}.personal-center .table-wrap table{width:100%}
.personal-center{width:100%;min-width:0}
.personal-consumption{margin-top:32px}.personal-consumption h2{font-size:20px}.personal-consumption>.section-row{margin-bottom:16px}.personal-consumption .personal-actions{margin:0}.personal-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:10px}.personal-stat{background:var(--surface-soft);border:1px solid var(--hairline);border-radius:16px;padding:20px;min-width:0}.personal-stat>span{display:block;font-size:12px;color:var(--body);margin-bottom:10px}.personal-stat>strong{display:block;font-size:24px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.personal-purchases{margin-top:24px}.personal-purchases .section-row{margin-bottom:20px}.personal-purchases .section-row h2{margin:0}.personal-purchases table{min-width:1050px;width:100%}.personal-purchases .table-wrap{max-width:100%;overflow-x:auto}.personal-order-id{font-family:var(--font-mono);font-size:11px;white-space:nowrap}.personal-badge{display:inline-block;font-size:12px;border:1px solid;border-radius:7px;padding:3px 8px;white-space:nowrap}.badge-ok{background:#e9f9ef;border-color:#b4e5c5;color:#067241}.badge-pending{background:#fff6e4;border-color:#ecd49d;color:#855900}.personal-pagination{display:flex;justify-content:flex-end;align-items:center;gap:16px;margin-top:20px}#personal-codes-dialog textarea{width:100%;resize:vertical;font-family:var(--font-mono);margin:10px 0 16px}#personal-codes-order{overflow-wrap:anywhere;margin:12px 0}#personal-codes-status{margin-top:12px}@media(max-width:760px){.personal-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.personal-stat{padding:16px}.personal-stat>strong{font-size:21px}}
.user-menu summary{display:flex;align-items:center;gap:6px;list-style:none;white-space:nowrap}.user-menu summary::-webkit-details-marker{display:none}.user-menu summary>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Customer management workbench */
.admin-workspace-nav{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}.admin-workspace-nav a{padding:8px 14px;border:1px solid var(--hairline);border-radius:20px;text-decoration:none}.customer-management{scroll-margin-top:20px}.cm-filter{display:flex;gap:14px;flex-wrap:wrap;align-items:flex-end;margin:20px 0}.cm-filter label{display:grid;gap:8px;min-width:180px;flex:1}.cm-filter button{white-space:nowrap}.cm-pagination{display:flex;gap:16px;align-items:center;justify-content:flex-end;margin-top:12px;font-size:13px}.cm-detail{border-top:2px solid var(--primary-soft-line);padding-top:24px;margin-top:28px;scroll-margin-top:20px}.cm-balances{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}.cm-balances>div{background:var(--surface-soft);border:1px solid var(--hairline);border-radius:14px;padding:16px;min-width:0}.cm-balances span{display:block;font-size:12px;color:var(--body)}.cm-balances strong{display:block;font-size:22px;overflow-wrap:anywhere}.cm-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin-top:20px}.cm-form{display:grid;gap:14px;border:1px solid var(--hairline);border-radius:18px;padding:22px;margin-bottom:20px;min-width:0}.cm-form h3{font-size:18px}.cm-form label{display:grid;gap:8px;font-size:13px;font-weight:600}.cm-form input,.cm-form select,.cm-form textarea{width:100%;min-width:0}.cm-form button{justify-self:start}.cm-danger{background:#fff7f6;border-color:#efc7c2}.cm-danger button{color:#b52e21}.cm-ledger-item{display:grid;gap:3px;border-top:1px solid var(--hairline);padding:10px 0;overflow-wrap:anywhere}.cm-ledger-item small{font-size:11px;color:var(--body)}.cm-audit{border-top:1px solid var(--hairline);padding-top:28px;margin-top:28px;scroll-margin-top:20px}.cm-audit table{min-width:1050px}.cm-audit td{max-width:300px;overflow-wrap:anywhere;vertical-align:top}.cm-audit pre{max-width:420px;max-height:360px;overflow:auto;font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere}.cm-audit summary{cursor:pointer;color:var(--primary)}#cm-ledger{max-height:500px;overflow:auto}#cm-message[data-error="true"]{color:#ac3023}.customer-management>.table-wrap table{min-width:800px}#cm-recover{margin-top:16px}@media(max-width:760px){.cm-editor-grid{grid-template-columns:1fr}.cm-balances{grid-template-columns:repeat(2,minmax(0,1fr))}.cm-form{padding:16px}.cm-balances strong{font-size:19px}.cm-filter label{min-width:100%}}
.catalog-platform-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}.catalog-platform-switch{display:flex;padding:4px;border:1px solid var(--hairline);border-radius:14px;background:var(--surface-soft);gap:4px}.catalog-platform-switch button{border:0;background:none;padding:10px 28px;border-radius:10px;font-weight:700;color:var(--body)}.catalog-platform-switch button[aria-pressed="true"]{background:var(--ink);color:#fff}.catalog-platform-switch button:disabled{opacity:.6}.product-readonly{cursor:default;text-align:left}.product-readonly:hover{border-color:var(--hairline);transform:none}.admin-product-platforms{display:flex;gap:12px;margin:24px 0}.admin-product-platforms button[aria-pressed="true"]{background:var(--primary);color:#fff}.hy-status{white-space:pre-line;background:var(--surface-soft);padding:16px;border-radius:14px;margin:16px 0;font-size:13px}.hy-error{white-space:pre-line;background:#fff2ec;color:#a33a1c;border:1px solid #f0c7b7;border-radius:14px;padding:16px;margin:14px 0;font-size:13px}.hy-price-change{display:block;font-size:11px;color:#a24a12;margin-top:5px}.hy-events{margin-top:24px}.hy-events>div>div{font-size:12px;border-bottom:1px solid var(--hairline);padding:10px 0}.hongyun-management .table-wrap table{min-width:850px}.hongyun-management .product-form-grid>label{display:grid;gap:8px}.hongyun-management .product-form-grid>label.product-checkbox{display:flex}.hongyun-management .product-form-grid input,.hongyun-management .product-form-grid select{width:100%;min-width:0}#hy-message[data-error="true"]{color:#ad321e}
