/* ============================================================
   锂矿价格计算器 · 深色专业金融主题
   ============================================================ */

:root {
  --bg: #0b1020;
  --bg-elev: #121a2e;
  --bg-elev-2: #182140;
  --panel: rgba(18, 26, 46, 0.86);
  --panel-border: rgba(120, 150, 210, 0.16);
  --panel-border-strong: rgba(120, 150, 210, 0.32);

  --text: #e8edf7;
  --text-dim: #9aa8c4;
  --text-faint: #6c7a99;

  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --accent-hover: #6ba0ff;
  --gold: #f5b544;
  --gold-soft: rgba(245, 181, 68, 0.14);

  --ok: #35d39a;
  --ok-soft: rgba(53, 211, 154, 0.13);
  --warn: #f5b544;
  --warn-soft: rgba(245, 181, 68, 0.12);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, 0.12);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow: 0 18px 44px rgba(3, 7, 18, 0.55);
  --shadow-sm: 0 6px 18px rgba(3, 7, 18, 0.4);

  --font-cn: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-num: "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, "PingFang SC", "Microsoft YaHei", monospace;

  --ease: cubic-bezier(0.22, 0.68, 0.35, 1);
}

@media (prefers-color-scheme: light) {
  /* 主题固定为深色，此处仅保证变量一致 */
  :root { color-scheme: dark; }
}

* { box-sizing: border-box; }

/*
 * hidden 属性必须始终生效。
 * 组件类（如 .notice { display: flex }）的选择器权重高于浏览器默认样式表里的
 * [hidden] { display: none }，若不显式声明，hidden 元素依然会显示出来。
 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(79, 140, 255, 0.16), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(245, 181, 68, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.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;
}

/* ---------------- 布局 ---------------- */

.app-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(28, 40, 74, 0.92), rgba(15, 22, 41, 0.92));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--accent), #2f5fd0);
  color: #fff;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 18px rgba(47, 95, 208, 0.42);
}

.brand-text h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.3px;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.quote-status {
  text-align: right;
  min-width: 250px;
}

.quote-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.quote-line-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-faint);
}

.quote-contract {
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.4px;
}

.quote-source { color: var(--text-faint); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 940px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- 面板 ---------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px 26px 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.panel-title {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--panel-border);
}

.sub-title {
  margin: 24px 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.4px;
}

/* ---------------- 表单 ---------------- */

.field-group {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}

.group-legend {
  padding: 0;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.field { margin-bottom: 16px; }

.field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  color: var(--text-dim);
  font-weight: 500;
}

input[type="number"],
select {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-elev-2);
  border: 1px solid var(--panel-border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}

select {
  font-family: var(--font-cn);
  cursor: pointer;
}

input[type="number"]:hover,
select:hover { border-color: rgba(120, 160, 235, 0.55); }

input[type="number"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #1c2748;
}

input[type="number"].is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

input[type="number"].is-custom { border-color: rgba(245, 181, 68, 0.6); }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

.input-with-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-with-badge input[type="number"] { flex: 1 1 auto; min-width: 0; }

.hint {
  margin: 7px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}

.err {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--danger);
  min-height: 0;
  font-weight: 500;
}

.err:empty { display: none; }

/* ---------------- 徽章 ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-neutral {
  background: rgba(150, 165, 200, 0.12);
  color: var(--text-dim);
  border-color: rgba(150, 165, 200, 0.22);
}

.badge-ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(53, 211, 154, 0.34);
}

.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(245, 181, 68, 0.34);
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: rgba(79, 140, 255, 0.32);
}

/* ---------------- 按钮 ---------------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: var(--font-cn);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: transform 0.14s var(--ease), background 0.16s var(--ease),
              border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), color 0.16s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-primary {
  background: linear-gradient(140deg, var(--accent), #3568dd);
  color: #fff;
  box-shadow: 0 6px 16px rgba(53, 104, 221, 0.32);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(140deg, var(--accent-hover), #4478ea);
  box-shadow: 0 8px 20px rgba(53, 104, 221, 0.44);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--panel-border-strong);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(120, 160, 235, 0.6);
  background: rgba(120, 160, 235, 0.08);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.copy-status {
  font-size: 12.5px;
  color: var(--ok);
  min-height: 1em;
}

/* ---------------- 提示条 ---------------- */

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.8px;
  line-height: 1.6;
  border: 1px solid transparent;
}

.notice-info {
  background: var(--accent-soft);
  border-color: rgba(79, 140, 255, 0.28);
  color: #bcd3ff;
}

.notice-warn {
  background: var(--warn-soft);
  border-color: rgba(245, 181, 68, 0.34);
  color: #ffd894;
}

.notice-danger {
  background: var(--danger-soft);
  border-color: rgba(255, 107, 107, 0.32);
  color: #ffb3b3;
}

/* ---------------- 推荐参数表 ---------------- */

.band-table-wrap { margin-top: 6px; }

.band-table,
.breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.band-table th,
.breakdown th {
  text-align: left;
  font-weight: 600;
  color: var(--text-dim);
  padding: 9px 10px;
  border-bottom: 1px solid var(--panel-border-strong);
  font-size: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.band-table td,
.breakdown td {
  padding: 10px;
  border-bottom: 1px solid rgba(120, 150, 210, 0.1);
  color: var(--text-dim);
}

.band-table td:nth-child(2),
.band-table td:nth-child(3),
.breakdown td:nth-child(2) {
  font-family: var(--font-num);
  color: var(--text);
}

.band-table tr.is-active td {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.band-table tr.is-active td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

/* ---------------- 结果区 ---------------- */

.result-card {
  position: relative;
  padding: 26px 24px 22px;
  border-radius: var(--radius);
  background:
    radial-gradient(520px 200px at 8% 0%, rgba(79, 140, 255, 0.20), transparent 68%),
    linear-gradient(150deg, rgba(30, 44, 84, 0.95), rgba(17, 25, 46, 0.95));
  border: 1px solid var(--panel-border-strong);
  overflow: hidden;
}

.result-label {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.6px;
}

.result-value {
  margin: 8px 0 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-num);
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 4px 22px rgba(79, 140, 255, 0.36);
}

.result-value.is-anim {
  animation: pop 0.36s var(--ease);
}

@keyframes pop {
  0%   { transform: translateY(4px) scale(0.985); opacity: 0.55; }
  60%  { transform: translateY(0) scale(1.012); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

.result-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dim);
  font-family: var(--font-cn);
}

.result-value.is-negative { color: #ffb3b3; text-shadow: 0 4px 22px rgba(255, 107, 107, 0.3); }

.result-sub {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.6;
}

.breakdown tbody tr { transition: background 0.16s var(--ease); }
.breakdown tbody tr:hover { background: rgba(120, 160, 235, 0.07); }

.breakdown .row-total td {
  border-top: 1px solid var(--panel-border-strong);
  border-bottom: 0;
  padding-top: 12px;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.breakdown .row-total td:nth-child(2) {
  color: var(--gold);
  font-size: 16px;
}

/* ---------------- 公式说明 ---------------- */

.formula-panel {
  margin-top: 22px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 32, 0.5);
  overflow: hidden;
}

.formula-panel > summary {
  cursor: pointer;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}

.formula-panel > summary::-webkit-details-marker { display: none; }

.formula-panel > summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.2s var(--ease);
  color: var(--accent);
}

.formula-panel[open] > summary::before { transform: rotate(90deg); }

.formula-panel > summary:hover {
  color: var(--text);
  background: rgba(120, 160, 235, 0.07);
}

.formula-body {
  padding: 4px 18px 18px;
  border-top: 1px solid var(--panel-border);
}

.formula-code {
  margin: 14px 0 12px;
  padding: 12px 14px;
  background: rgba(8, 13, 26, 0.72);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-num);
  font-size: 12.8px;
  line-height: 1.85;
  color: #cfe0ff;
  word-break: break-word;
}

.formula-list {
  margin: 0;
  padding-left: 20px;
  font-size: 12.8px;
  color: var(--text-dim);
  line-height: 1.85;
}

.formula-list li { margin-bottom: 5px; }

.formula-list strong { color: var(--gold); font-family: var(--font-num); }

.formula-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------------- 页脚 ---------------- */

.app-footer {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

.app-footer p { margin: 0; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 620px) {
  .app-shell { padding: 16px 13px 34px; }
  .app-header { padding: 16px 18px; }
  .panel { padding: 20px 17px 22px; border-radius: var(--radius); }
  .quote-status { text-align: left; min-width: 0; width: 100%; }
  .quote-line { justify-content: flex-start; }
  .result-value { font-size: 34px; }
  .band-table, .breakdown { font-size: 12px; }
  .band-table th, .band-table td, .breakdown th, .breakdown td { padding: 8px 6px; }
  .btn { flex: 1 1 auto; }
}

/* ---------------- 无障碍 / 动效偏好 ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .result-value.is-anim { animation: none; }
}

@media (forced-colors: active) {
  .panel, .result-card, .btn, input[type="number"], select { border: 1px solid CanvasText; }
}

/* ============================================================
   2026-11-04 · 锦上锂品牌科技视觉升级
   ============================================================ */
:root {
  --cyan: #5ee7ff;
  --violet: #8b7bff;
  --lime: #b8f36b;
  --brand-grid: rgba(94, 231, 255, 0.055);
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(1000px 560px at 8% -10%, rgba(94, 231, 255, 0.16), transparent 60%),
    radial-gradient(900px 520px at 96% 2%, rgba(139, 123, 255, 0.14), transparent 58%),
    radial-gradient(760px 480px at 50% 110%, rgba(184, 243, 107, 0.06), transparent 62%),
    #080d18;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(var(--brand-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--brand-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 28%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 28%, #000 35%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(420px 200px at 18% 16%, rgba(94, 231, 255, 0.08), transparent 70%),
    radial-gradient(380px 180px at 84% 8%, rgba(139, 123, 255, 0.09), transparent 70%);
  filter: blur(6px);
}

.app-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(19, 30, 54, 0.94), rgba(9, 15, 29, 0.94));
  border-color: rgba(94, 231, 255, 0.18);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.app-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(94, 231, 255, 0.08) 46%, transparent 70%);
  transform: translateX(-60%);
  animation: header-scan 9s ease-in-out infinite;
  pointer-events: none;
}

.app-header::after {
  content: "";
  position: absolute;
  left: 24px; right: 24px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 231, 255, 0.7), rgba(139, 123, 255, 0.55), transparent);
  opacity: 0.8;
}

.brand { position: relative; z-index: 1; }

.brand-eyebrow {
  margin: 0 0 3px;
  font-family: var(--font-num);
  font-size: 9.5px;
  letter-spacing: 2.1px;
  color: var(--cyan);
  opacity: 0.82;
  white-space: nowrap;
}

.brand-mark {
  width: 52px; height: 52px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(94, 231, 255, 0.22), transparent 48%),
    linear-gradient(145deg, #2d6cff, #1b3c9c);
  border: 1px solid rgba(94, 231, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(94, 231, 255, 0.05), 0 10px 26px rgba(45, 108, 255, 0.42);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 19px;
  border: 1px solid rgba(94, 231, 255, 0.16);
  pointer-events: none;
}

.brand-text h1 {
  font-size: 22px;
  letter-spacing: 0.6px;
  text-shadow: 0 0 28px rgba(94, 231, 255, 0.16);
}

.quote-status {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  border: 1px solid rgba(94, 231, 255, 0.12);
  border-radius: 12px;
  background: rgba(7, 13, 26, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(53, 211, 154, 0.32);
  border-radius: 999px;
  color: var(--ok);
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 1.2px;
}

.live-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(53, 211, 154, 0.13), 0 0 10px rgba(53, 211, 154, 0.8);
  animation: live-pulse 2s ease-in-out infinite;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(17, 26, 46, 0.9), rgba(10, 16, 30, 0.9));
  border-color: rgba(94, 231, 255, 0.12);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 231, 255, 0.55), rgba(139, 123, 255, 0.38), transparent);
  pointer-events: none;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom-color: rgba(94, 231, 255, 0.12);
}

.panel-title::before {
  content: "";
  width: 5px; height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  box-shadow: 0 0 14px rgba(94, 231, 255, 0.45);
}

.result-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 220px at 16% 0%, rgba(94, 231, 255, 0.17), transparent 66%),
    radial-gradient(360px 200px at 96% 100%, rgba(139, 123, 255, 0.14), transparent 66%),
    linear-gradient(145deg, rgba(19, 35, 64, 0.95), rgba(8, 15, 30, 0.96));
  border: 1px solid rgba(94, 231, 255, 0.26);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 34px rgba(94, 231, 255, 0.06);
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(94, 231, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 231, 255, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(120deg, #000, transparent 72%);
  -webkit-mask-image: linear-gradient(120deg, #000, transparent 72%);
  pointer-events: none;
}

.result-card::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -60px;
  width: 210px; height: 210px;
  border-radius: 50%;
  border: 1px solid rgba(94, 231, 255, 0.12);
  box-shadow: 0 0 0 22px rgba(94, 231, 255, 0.025), 0 0 0 46px rgba(139, 123, 255, 0.018);
  pointer-events: none;
}

.result-card > * { position: relative; z-index: 1; }

.result-label {
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.82;
}

.result-value {
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -0.8px;
  background: linear-gradient(92deg, #ffffff 10%, #bff5ff 52%, #b8a9ff 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(94, 231, 255, 0.16));
}

.result-unit { color: var(--text-dim); }

.btn-primary {
  background: linear-gradient(135deg, #2d6cff, #1b4dc9);
  border-color: rgba(94, 231, 255, 0.35);
  box-shadow: 0 8px 24px rgba(45, 108, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(45, 108, 255, 0.34), 0 0 0 1px rgba(94, 231, 255, 0.24);
}

input[type="number"]:focus,
select:focus {
  border-color: rgba(94, 231, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(94, 231, 255, 0.1), 0 0 18px rgba(94, 231, 255, 0.08);
}

.app-footer {
  margin-top: 24px;
  padding: 22px 24px 20px;
  border: 1px solid rgba(94, 231, 255, 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(12, 20, 37, 0.78), rgba(7, 12, 23, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.app-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 231, 255, 0.35), rgba(139, 123, 255, 0.24), transparent);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(94, 231, 255, 0.26);
  background: linear-gradient(145deg, rgba(94, 231, 255, 0.12), rgba(45, 108, 255, 0.16));
  color: #dffaff;
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
}

.footer-brand strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--text);
}

.footer-brand span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-num);
  font-size: 8.5px;
  letter-spacing: 1.6px;
  color: var(--text-faint);
}

.footer-note {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(94, 231, 255, 0.09);
  font-size: 11px;
  color: var(--text-faint);
}

.footer-bottom span:first-child {
  color: rgba(232, 237, 247, 0.7);
  letter-spacing: 0.4px;
}

.footer-bottom span:last-child {
  font-family: var(--font-num);
  letter-spacing: 1px;
  font-size: 9px;
  opacity: 0.7;
}

@keyframes header-scan {
  0%, 100% { transform: translateX(-70%); opacity: 0; }
  35% { opacity: 1; }
  70% { transform: translateX(70%); opacity: 0; }
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

@media (max-width: 640px) {
  .brand-eyebrow { white-space: normal; font-size: 8.5px; letter-spacing: 1.4px; }
  .quote-status { width: 100%; text-align: left; }
  .quote-line { justify-content: flex-start; }
  .footer-bottom { flex-direction: column; }
  .app-footer { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-header::before, .live-dot { animation: none; }
}

/* 推荐参数区间移到右侧结果区下方后，加分隔与对称留白 */
.panel-result .band-table-wrap {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(94, 231, 255, 0.12);
}
.panel-result .band-table-wrap .sub-title {
  margin-top: 0;
  margin-bottom: 10px;
}
.panel-result .band-table { font-size: 12.5px; }
.panel-result .band-table th,
.panel-result .band-table td { padding: 8px 9px; }

/* ============================================================
   2026-11-04 · 公司品牌上移头部
   ============================================================ */
.app-header {
  padding: 24px 28px;
  background:
    linear-gradient(90deg, rgba(94, 231, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(94, 231, 255, 0.03) 1px, transparent 1px),
    linear-gradient(135deg, rgba(19, 32, 58, 0.97), rgba(7, 13, 26, 0.97));
  background-size: 42px 42px, 42px 42px, auto;
}

.app-header::before {
  background: linear-gradient(110deg, transparent 22%, rgba(94, 231, 255, 0.075) 48%, transparent 72%);
}

.app-header::after {
  left: 28px; right: 28px;
  background: linear-gradient(90deg, transparent, rgba(94, 231, 255, 0.8), rgba(184, 243, 107, 0.35), rgba(139, 123, 255, 0.6), transparent);
}

.brand {
  align-items: flex-start;
  gap: 16px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(94, 231, 255, 0.32), transparent 46%),
    linear-gradient(145deg, #2e6bff, #152f82 62%, #0b1638);
  border: 1px solid rgba(94, 231, 255, 0.55);
  box-shadow: 0 0 0 5px rgba(94, 231, 255, 0.04), 0 0 34px rgba(45, 108, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  position: relative;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 23px;
  border: 1px dashed rgba(94, 231, 255, 0.18);
  animation: brand-orbit 18s linear infinite;
}

.brand-mark::after {
  inset: 5px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.brand-mark-core {
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.5px;
  color: #f2fcff;
  text-shadow: 0 0 16px rgba(94, 231, 255, 0.7);
  position: relative;
  z-index: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.brand-company {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.company-name {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: 1.1px;
  color: #f1fbff;
  text-shadow: 0 0 24px rgba(94, 231, 255, 0.14);
  white-space: nowrap;
}

.brand-eyebrow {
  margin: 0;
  font-size: 9px;
  letter-spacing: 2.2px;
  color: rgba(94, 231, 255, 0.78);
}

.brand-product {
  padding-top: 9px;
  border-top: 1px solid rgba(94, 231, 255, 0.13);
}

.brand-product h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0.7px;
  line-height: 1.25;
}

.brand-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.2px;
}

/* 头部四角科技括号 */
.app-header {
  isolation: isolate;
}
.app-header > .brand::before,
.app-header > .brand::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border-color: rgba(94, 231, 255, 0.45);
  border-style: solid;
  pointer-events: none;
}
.app-header > .brand::before {
  left: -9px; top: -7px;
  border-width: 1px 0 0 1px;
}
.app-header > .brand::after {
  left: -9px; bottom: -7px;
  border-width: 0 0 1px 1px;
}

/* 页脚品牌移走后，保持简洁 */
.app-footer {
  padding-top: 18px;
}
.footer-note {
  margin-top: 0;
}

@keyframes brand-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .company-name { white-space: normal; font-size: 14.5px; }
  .brand { gap: 13px; }
  .brand-mark { width: 50px; height: 50px; flex-basis: 50px; border-radius: 15px; }
  .brand-mark-core { font-size: 18px; }
}

@media (max-width: 640px) {
  .app-header { padding: 20px 18px; }
  .brand-product h1 { font-size: 19px; }
  .company-name { font-size: 13.5px; letter-spacing: 0.6px; }
  .brand-eyebrow { font-size: 8px; letter-spacing: 1.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark::before { animation: none; }
}

/* ============================================================
   移动端专项 · 黄金分割 / 触控 / 固定结果条
   ============================================================ */
:root { --phi: 1.618; }

.mobile-result-dock { display: none; }

@media (max-width: 640px) {
  :root {
    --mobile-pad: 16px;
    --mobile-gap: calc(var(--mobile-pad) * 1.618);
  }

  html { scroll-behavior: smooth; }

  body {
    background:
      radial-gradient(620px 380px at 18% -4%, rgba(94, 231, 255, 0.13), transparent 64%),
      radial-gradient(520px 320px at 100% 8%, rgba(139, 123, 255, 0.12), transparent 60%),
      #070c16;
    font-size: 14.5px;
  }

  .app-shell {
    padding: 12px 12px calc(92px + env(safe-area-inset-bottom));
  }

  .app-header {
    padding: 14px 15px 13px;
    border-radius: 18px;
    margin-bottom: 12px;
    gap: 10px;
  }

  .brand {
    gap: 10px;
    width: 100%;
  }

  .brand-mark {
    width: 42px; height: 42px; flex-basis: 42px;
    border-radius: 13px;
  }

  .brand-mark::before { inset: -6px; border-radius: 17px; }
  .brand-mark::after { inset: 4px; border-radius: 9px; }
  .brand-mark-core { font-size: 15px; }

  .brand-text { gap: 6px; }
  .company-name {
    font-size: 12.5px;
    letter-spacing: 0.25px;
    line-height: 1.35;
    white-space: normal;
  }
  .brand-eyebrow {
    font-size: 6.8px;
    letter-spacing: 1.2px;
    line-height: 1.45;
  }
  .brand-product { padding-top: 6px; }
  .brand-product h1 {
    font-size: 18px;
    letter-spacing: 0.3px;
  }
  .brand-sub { font-size: 10px; line-height: 1.5; }

  .quote-status {
    width: 100%;
    padding: 8px 10px;
    border-radius: 11px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    text-align: left;
  }
  .quote-line { justify-content: flex-start; gap: 6px; }
  .quote-line-sub {
    margin: 0;
    justify-content: flex-end;
    font-size: 9.5px;
    gap: 5px;
  }
  .quote-contract { font-size: 12.5px; }
  .live-tag { padding: 1px 5px; font-size: 7.5px; letter-spacing: 0.7px; }

  /* 移动端：结果区前置，输入区后置；结果卡按 1:φ 比例 */
  .layout {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-gap);
  }
  .panel-result { order: -1; }

  .panel {
    padding: 16px 15px;
    border-radius: 17px;
    backdrop-filter: none;
  }

  .panel-title {
    margin-bottom: 12px;
    padding-bottom: 9px;
    font-size: 14px;
  }
  .panel-title::before { height: 13px; width: 4px; }

  .result-card {
    min-height: calc((100vw - 54px) / 1.618);
    padding: 18px 16px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 15px;
  }
  .result-label { font-size: 11px; letter-spacing: 0.8px; }
  .result-value {
    font-size: clamp(38px, 12vw, 48px);
    margin-top: 5px;
    letter-spacing: -1px;
  }
  .result-value .result-unit { font-size: 13px; margin-left: 2px; }
  .result-sub { font-size: 10.5px; line-height: 1.65; margin-top: 7px; }

  .panel-result .btn-row { margin-top: 11px; }
  .btn {
    min-height: 43px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    touch-action: manipulation;
  }
  .btn:active { transform: scale(0.985); }

  .formula-panel { margin-top: 11px; }
  .formula-panel summary { padding: 11px 13px; font-size: 12.5px; }

  /* 推荐参数区间：紧凑表 */
  .panel-result .band-table-wrap { margin-top: 16px; padding-top: 12px; }
  .panel-result .band-table-wrap .sub-title { font-size: 12.5px; margin-bottom: 7px; }
  .panel-result .band-table th,
  .panel-result .band-table td { padding: 7px 7px; font-size: 11.5px; }
  .panel-result .band-table th:last-child,
  .panel-result .band-table td:last-child { text-align: right; }

  /* 输入触控尺寸；iOS 16px 防止聚焦缩放 */
  .field { margin-bottom: 14px; }
  .field > label { font-size: 12.5px; margin-bottom: 5px; }
  input[type="number"], select {
    min-height: 46px;
    padding: 11px 12px;
    font-size: 16px;
    border-radius: 10px;
  }
  .field .hint { font-size: 10.5px; line-height: 1.55; }
  .group-legend { font-size: 10.5px; letter-spacing: 1px; margin-bottom: 9px; }
  .btn-row { gap: 9px; }
  .btn-row .btn { flex: 1; }

  .app-footer {
    margin-top: 12px;
    padding: 15px 14px;
    border-radius: 17px;
  }
  .footer-note { font-size: 10px; line-height: 1.65; }
  .footer-bottom {
    margin-top: 10px;
    padding-top: 9px;
    gap: 5px;
    font-size: 9.5px;
  }
  .footer-bottom span:last-child { font-size: 7.5px; }

  /* 底部实时结果条 */
  .mobile-result-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 40;
    padding: 9px 10px 9px 13px;
    border: 1px solid rgba(94, 231, 255, 0.34);
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(19, 36, 66, 0.96), rgba(7, 13, 26, 0.97));
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 22px rgba(94, 231, 255, 0.07);
    backdrop-filter: blur(12px);
  }

  .mobile-result-copy {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
  }
  .mobile-result-copy > span {
    font-size: 9.5px;
    color: var(--text-faint);
    white-space: nowrap;
  }
  .mobile-result-copy > strong {
    font-family: var(--font-num);
    font-size: 22px;
    line-height: 1;
    color: #eaffff;
    letter-spacing: -0.4px;
    text-shadow: 0 0 14px rgba(94, 231, 255, 0.25);
  }
  .mobile-result-copy > small {
    font-size: 9.5px;
    color: var(--text-faint);
  }
  .mobile-result-dock > button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 9px;
    border: 1px solid rgba(94, 231, 255, 0.35);
    background: linear-gradient(135deg, rgba(45, 108, 255, 0.9), rgba(30, 65, 160, 0.9));
    color: #fff;
    font-size: 11px;
    font-family: var(--font-cn);
    touch-action: manipulation;
  }
  .mobile-result-dock > button:active { transform: scale(0.97); }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
  }
}

/* 移动端回归：正常阅读顺序，不强制结果前置，不用浮层挡内容 */
@media (max-width: 640px) {
  .panel-result { order: initial; }
  .result-card { min-height: 0; }
  .mobile-result-dock { display: none !important; }
  .app-shell { padding-bottom: 22px; }
}

/* 去掉头部“锂矿价格计算器”大标题后，副标题单独成行 */
.brand-product { padding-top: 7px; }
.brand-sub { margin: 0; font-size: 12.5px; }
@media (max-width: 640px) {
  .brand-product { padding-top: 5px; }
  .brand-sub { font-size: 10.5px; }
}

/* 参数输入控件瘦身：减少占高，保留可点击面积 */
input[type="number"],
select {
  height: 38px;
  min-height: 38px;
  padding: 6px 11px;
  font-size: 14px;
  line-height: 1.25;
}

.field { margin-bottom: 12px; }

@media (max-width: 640px) {
  input[type="number"],
  select {
    height: 40px;
    min-height: 40px;
    padding: 6px 10px;
    font-size: 16px; /* 防 iOS 聚焦缩放 */
    line-height: 1.2;
  }
  .field { margin-bottom: 11px; }
  .field .hint { margin-top: 4px; }
}

/* 再收紧参数输入高度（用户反馈占地方） */
input[type="number"],
select {
  height: 36px;
  min-height: 36px;
  padding: 5px 10px;
  font-size: 14px;
  line-height: 1.2;
}
.field { margin-bottom: 10px; }
.field > label { margin-bottom: 5px; }
.field .hint { font-size: 10.5px; line-height: 1.5; margin-top: 3px; }
@media (max-width: 640px) {
  input[type="number"],
  select {
    height: 38px;
    min-height: 38px;
    padding: 5px 10px;
    font-size: 16px;
  }
  .field { margin-bottom: 9px; }
}

/* 矿石参数：手机两列紧凑布局 */
.ore-fields { display: block; }
@media (max-width: 640px) {
  .field-group { margin-bottom: 12px; }
  .group-legend { margin-bottom: 7px; }
  .ore-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 9px;
  }
  .ore-fields .field { margin-bottom: 0; min-width: 0; }
  .ore-fields .field-full { grid-column: 1 / -1; }
  .ore-fields .field-half .input-with-badge { display: block; }
  .ore-fields .field-half .badge { display: none; }
  .ore-fields .field > label {
    font-size: 10.5px;
    line-height: 1.35;
    min-height: 28px;
    margin-bottom: 4px;
  }
  .ore-fields .field .hint {
    font-size: 9px;
    line-height: 1.4;
    margin-top: 3px;
  }
  .ore-fields .field .err { font-size: 9px; margin: 2px 0; }
  .ore-fields input[type="number"] { width: 100%; }
}

/* 获取行情/重置两个操作按钮瘦身 */
.btn-row #fetchQuote,
.btn-row #resetForm {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 9px;
}
@media (max-width: 640px) {
  .btn-row #fetchQuote,
  .btn-row #resetForm {
    height: 36px;
    min-height: 36px;
    padding: 0 13px;
    font-size: 13px;
    flex: 0 0 auto;
    min-width: 94px;
  }
}

/* 获取行情：与合约下拉同一行；重置：与复制结果同一行 */
.contract-action-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.contract-action-row #contractSelect { flex: 1 1 auto; min-width: 0; }
.contract-action-row #fetchQuote {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 36px;
  padding: 0 13px;
  font-size: 13px;
}
.result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.result-actions #copyResult { flex: 1 1 auto; }
.result-actions #resetForm {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 38px;
  padding: 0 13px;
  font-size: 13px;
}
@media (max-width: 640px) {
  .contract-action-row { gap: 7px; }
  .contract-action-row #fetchQuote {
    min-height: 38px;
    padding: 0 11px;
    font-size: 12.5px;
  }
  .result-actions #copyResult { min-height: 43px; }
  .result-actions #resetForm { min-height: 43px; font-size: 13px; }
  .result-actions .copy-status { width: 100%; }
}

/* 合约选择 + 获取行情同排：控制字号，避免下拉文字被挤断 */
.contract-action-row #contractSelect {
  font-size: 13.5px;
  padding-right: 30px;
}
@media (max-width: 640px) {
  .contract-action-row #contractSelect {
    font-size: 13.5px;
    padding-left: 9px;
    padding-right: 26px;
  }
  .contract-action-row #fetchQuote { padding: 0 10px; }
}

/* 获取行情按钮：与“合约选择”标签同一行，下拉框恢复整行 */
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.field-label-row > label {
  display: block;
  margin: 0;
  min-width: 0;
}
.field-label-row #fetchQuote {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}
@media (max-width: 640px) {
  .field-label-row { margin-bottom: 5px; gap: 8px; }
  .field-label-row > label { font-size: 12.5px; }
  .field-label-row #fetchQuote {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }
}

/* 获取行情再缩小：轻量描边，不抢标签视觉 */
.field-label-row #fetchQuote {
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 7px;
  border: 1px solid rgba(94, 231, 255, 0.38);
  background: rgba(45, 108, 255, 0.16);
  color: #dff6ff;
  box-shadow: none;
}
@media (max-width: 640px) {
  .field-label-row #fetchQuote {
    height: 28px;
    min-height: 28px;
    padding: 0 9px;
    font-size: 11.5px;
  }
}

/* 行情涨跌颜色：涨红、跌绿（中国市场习惯） */
#price { transition: color 0.18s var(--ease); }
#price.quote-up { color: #ff6b6b; }
#price.quote-down { color: #35d39a; }

/* 页脚版权排版：居中双行 + 渐变分隔线 */
.app-footer {
  text-align: center;
  padding: 20px 24px 18px;
}
.footer-note {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}
.footer-rule {
  width: 76px;
  height: 1px;
  margin: 13px auto 10px;
  background: linear-gradient(90deg, transparent, rgba(94, 231, 255, 0.45), rgba(139, 123, 255, 0.28), transparent);
}
.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.footer-cn {
  margin: 0;
  font-size: 10.5px;
  color: rgba(232, 237, 247, 0.68);
  letter-spacing: 0.5px;
  line-height: 1.6;
}
.footer-en {
  margin: 0;
  font-family: var(--font-num);
  font-size: 8.5px;
  color: rgba(154, 168, 196, 0.55);
  letter-spacing: 1.1px;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .app-footer { padding: 16px 14px 15px; }
  .footer-note { font-size: 10px; max-width: 320px; }
  .footer-rule { margin: 11px auto 9px; }
  .footer-cn { font-size: 9.5px; letter-spacing: 0.2px; }
  .footer-en { font-size: 7.5px; letter-spacing: 0.8px; }
}

/* 获取行情上移到头部，交易日跟在同一行；数据源隐藏 */
.quote-action-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 5px;
}
.quote-action-line #fetchQuote {
  flex: 0 0 auto;
  width: auto;
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
  font-size: 10.5px;
  border-radius: 7px;
  border: 1px solid rgba(94, 231, 255, 0.38);
  background: rgba(45, 108, 255, 0.16);
  color: #dff6ff;
  box-shadow: none;
}
.quote-action-line #quoteDate {
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-faint);
}
.quote-source { display: none !important; }
@media (max-width: 640px) {
  .quote-action-line { justify-content: flex-end; gap: 6px; margin-top: 3px; }
  .quote-action-line #fetchQuote {
    height: 25px;
    min-height: 25px;
    padding: 0 7px;
    font-size: 10px;
  }
  .quote-action-line #quoteDate { font-size: 9px; }
}

/* 合约下拉文字过大：单独缩小 */
#contractSelect {
  font-size: 13px;
  letter-spacing: 0.1px;
}
@media (max-width: 640px) {
  #contractSelect {
    font-size: 13px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

/* 合约下拉再缩小一档 */
#contractSelect {
  font-size: 12.5px;
  font-weight: 400;
}
@media (max-width: 640px) {
  #contractSelect { font-size: 12px; }
}

/* 自定义合约下拉：毛玻璃浮层 */
.custom-select { position: relative; }
.native-select {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.custom-select-trigger {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(94, 231, 255, 0.22);
  border-radius: 10px;
  background: rgba(18, 32, 58, 0.58);
  color: #dfeeff;
  font-family: var(--font-cn);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.custom-select-trigger:hover,
.custom-select-trigger[aria-expanded="true"] {
  border-color: rgba(94, 231, 255, 0.55);
  background: rgba(24, 43, 76, 0.7);
  box-shadow: 0 0 0 3px rgba(94, 231, 255, 0.08);
}
.custom-select-trigger:disabled {
  cursor: wait;
  opacity: 0.6;
}
.custom-select-trigger > span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.custom-select-chevron {
  flex: 0 0 auto;
  width: 7px; height: 7px;
  margin-top: -3px;
  border-right: 1.4px solid rgba(94, 231, 255, 0.8);
  border-bottom: 1.4px solid rgba(94, 231, 255, 0.8);
  transform: rotate(45deg);
  transition: transform 0.18s var(--ease);
}
.custom-select-trigger[aria-expanded="true"] .custom-select-chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}
.custom-select-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  padding: 5px;
  border: 1px solid rgba(94, 231, 255, 0.25);
  border-radius: 12px;
  background: rgba(8, 18, 36, 0.72);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 25px rgba(94, 231, 255, 0.06);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  max-height: 260px;
  overflow-y: auto;
}
.custom-select-panel[hidden] { display: none !important; }
.custom-select-option {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b9c8e2;
  font-family: var(--font-cn);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.custom-select-option:hover,
.custom-select-option:focus-visible {
  background: rgba(94, 231, 255, 0.1);
  color: #effcff;
  outline: none;
}
.custom-select-option[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(94, 231, 255, 0.16), rgba(139, 123, 255, 0.12));
  color: #f2fdff;
  box-shadow: inset 2px 0 0 rgba(94, 231, 255, 0.7);
}
@media (max-width: 640px) {
  .custom-select-trigger { height: 38px; font-size: 12px; padding: 0 10px; }
  .custom-select-panel { max-height: 220px; }
  .custom-select-option { font-size: 11.5px; padding: 9px; }
}

/* 毛玻璃下拉浮层再加强质感 */
.custom-select-panel {
  background:
    linear-gradient(145deg, rgba(28, 48, 84, 0.78), rgba(6, 14, 28, 0.72)),
    rgba(8, 18, 36, 0.5);
  border-color: rgba(94, 231, 255, 0.32);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(94, 231, 255, 0.06),
    0 0 30px rgba(94, 231, 255, 0.08);
}
.custom-select-panel::before {
  content: "";
  position: absolute;
  left: 10px; right: 10px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 231, 255, 0.55), rgba(139, 123, 255, 0.3), transparent);
  border-radius: 1px;
  pointer-events: none;
}
.custom-select-option[aria-selected="true"] {
  background:
    linear-gradient(90deg, rgba(94, 231, 255, 0.2), rgba(139, 123, 255, 0.12)),
    rgba(16, 34, 62, 0.55);
}

/* 手机端顶部品牌：logo 居中、信息铺满整行 */
@media (max-width: 640px) {
  .brand {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 2px 0 3px;
  }
  .brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }
  .brand-mark-core { font-size: 16px; }
  .brand-text {
    width: 100%;
    align-items: center;
    gap: 5px;
  }
  .brand-company {
    width: 100%;
    align-items: center;
  }
  .company-name {
    width: 100%;
    text-align: center;
    white-space: normal;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0.6px;
  }
  .brand-eyebrow {
    width: 100%;
    text-align: center;
    font-size: 7px;
    letter-spacing: 1.35px;
  }
  .brand-product {
    width: 100%;
    text-align: center;
    padding-top: 6px;
  }
  .brand-sub {
    width: 100%;
    text-align: center;
    font-size: 10px;
  }
}

/* 手机端头部降高：去掉 Li 图标，收紧留白 */
@media (max-width: 640px) {
  .brand-mark { display: none; }
  .brand { gap: 0; padding: 0; }
  .brand-text { gap: 4px; }
  .brand-product { padding-top: 5px; }
  .app-header { padding: 12px 14px 11px; }
  .company-name { font-size: 13px; line-height: 1.3; }
  .brand-eyebrow { font-size: 6.8px; }
  .brand-sub { font-size: 9.5px; }
  .quote-status { margin-top: 0; padding: 8px 10px; }
}

/* 撤回“降高”调整：只隐藏 Li 图标，头部间距恢复 */
@media (max-width: 640px) {
  .brand { gap: 8px; padding: 2px 0 3px; }
  .brand-text { gap: 5px; }
  .brand-product { padding-top: 6px; }
  .app-header { padding: 14px 15px 13px; }
  .company-name { line-height: 1.35; }
  .brand-eyebrow { font-size: 7px; }
  .brand-sub { font-size: 10px; }
  .quote-status { padding: 8px 10px; }
}

/* ============================================================
   2026-11-04 · 暖色毛玻璃主题
   ============================================================ */
:root {
  --bg: #120c09;
  --bg-elev: #241610;
  --bg-elev-2: #2d1c14;
  --panel: rgba(42, 27, 19, 0.56);
  --panel-border: rgba(240, 163, 94, 0.2);
  --panel-border-strong: rgba(240, 163, 94, 0.4);
  --text: #f6e9da;
  --text-dim: #ceb49e;
  --text-faint: #9b7f6b;
  --accent: #f0a35e;
  --accent-soft: rgba(240, 163, 94, 0.14);
  --accent-hover: #ffc07d;
  --gold: #f3c98b;
  --gold-soft: rgba(243, 201, 139, 0.14);
  --ok: #8fd4a8;
  --ok-soft: rgba(143, 212, 168, 0.13);
  --warn: #f0a35e;
  --warn-soft: rgba(240, 163, 94, 0.14);
  --danger: #ff806e;
  --danger-soft: rgba(255, 128, 110, 0.13);
  --cyan: #f0a35e;
  --violet: #d97757;
  --lime: #b8c98a;
  --brand-grid: rgba(240, 163, 94, 0.06);
  --shadow: 0 22px 58px rgba(8, 4, 2, 0.58);
}

body {
  background:
    radial-gradient(1100px 620px at 10% -8%, rgba(240, 163, 94, 0.2), transparent 64%),
    radial-gradient(900px 560px at 92% 4%, rgba(216, 119, 87, 0.16), transparent 60%),
    radial-gradient(760px 480px at 50% 110%, rgba(243, 201, 139, 0.06), transparent 62%),
    #120c09;
}

body::before {
  background-image:
    linear-gradient(var(--brand-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--brand-grid) 1px, transparent 1px);
}

body::after {
  background:
    radial-gradient(520px 260px at 16% 14%, rgba(240, 163, 94, 0.12), transparent 70%),
    radial-gradient(480px 240px at 86% 8%, rgba(217, 119, 87, 0.12), transparent 70%);
}

.app-header {
  background:
    linear-gradient(135deg, rgba(55, 35, 25, 0.72), rgba(20, 13, 10, 0.72));
  border-color: rgba(240, 163, 94, 0.28);
  box-shadow: 0 24px 65px rgba(8, 4, 2, 0.56), inset 0 1px 0 rgba(255, 226, 190, 0.12);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.app-header::before {
  background: linear-gradient(110deg, transparent 22%, rgba(240, 163, 94, 0.1) 48%, transparent 72%);
}

.app-header::after {
  background: linear-gradient(90deg, transparent, rgba(240, 163, 94, 0.8), rgba(217, 119, 87, 0.45), rgba(243, 201, 139, 0.3), transparent);
}

.brand-mark {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 219, 172, 0.35), transparent 46%),
    linear-gradient(145deg, #d98a4f, #a85035 62%, #5a291d);
  border-color: rgba(255, 210, 160, 0.48);
  box-shadow: 0 0 0 5px rgba(240, 163, 94, 0.06), 0 0 34px rgba(217, 119, 87, 0.3), inset 0 1px 0 rgba(255, 240, 220, 0.25);
}

.brand-mark-core { color: #fff4e6; text-shadow: 0 0 16px rgba(255, 193, 130, 0.7); }
.brand-mark::before { border-color: rgba(240, 163, 94, 0.22); }
.company-name { color: #fff2e3; text-shadow: 0 0 22px rgba(240, 163, 94, 0.16); }
.brand-eyebrow { color: rgba(240, 163, 94, 0.9); }
.brand-product { border-top-color: rgba(240, 163, 94, 0.18); }
.brand-sub { color: var(--text-faint); }

.panel {
  background:
    linear-gradient(160deg, rgba(54, 35, 25, 0.58), rgba(23, 15, 11, 0.62));
  border-color: rgba(240, 163, 94, 0.2);
  box-shadow: 0 24px 60px rgba(6, 3, 2, 0.48), inset 0 1px 0 rgba(255, 228, 195, 0.1);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}

.panel::before {
  background: linear-gradient(90deg, transparent, rgba(240, 163, 94, 0.65), rgba(217, 119, 87, 0.4), transparent);
}

.panel-title { border-bottom-color: rgba(240, 163, 94, 0.16); }
.panel-title::before { background: linear-gradient(180deg, var(--gold), var(--accent)); box-shadow: 0 0 14px rgba(240, 163, 94, 0.4); }
.group-legend { color: var(--accent); }
.field > label { color: var(--text-dim); }
.field .hint { color: var(--text-faint); }

input[type="number"],
select {
  background: rgba(38, 23, 16, 0.72);
  border-color: rgba(240, 163, 94, 0.24);
  color: var(--text);
}
input[type="number"]:hover,
select:hover { border-color: rgba(240, 163, 94, 0.55); }
input[type="number"]:focus,
select:focus {
  border-color: rgba(240, 163, 94, 0.8);
  box-shadow: 0 0 0 3px rgba(240, 163, 94, 0.12), 0 0 18px rgba(240, 163, 94, 0.1);
}

.custom-select-trigger {
  background: rgba(43, 27, 18, 0.58);
  border-color: rgba(240, 163, 94, 0.3);
  color: #f6e9da;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.custom-select-trigger:hover,
.custom-select-trigger[aria-expanded="true"] {
  border-color: rgba(240, 163, 94, 0.7);
  background: rgba(55, 34, 23, 0.72);
  box-shadow: 0 0 0 3px rgba(240, 163, 94, 0.1);
}
.custom-select-chevron { border-color: rgba(240, 163, 94, 0.9); }
.custom-select-panel {
  background:
    linear-gradient(145deg, rgba(56, 36, 25, 0.78), rgba(20, 12, 9, 0.76)),
    rgba(40, 25, 17, 0.5);
  border-color: rgba(240, 163, 94, 0.3);
  box-shadow: 0 22px 55px rgba(5, 3, 2, 0.65), inset 0 1px 0 rgba(255, 230, 200, 0.13), 0 0 28px rgba(240, 163, 94, 0.07);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}
.custom-select-option { color: #d8c0aa; }
.custom-select-option:hover,
.custom-select-option:focus-visible { background: rgba(240, 163, 94, 0.13); color: #fff4e7; }
.custom-select-option[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(240, 163, 94, 0.2), rgba(217, 119, 87, 0.12));
  color: #fff5e9;
  box-shadow: inset 2px 0 0 rgba(240, 163, 94, 0.8);
}

.result-card {
  background:
    radial-gradient(420px 220px at 16% 0%, rgba(240, 163, 94, 0.2), transparent 66%),
    radial-gradient(360px 200px at 96% 100%, rgba(217, 119, 87, 0.16), transparent 66%),
    linear-gradient(145deg, rgba(62, 38, 24, 0.68), rgba(21, 13, 9, 0.78));
  border-color: rgba(240, 163, 94, 0.38);
  box-shadow: 0 22px 52px rgba(6, 3, 2, 0.5), inset 0 1px 0 rgba(255, 235, 210, 0.14), 0 0 34px rgba(240, 163, 94, 0.08);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}
.result-card::before {
  background-image:
    linear-gradient(rgba(240, 163, 94, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 163, 94, 0.06) 1px, transparent 1px);
}
.result-card::after { border-color: rgba(240, 163, 94, 0.16); box-shadow: 0 0 0 22px rgba(240, 163, 94, 0.03), 0 0 0 46px rgba(217, 119, 87, 0.025); }
.result-label { color: rgba(240, 163, 94, 0.92); }
.result-value {
  background: linear-gradient(92deg, #fffaf2 8%, #ffd9a5 52%, #efad85 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(240, 163, 94, 0.2));
}
.result-unit { color: var(--text-dim); }
.result-sub { color: var(--text-faint); }

.btn-primary {
  background: linear-gradient(135deg, #e8a25c, #b95d3d);
  border-color: rgba(255, 214, 170, 0.4);
  color: #221009;
  box-shadow: 0 8px 24px rgba(217, 119, 87, 0.24), inset 0 1px 0 rgba(255, 245, 230, 0.22);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(240, 163, 94, 0.32), 0 0 0 1px rgba(255, 208, 150, 0.25); }
.btn-ghost {
  border-color: rgba(240, 163, 94, 0.25);
  color: var(--text-dim);
  background: rgba(44, 27, 18, 0.45);
}
.btn-ghost:hover { border-color: rgba(240, 163, 94, 0.55); color: #fff0df; }
#fetchQuote {
  border-color: rgba(240, 163, 94, 0.45) !important;
  background: rgba(240, 163, 94, 0.12) !important;
  color: #ffdfb5 !important;
  box-shadow: none !important;
}
#fetchQuote:hover { background: rgba(240, 163, 94, 0.2) !important; }

.formula-panel {
  background: rgba(38, 24, 16, 0.42);
  border-color: rgba(240, 163, 94, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.formula-panel summary { color: var(--text-dim); }
.formula-code { color: #f0c28d; }
.formula-list li { color: var(--text-dim); }

.band-table th { color: var(--text-dim); border-bottom-color: rgba(240, 163, 94, 0.28); }
.band-table td { color: var(--text-dim); border-bottom-color: rgba(240, 163, 94, 0.1); }
.band-table td:nth-child(2),
.band-table td:nth-child(3) { color: var(--text); }
.band-table tr.is-active td {
  background: rgba(240, 163, 94, 0.12);
  color: #fff2e2;
}
.band-table tr.is-active td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.app-footer {
  background: linear-gradient(160deg, rgba(44, 28, 19, 0.58), rgba(20, 12, 9, 0.66));
  border-color: rgba(240, 163, 94, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 230, 200, 0.08);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}
.app-footer::before { background: linear-gradient(90deg, transparent, rgba(240, 163, 94, 0.5), rgba(217, 119, 87, 0.3), transparent); }
.footer-rule { background: linear-gradient(90deg, transparent, rgba(240, 163, 94, 0.5), rgba(217, 119, 87, 0.3), transparent); }
.footer-cn { color: rgba(246, 233, 218, 0.68); }
.footer-en { color: rgba(206, 180, 158, 0.55); }

.badge { border-color: rgba(240, 163, 94, 0.2); }
.badge-ok { background: rgba(143, 212, 168, 0.12); color: #8fd4a8; }
.badge-warn { background: rgba(240, 163, 94, 0.12); color: #f0a35e; }
.live-tag { border-color: rgba(143, 212, 168, 0.3); color: #8fd4a8; }
.live-dot { background: #8fd4a8; box-shadow: 0 0 0 3px rgba(143, 212, 168, 0.13), 0 0 10px rgba(143, 212, 168, 0.7); }

#price.quote-up { color: #ff8b7a; }
#price.quote-down { color: #8fd4a8; }
.notice { backdrop-filter: blur(10px); }
.notice-warn { background: rgba(240, 163, 94, 0.1); border-color: rgba(240, 163, 94, 0.28); color: #f5c58f; }
.notice-info { background: rgba(240, 163, 94, 0.07); border-color: rgba(240, 163, 94, 0.2); color: #e5b98d; }
.copy-status { color: var(--text-faint); }

/* 暖色主题下的移动端保持玻璃感 */
@media (max-width: 640px) {
  .panel, .app-footer {
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
  }
  .result-card { backdrop-filter: blur(16px) saturate(1.15); }
  .brand-mark { display: none; }
}
