/* dekooz 统一页头 / 页脚（由 shell.js 渲染；所有 dekooz 页面共用）。
 * 只用 theme.css 的变量；类名全部带 hx- 前缀，不和各应用自己的样式冲突。 */
.hx-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.hx-wrap { max-width: var(--hx-container, 1360px); margin: 0 auto; padding: 0 var(--hx-gutter, 24px); display: flex; align-items: center; gap: 8px 18px; min-height: 56px; }
.hx-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.hx-brand img { display: block; }
.hx-mark { width: 32px; height: 32px; }
.hx-wordmark { height: 22px; width: auto; }
.hx-brand .hx-wordmark-light, .hx-brand .hx-mark-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hx-wordmark-dark, :root:not([data-theme="light"]) .hx-mark-dark { display: none; }
  :root:not([data-theme="light"]) .hx-wordmark-light, :root:not([data-theme="light"]) .hx-mark-light { display: block; }
}
:root[data-theme="dark"] .hx-wordmark-dark, :root[data-theme="dark"] .hx-mark-dark { display: none; }
:root[data-theme="dark"] .hx-wordmark-light, :root[data-theme="dark"] .hx-mark-light { display: block; }
/* 产品名是品牌锁定的一部分（dekooz ⁄ 用户中心）：灰色、不加粗、斜杠分隔，和导航拉开距离 */
.hx-app { position: relative; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none; padding-left: 14px; margin-left: -4px; margin-right: 10px; }
.hx-app::before { content: ''; position: absolute; left: 0; top: 50%; height: 20px; border-left: 1px solid var(--border); transform: translateY(-50%) rotate(16deg); }
.hx-app:hover { color: var(--text); }

.hx-nav { display: flex; align-items: center; gap: 2px 16px; flex-wrap: wrap; }
.hx-nav a, .hx-nav summary {
  color: var(--muted); text-decoration: none; font-weight: 500; padding: 6px 0;
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; list-style: none;
}
.hx-nav summary::-webkit-details-marker { display: none; }
.hx-nav summary::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.hx-nav a:hover, .hx-nav summary:hover { color: var(--text); }
.hx-nav a[aria-current="page"], .hx-nav details[data-current] > summary { color: var(--text); border-bottom-color: var(--brand-orange); }
.hx-dd { position: relative; }
.hx-dd-menu {
  position: absolute; top: calc(100% + 6px); left: -12px; min-width: 200px; padding: 6px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.hx-dd-menu a { padding: 8px 12px; border-radius: 8px; border-bottom: 0; }
.hx-dd-menu a:hover { background: var(--accent-soft); color: var(--text); }
.hx-dd-menu a small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }

.hx-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hx-header [hidden] { display: none !important; } /* 不靠各应用的 [hidden] 规则：关着的菜单、游客 / 头像都要真的藏起来 */
.hx-pop { position: relative; }
.hx-ico { display: inline-flex; line-height: 0; }
.hx-caret { opacity: .7; }
.hx-pop.hx-open .hx-caret { transform: rotate(180deg); }
.hx-menu-list {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px; padding: 6px; z-index: 60;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
}
.hx-menu-list a, .hx-menu-list button {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; min-height: 0; margin: 0; padding: 8px 12px; border-radius: 8px; border: 0; background: none;
  box-shadow: none; font: inherit; font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--text); text-decoration: none; text-align: left; cursor: pointer; white-space: nowrap;
}
.hx-menu-list a:hover, .hx-menu-list button:hover { background: var(--accent-soft); }
.hx-menu-list [aria-checked="true"]::after { content: '✓'; margin-left: auto; color: var(--accent); font-weight: 700; }
.hx-menu-list hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
/* 语言：地球 + 语言名 */
.hx-lang {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; color: var(--muted); background: none; border: 1px solid transparent;
  border-radius: 999px; padding: 5px 8px; cursor: pointer;
}
.hx-lang:hover, .hx-pop.hx-open .hx-lang { color: var(--text); border-color: var(--border); }
/* 工作台：主按钮 */
.hx-workbench {
  padding: 6px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--accent);
}
.hx-workbench:hover { filter: brightness(1.08); }
.hx-workbench[aria-current="page"] { background: transparent; color: var(--accent); }
/* 游客：登录（文字）· 注册（描边） */
.hx-guest { display: inline-flex; align-items: center; gap: 4px; }
.hx-signin, .hx-signup { padding: 6px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; white-space: nowrap; color: var(--text); border: 1px solid transparent; }
.hx-signin:hover { color: var(--accent); }
.hx-signup { border-color: var(--border); }
.hx-signup:hover { border-color: var(--accent); color: var(--accent); }
/* 登录后：头像 + 菜单 */
.hx-avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px;
}
.hx-avatar:hover, .hx-pop.hx-open .hx-avatar { border-color: var(--accent); }
.hx-avatar-text:empty { display: none; }
.hx-acct { min-width: 220px; }
.hx-acct-head { display: grid; gap: 2px; padding: 8px 12px 10px; }
.hx-acct-head strong { font-size: 14px; }
.hx-acct-mail { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.hx-acct-head > [hidden] { display: none; }
.hx-ghost {
  font: inherit; font-size: 13px; color: var(--text); background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 8px; cursor: pointer;
}
.hx-ghost:hover { border-color: var(--accent); }
.hx-menu { display: none; font: inherit; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text); width: 36px; height: 32px; cursor: pointer; }
.hx-menu span, .hx-menu span::before, .hx-menu span::after { display: block; width: 16px; height: 2px; background: currentColor; margin: 0 auto; position: relative; content: ''; }
.hx-menu span::before { position: absolute; top: -5px; left: 0; }
.hx-menu span::after { position: absolute; top: 5px; left: 0; }

/* 页尾贴底，纯 CSS（业界常用的 sticky footer 写法）：shell 把页面内容放进 .hx-page，body 是纵向 flex，
   .hx-page 撑满剩余高度。页面自己的 margin: 0 auto 容器在 .hx-page 这个普通块里，不会被 flex 收缩。
   不用 JS 量高度：那要监听整个文档的变化，任何 DOM 变化都会唤醒它，还可能和浏览器扩展互相触发。 */
body.hx-has-footer { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.hx-has-footer > .hx-page { flex: 1 0 auto; min-width: 0; }
body.hx-has-footer > .hx-header, body.hx-has-footer > .hx-footer { flex: none; }
.hx-footer { margin-top: 48px; border-top: 1px solid var(--border); padding: 28px 0 32px; color: var(--muted); font-size: 14px; }
.hx-footer .hx-wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; align-items: start; min-height: 0; }
.hx-footer .hx-brand { margin-bottom: 8px; }
.hx-footer p { margin: 4px 0; }
.hx-footer a { color: var(--muted); text-decoration: none; }
.hx-footer a:hover { color: var(--text); }
.hx-footer-title { color: var(--text); font-weight: 600; margin-bottom: 6px !important; }
.hx-footer-note { max-width: var(--hx-container, 1360px); margin: 16px auto 0; padding: 0 var(--hx-gutter, 24px); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.hx-footer-note .hx-footer-sep { color: var(--border); }
/* 两行精简页脚（工具页，data-footer="compact"）：上下各一行，不分栏；链接之间用 · 分隔，手机上自动换行 */
.hx-footer--compact { margin-top: 24px; padding: 12px 0 14px; font-size: 13px; line-height: 1.5; }
.hx-footer--compact .hx-wrap { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.hx-footer--compact .hx-footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; max-width: none; margin: 0; padding: 0; }
.hx-footer--compact .hx-footer-note { font-size: 12px; }
.hx-footer--compact .hx-brand { margin: 0 10px 0 0; }
.hx-footer--compact .hx-footer-about { color: var(--muted); }
.hx-footer--compact .hx-footer-version code { font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hx-footer--compact .hx-brand img, .hx-footer--compact .hx-brand svg { height: 18px; width: auto; }
.hx-footer--compact .hx-footer-sep { color: var(--border); }
.hx-footer--compact a { display: inline-flex; align-items: center; min-height: 28px; }

/* 「跳到正文」：键盘用户按 Tab 第一个碰到它，平时藏在屏幕上方（shell.js 的 skipLink） */
.hx-skip {
  position: fixed; left: 12px; top: 8px; z-index: 1000; transform: translateY(-200%);
  padding: 8px 14px; border-radius: 10px; background: var(--accent, #0068d6); color: var(--accent-text, #fff);
  font: 600 14px/1.4 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.hx-skip:focus { transform: none; outline: 3px solid var(--brand-orange, #f58220); outline-offset: 2px; }
.hx-skip-target:focus { outline: none; } /* 跳过去的正文区只接焦点，不画框 */

@media (max-width: 860px) {
  .hx-app { display: none; }
  .hx-menu { display: inline-flex; align-items: center; justify-content: center; }
  .hx-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px 16px 14px;
    background: var(--panel); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; gap: 0;
  }
  .hx-header.hx-open .hx-nav { display: flex; }
  .hx-nav a, .hx-nav summary { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .hx-nav a[aria-current="page"], .hx-nav details[data-current] > summary { border-bottom-color: var(--border); color: var(--brand-orange); }
  .hx-dd-menu { position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; background: transparent; }
  .hx-footer .hx-wrap { grid-template-columns: 1fr 1fr; }
  .hx-footer .hx-wrap > :first-child { grid-column: 1 / -1; }
  /* 手机上页脚链接是手指点的：每个链接至少 32px 高（WCAG 2.2 要求点击目标不小于 24px） */
  .hx-footer p.hx-footer-item { margin: 0; }
  .hx-footer-item > a { display: inline-flex; align-items: center; min-height: 32px; }
}
@media (max-width: 480px) {
  .hx-wordmark { display: none !important; }
  .hx-wrap { gap: 6px; }
  .hx-right { gap: 4px; }
  .hx-workbench, .hx-signin, .hx-signup { padding: 5px 9px; font-size: 13px; }
  .hx-lang-label { display: none; } /* 手机上只留地球图标 */
  .hx-lang { padding: 5px 6px; }
  .hx-avatar { width: 30px; height: 30px; font-size: 13px; }
  .hx-menu { width: 32px; height: 30px; }
}

/* 密码框的显示 / 隐藏按钮（shell.js 自动包住每个 input[type=password]） */
.hx-pw { position: relative; display: grid; min-width: 0; flex: 1 1 auto; }
.hx-pw > input { width: 100%; box-sizing: border-box; padding-right: 40px; }
.hx-pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; display: grid; place-items: center;
  padding: 0; margin: 0; border: 0; background: transparent; color: var(--muted, #6b7280); border-radius: 8px; cursor: pointer; line-height: 0; }
.hx-pw-toggle:hover, .hx-pw-toggle:focus-visible { color: var(--text, inherit); background: color-mix(in srgb, currentColor 10%, transparent); }
.hx-pw-toggle.on .hx-pw-slash { display: none; } /* 明文时是睁开的眼睛，打码时眼睛带斜线 */

/* 帮助入口：问号 + 文字 */
.hx-help { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); text-decoration: none; border: 1px solid transparent; border-radius: 999px; padding: 5px 8px; }
.hx-help:hover, .hx-help[aria-current="page"] { color: var(--text); border-color: var(--border); }
@media (max-width: 800px) { .hx-help-label { display: none; } .hx-help { padding: 5px 6px; } }
/* 工具页顶部的三行说明（bindIntros） */
.hx-intro-wrap { width: 100%; max-width: var(--hx-container, 1360px); box-sizing: border-box; margin: 0 auto; padding: 10px var(--hx-gutter, 24px) 0; }
.hx-intro { position: relative; display: grid; gap: 4px; margin: 0 0 14px; padding: 12px 104px 12px 16px; border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 12px; background: var(--panel); color: var(--text); font-size: 14px; line-height: 1.6; }
.hx-intro[hidden] { display: none; }
.hx-intro p { margin: 0; }
.hx-intro b { font-weight: 700; }
.hx-intro .hx-intro-links { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hx-intro .hx-intro-links a { color: var(--accent); }
.hx-intro-close { position: absolute; top: 10px; right: 10px; font: inherit; font-size: 13px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text); }
.hx-intro-close:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) { .hx-intro { padding-right: 16px; padding-bottom: 48px; } .hx-intro-close { top: auto; bottom: 10px; } }

/* ---------------- 右下角「需要帮助？」：按钮 + 从按钮上方弹出的帮助面板（buildHelpFab） ----------------
   颜色都带后备值：有的页面（模型查看器）没有共用主题变量。 */
.hx-help-root {
  --hx-fab-bg: var(--accent, #0068d6);
  --hx-inq-panel: var(--panel, #fff); --hx-inq-text: var(--text, #141a24); --hx-inq-muted: var(--muted, #5b6474);
  --hx-inq-border: var(--border, #e2e5eb); --hx-inq-field: var(--bg, #f6f7f9); --hx-inq-danger: var(--danger, #c62f28); --hx-inq-ok: var(--ok, #0f7b4f);
}
.hx-fab {
  /* 平时只有图标的 48px 圆钮，少挡工作区；鼠标悬停 / 键盘聚焦时向左展开成带「需要帮助？」文字的胶囊（用户 2026-10-21）。
     宽度不写死：收起 = 12px 内边距 + 24px 图标 + 12px；展开靠文字的 max-width 从 0 变大做动画 */
  position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(var(--hx-fab-bottom, 16px) + env(safe-area-inset-bottom, 0px)); z-index: 950;
  display: inline-flex; align-items: center; height: 48px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--hx-fab-bg); color: var(--accent-text, #fff); font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 8px 22px rgba(0, 40, 120, .28), 0 2px 6px rgba(0, 0, 0, .12); transition: transform .15s, box-shadow .15s, padding .25s;
}
.hx-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 40, 120, .32), 0 3px 8px rgba(0, 0, 0, .14); }
.hx-fab:active { transform: translateY(0); }
.hx-fab:focus-visible { outline: 3px solid var(--brand-orange, #f58220); outline-offset: 3px; }
.hx-fab-ico { display: inline-flex; width: 24px; height: 24px; flex: none; }
.hx-fab-label { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; margin-left: 0; transition: max-width .25s ease, opacity .2s ease, margin-left .25s ease; }
.hx-fab:hover, .hx-fab:focus-visible { padding-right: 18px; }
.hx-fab:hover .hx-fab-label, .hx-fab:focus-visible .hx-fab-label { max-width: 200px; opacity: 1; margin-left: 8px; }
.hx-fab-left { right: auto; left: calc(16px + env(safe-area-inset-left, 0px)); }
/* 旧参数：以前只有无页脚的全屏页用图标圆钮，现在所有页面都是，这个类留着不再有差别 */
.hx-fab-compact { }
.hx-help-open .hx-fab { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { .hx-fab, .hx-fab:hover, .hx-fab:focus-visible { padding: 0 12px; } .hx-fab-label { display: none; } } /* 触屏没有 hover：始终只有图标 */
@media print { .hx-fab { display: none; } }

/* 面板：桌面上从按钮上方弹出（右下角，宽 400），手机上全屏 */
.hx-inq {
  position: fixed; inset: auto calc(20px + env(safe-area-inset-right, 0px)) calc(var(--hx-fab-bottom, 20px) + env(safe-area-inset-bottom, 0px)) auto; margin: 0;
  width: min(400px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 40px)); padding: 0; overflow: hidden; box-sizing: border-box;
  display: flex; flex-direction: column; border: 1px solid var(--hx-inq-border); border-radius: 18px;
  background: var(--hx-inq-panel); color: var(--hx-inq-text); box-shadow: 0 24px 64px rgba(10, 20, 40, .28), 0 4px 14px rgba(10, 20, 40, .12);
  font-size: 14px; line-height: 1.5; transform-origin: bottom right; animation: hx-inq-in .18s ease-out;
}
.hx-inq:not([open]) { display: none; }
.hx-inq:focus { outline: none; }
.hx-inq::backdrop { background: rgba(10, 14, 22, .18); }
.hx-fab-left ~ .hx-inq { inset: auto auto calc(var(--hx-fab-bottom, 20px) + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px)); transform-origin: bottom left; }
@keyframes hx-inq-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
/* 「减少动态效果」：theme.css 里有全站兜底；没加载 theme.css 的页面（模型查看器）靠这里 */
@media (prefers-reduced-motion: reduce) {
  .hx-inq, .hx-inq-submit.hx-busy .hx-inq-submit-ico { animation: none; }
  .hx-fab, .hx-inq-quick, .hx-inq-field input, .hx-inq-field textarea, .hx-inq-submit { transition: none; }
  .hx-fab:hover, .hx-fab:active, .hx-inq-submit:active { transform: none; }
  .hx-fab-label { transition: none; }
}

/* 白字放在蓝底上：渐变从 #0068d6 开始（白字 5.3:1），不用更亮的品牌蓝（3.7:1，不够） */
.hx-inq-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 18px 16px 18px 20px; color: #fff;
  background: linear-gradient(135deg, #0068d6 0%, #0057b8 100%); }
.hx-inq-mark { width: 36px; height: 36px; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .14); padding: 4px; box-sizing: border-box; }
.hx-inq-head > div { flex: 1; min-width: 0; }
.hx-inq-head h2 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.3; color: #fff; }
.hx-inq-head p { margin: 2px 0 0; font-size: 13px; color: rgba(255, 255, 255, .92); }
.hx-inq-x { flex: none; align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.hx-inq-x:hover { background: rgba(255, 255, 255, .26); }
.hx-inq-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.hx-inq-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 18px; overscroll-behavior: contain; }
.hx-inq-quicks { display: grid; gap: 8px; margin: 0 0 18px; }
.hx-inq-quick { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--hx-inq-border); border-radius: 12px; color: var(--hx-inq-text);
  text-decoration: none; transition: border-color .15s, background .15s; }
.hx-inq-quick:hover, .hx-inq-quick:focus-visible { border-color: var(--hx-fab-bg); background: color-mix(in srgb, var(--hx-fab-bg) 6%, transparent); outline: none; }
.hx-inq-quick::after { content: "›"; margin-left: auto; font-size: 20px; line-height: 1; color: var(--hx-inq-muted); }
.hx-inq-quick-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 10px;
  color: var(--hx-fab-bg); background: color-mix(in srgb, var(--hx-fab-bg) 12%, transparent); }
.hx-inq-quick b { display: block; font-size: 14px; font-weight: 700; }
.hx-inq-quick small { display: block; font-size: 12px; color: var(--hx-inq-muted); }

.hx-inq-form { display: grid; gap: 12px; }
.hx-inq-form[hidden], .hx-inq-done[hidden] { display: none; }
.hx-inq-form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid var(--hx-inq-border); }
.hx-inq-form-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.hx-inq-form-head span { font-size: 12px; color: var(--hx-inq-muted); }
.hx-inq-row { display: contents; } /* 一列排：400 宽的面板里两列太挤，号码和说明都放不下 */
.hx-inq-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.hx-inq-field label { font-size: 13px; font-weight: 700; }
.hx-inq-field-message { grid-template-columns: 1fr auto; }
.hx-inq-field-message label { grid-column: 1; }
.hx-inq-count { grid-column: 2; align-self: end; font-size: 12px; color: var(--hx-inq-muted); font-variant-numeric: tabular-nums; }
.hx-inq-field-message textarea, .hx-inq-field-message .hx-inq-err { grid-column: 1 / -1; }
.hx-inq-field input, .hx-inq-field textarea {
  width: 100%; box-sizing: border-box; min-height: 42px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--hx-inq-text);
  background: var(--hx-inq-field); border: 1px solid var(--hx-inq-border); border-radius: 10px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.hx-inq-field textarea { resize: vertical; min-height: 104px; line-height: 1.55; }
.hx-inq-field input::placeholder, .hx-inq-field textarea::placeholder { color: var(--hx-inq-muted); opacity: .75; }
.hx-inq-field input:hover, .hx-inq-field textarea:hover { border-color: color-mix(in srgb, var(--hx-inq-muted) 55%, var(--hx-inq-border)); }
.hx-inq-field input:focus, .hx-inq-field textarea:focus { outline: none; background: var(--hx-inq-panel); border-color: var(--hx-fab-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-fab-bg) 22%, transparent); }
.hx-inq [aria-invalid="true"] { border-color: var(--hx-inq-danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-inq-danger) 16%, transparent) !important; }
.hx-inq-help { margin: 0; font-size: 12px; color: var(--hx-inq-muted); }
.hx-inq-err { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--hx-inq-danger); }
.hx-inq-err[hidden] { display: none; }
.hx-inq-err span { display: inline-flex; flex: none; }
.hx-inq-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.hx-inq-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--hx-inq-muted); line-height: 1.55; cursor: pointer; }
.hx-inq-consent input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--hx-fab-bg); cursor: pointer; }
.hx-inq-status { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--hx-inq-danger); background: color-mix(in srgb, var(--hx-inq-danger) 9%, transparent); }
.hx-inq-status:empty { display: none; }
/* 按钮把自己的内边距、行高都写全：各工具页对 button 有自己的全局样式 */
.hx-inq-submit, .hx-inq-primary, .hx-inq-ghost { font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; border-radius: 12px; cursor: pointer; min-height: 0; }
.hx-inq svg { flex: none; }
.hx-inq-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; margin-top: 2px; padding: 0 16px; border: 0;
  background: var(--hx-fab-bg); color: var(--accent-text, #fff); transition: filter .15s, transform .15s; }
.hx-inq-submit:hover { filter: brightness(1.07); }
.hx-inq-submit:active { transform: translateY(1px); }
.hx-inq-submit:focus-visible, .hx-inq-primary:focus-visible, .hx-inq-ghost:focus-visible { outline: 3px solid color-mix(in srgb, var(--hx-fab-bg) 45%, transparent); outline-offset: 2px; }
.hx-inq-submit-ico { display: inline-flex; }
.hx-inq-submit.hx-busy { cursor: progress; opacity: .8; }
.hx-inq-submit.hx-busy .hx-inq-submit-ico { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: hx-spin .8s linear infinite; }
.hx-inq-submit.hx-busy .hx-inq-submit-ico svg { display: none; }
@keyframes hx-spin { to { transform: rotate(360deg); } }
.hx-inq-or { margin: 0; text-align: center; font-size: 12.5px; color: var(--hx-inq-muted); }
.hx-inq-or a { color: var(--hx-fab-bg); font-weight: 600; text-decoration: none; }
.hx-inq-or a:hover { text-decoration: underline; }

.hx-inq-done { display: grid; justify-items: center; gap: 8px; padding: 26px 8px 8px; text-align: center; outline: none; }
.hx-inq-done-ico { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%;
  color: var(--on-ok, #fff); background: var(--hx-inq-ok); box-shadow: 0 0 0 8px color-mix(in srgb, var(--hx-inq-ok) 14%, transparent); margin-bottom: 8px; }
.hx-inq-done h3 { margin: 0; font-size: 18px; font-weight: 800; }
.hx-inq-done p { margin: 0 0 10px; max-width: 30em; color: var(--hx-inq-muted); }
.hx-inq-done-actions { display: flex; gap: 8px; }
.hx-inq-primary { padding: 10px 20px; border: 0; background: var(--hx-fab-bg); color: var(--accent-text, #fff); }
.hx-inq-ghost { padding: 10px 18px; border: 1px solid var(--hx-inq-border); background: transparent; color: var(--hx-inq-text); }

@media (max-width: 600px) {
  .hx-inq { inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; border: 0; border-radius: 0; animation-name: hx-inq-up; }
  .hx-fab-left ~ .hx-inq { inset: 0; }
  .hx-inq-head { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
  .hx-inq-body { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .hx-inq-quicks { grid-template-columns: 1fr; }
}
@keyframes hx-inq-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
