/* diagnostic-algebra-input.css — 字母式子输入组件（algebra-input-ui/v1）
 * 只用 .dai- 前缀；不改全局样式、不改题卡尺寸。颜色沿用 v55 变量并带回退值。 */
.dai-root { box-sizing: border-box; width: 100%; margin: 10px 0 0; }
.dai-root *, .dai-root *::before, .dai-root *::after { box-sizing: border-box; }
.dai-root [hidden] { display: none !important; }

/* 定位：整框标（不只靠颜色，加粗虚线外框） */
input.dai-input.dai-hl-all { outline: 3px dashed var(--orange, #f47b3c); outline-offset: 2px; }

/* 回显行：原串原样显示，出错那一段用 <mark> 标出（下划线＋底色，不只靠颜色） */
.dai-echo {
  margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: #f6f8f7;
  font-size: 20px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--ink, #263238);
}
.dai-mark { padding: 0 1px; border-radius: 4px; background: #ffe0b8; color: inherit; text-decoration: underline wavy #d9541e; text-underline-offset: 4px; }

.dai-notice { margin: 0 0 8px; padding: 8px 12px; border: 1px solid #f0c48f; border-radius: 10px; background: #fff6ea; color: #7a4a12; font-size: 14px; font-weight: 700; }
.dai-notice::before { content: "⚠ "; }

/* 辅助键 */
.dai-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.dai-key {
  min-width: 44px; min-height: 44px; padding: 0 6px; border: 1px solid #cfdcd5; border-radius: 10px;
  color: var(--navy, #153552); background: #fff; font: inherit; font-size: 19px; font-weight: 700; line-height: 1;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
}
.dai-key:active { background: #e9f4ee; }
.dai-key:focus-visible { outline: 3px solid #9cc3e6; outline-offset: 1px; }
.dai-key:disabled { opacity: .45; cursor: not-allowed; background: #f2f2f2; }
.dai-key-letter { color: #1f6f46; background: #f1faf4; font-style: italic; font-family: "Times New Roman", serif; font-size: 21px; }
.dai-key-op { background: #f6f8f7; }

@media (max-width: 420px) {
  .dai-keys { grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 5px; }
  .dai-key { font-size: 18px; }
  .dai-echo { font-size: 18px; }
}
