/* 计算器样式：输入在左，结果在右；手机上单列，结果紧跟输入 */
.hc { display: grid; gap: 24px; }

.hc-inputs, .hc-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}
.hc-inputs { padding: 16px; display: grid; gap: 24px; }
.hc-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.hc-step-head { display: flex; align-items: center; gap: 12px; padding: 0; margin: 0 0 12px; font-weight: 600; font-size: 16px; color: var(--text); }
.hc-num {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
}

/* 1. 峰值亮度 */
.hc-nits-row { display: flex; align-items: baseline; gap: 8px; }
.hc-nits {
  width: 100%; max-width: 200px; min-height: 56px; padding: 4px 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: 700 36px/1.2 var(--font-head);
  -moz-appearance: textfield;
}
.hc-nits::-webkit-outer-spin-button, .hc-nits::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hc-nits:focus { border-color: var(--accent); outline: none; }
.hc-nits[aria-invalid="true"] { border-color: #f87171; }
.hc-unit { color: var(--muted); font-size: 18px; }

.hc-range { width: 100%; margin: 16px 0 12px; accent-color: var(--accent); height: 24px; }

.hc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hc-chips button {
  min-height: 36px; padding: 4px 12px;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  font: 600 14px/1 var(--font-body); cursor: pointer;
}
.hc-chips button:hover { border-color: var(--muted); }
.hc-chips button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.hc-hint { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* 显示器搜索 */
.hc-lookup { position: relative; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.hc-lookup-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.hc-search {
  width: 100%; min-height: 44px; padding: 8px 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: 400 16px/1.2 var(--font-body);
}
.hc-search:focus { border-color: var(--accent); outline: none; }
.hc-list {
  position: absolute; left: 0; right: 0; z-index: 5;
  max-height: 280px; overflow-y: auto; margin: 4px 0 0; padding: 4px;
  list-style: none; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.hc-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.hc-list li small { color: var(--muted); white-space: nowrap; }
.hc-list li[aria-selected="true"], .hc-list li[data-id]:hover { background: rgba(124, 92, 255, .18); }
.hc-list .hc-empty { color: var(--muted); cursor: default; }
.hc-preset { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.hc-preset strong { color: var(--text); }

/* 2 / 3. 分段选择 */
.hc-seg { display: grid; gap: 8px; }
.hc-seg-3 { grid-template-columns: repeat(3, 1fr); }
.hc-seg label { position: relative; }
.hc-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hc-seg span {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  min-height: 64px; padding: 8px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer;
}
.hc-seg small { font-weight: 400; font-size: 12px; color: var(--muted); }
.hc-seg label:hover span { border-color: var(--muted); }
.hc-seg input:checked + span { border-color: var(--primary); background: rgba(124, 92, 255, .14); box-shadow: inset 0 0 0 1px var(--primary); }
.hc-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 微调 */
.hc-fine summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }
.hc-fine summary:hover { color: var(--text); }
.hc-fine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.hc-fine-grid label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.hc-fine-grid select, .hc-fine-grid input {
  min-height: 44px; padding: 8px 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: 400 16px/1.2 var(--font-body);
}

/* 结果 */
.hc-result { padding: 16px; display: flex; flex-direction: column; }
.hc-path { margin: 0 0 8px; color: var(--accent); font-size: 14px; font-weight: 600; }
.hc-path span { color: var(--muted); padding: 0 4px; }
.hc-result-title { font: 700 22px/1.2 var(--font-head); margin: 0; color: var(--text); }
.hc-context { margin: 4px 0 16px; color: var(--muted); font-size: 14px; }

.hc-values { display: grid; gap: 8px; margin: 0; }
.hc-val {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.hc-val dt { font-weight: 600; font-size: 16px; }
.hc-val dd { margin: 0; display: flex; flex-direction: column; align-items: flex-end; }
.hc-big { font: 700 36px/1.2 var(--font-head); font-variant-numeric: tabular-nums; color: var(--text); }
.hc-delta { font-size: 12px; color: var(--muted); }
.hc-delta[data-dir="up"]::before { content: "▲ "; color: var(--accent); }
.hc-delta[data-dir="down"]::before { content: "▼ "; color: var(--primary); }
.hc-flash .hc-big { animation: hc-pop .35s ease-out; }
@keyframes hc-pop { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 亮度表：你的屏幕峰值 vs 游戏在该设置下的高光输出 */
.hc-meter { margin-top: 24px; }
.hc-meter-track {
  position: relative; height: 12px; border-radius: 999px;
  background: linear-gradient(90deg, #000 0%, #2a2f3b 25%, #747c8e 50%, #c3cad8 75%, #fff 100%);
}
.hc-mark { position: absolute; top: 50%; width: 0; height: 0; transition: left .25s ease-out; }
.hc-mark i { position: absolute; left: -8px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--card); }
.hc-mark-target i { top: -20px; background: var(--accent); }
.hc-mark-game i { top: 4px; background: var(--primary); }
.hc-meter-scale { position: relative; height: 16px; margin-top: 16px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hc-meter-scale span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.hc-meter-scale span:first-child { left: 0; transform: none; }
.hc-meter-scale span:nth-child(2) { left: 25%; }
.hc-meter-scale span:nth-child(3) { left: 50%; }
.hc-meter-scale span:nth-child(4) { left: 75%; }
.hc-meter-scale span:last-child { left: 100%; transform: translateX(-100%); }
.hc-meter-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.hc-leg { display: inline-flex; align-items: center; gap: 8px; }
.hc-key { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.hc-key-target { background: var(--accent); }
.hc-key-game { background: var(--primary); }

.hc-warn { margin: 16px 0 0; padding: 12px; border-radius: var(--radius); background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .3); font-size: 14px; }

.hc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.hc-btn {
  min-height: 44px; padding: 8px 24px;
  background: var(--primary); color: #fff;
  border: 1px solid var(--primary); border-radius: var(--radius);
  font: 600 16px/1.2 var(--font-body); cursor: pointer;
}
.hc-btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.hc-btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.hc-btn-ghost:hover { background: transparent; border-color: var(--muted); }
.hc-status { font-size: 14px; color: var(--accent); }
.hc-tip { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@media (max-width: 639px) {
  .hc-btn { flex: 1 1 100%; }
}

@media (min-width: 640px) {
  .hc-inputs, .hc-result { padding: 24px; }
}

@media (min-width: 900px) {
  .hc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .hc-result { position: sticky; top: 16px; }
}
