/* 判定样式 + 手机优先布局（覆盖原版 100vh 三栏固定布局） */
input, textarea, select { user-select: text; -webkit-user-select: text; }
.tk-inp { font-variant-numeric: tabular-nums; }
.tk-inp.cell-ok { border-color: #10b981 !important; background: rgba(6,78,59,.35) !important; color: #a7f3d0; }
.tk-inp.cell-low { border-color: #f59e0b !important; background: rgba(120,53,15,.35) !important; color: #fde68a; }
.tk-inp.cell-bad { border-color: #f43f5e !important; background: rgba(136,19,55,.55) !important; color: #fecdd3; }
.inp-bad { border-color: #f43f5e !important; box-shadow: 0 0 0 2px rgba(244,63,94,.35); }
.design-hint { font-size: 10px; color: #94a3b8; margin-top: 3px; line-height: 1.35; }
.design-hint b { color: #e2e8f0; font-family: ui-monospace, monospace; }
.design-hint i { font-style: normal; color: #64748b; }
.link-badge { font-size: 10.5px; border-radius: 6px; padding: 4px 8px; margin-top: 6px; border: 1px solid; }
.link-badge.on { color: #67e8f9; border-color: rgba(34,211,238,.4); background: rgba(8,51,68,.5); }
.link-badge.off { color: #fcd34d; border-color: rgba(245,158,11,.45); background: rgba(69,26,3,.45); }
.eval-banner { border-radius: 10px; padding: 10px; border: 1px solid; }
.eval-banner.tone-ok { background: rgba(6,78,59,.45); border-color: #10b981; }
.eval-banner.tone-bad { background: rgba(136,19,55,.45); border-color: #f43f5e; }
.eval-banner.tone-pend { background: rgba(69,26,3,.5); border-color: #f59e0b; }
.eval-banner.tone-idle { background: rgba(15,23,42,.7); border-color: #334155; }
.ck-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 11.5px; line-height: 1.45; }
.ck-list li { display: flex; gap: 6px; }
.ck-m { flex: 0 0 16px; height: 16px; border-radius: 4px; text-align: center; font-weight: 700; font-size: 11px; line-height: 16px; }
.ck-ok .ck-m { background: #10b981; color: #022c22; } .ck-ok { color: #d1fae5; }
.ck-bad .ck-m { background: #f43f5e; color: #fff; } .ck-bad { color: #ffe4e6; }
.ck-pend .ck-m { background: #f59e0b; color: #1c1917; } .ck-pend { color: #fef3c7; }
.ck-warn .ck-m { background: #fb923c; color: #1c1917; } .ck-warn { color: #fed7aa; }
.ck-na .ck-m { background: #334155; color: #cbd5e1; } .ck-na { color: #94a3b8; }
.led-card { position: relative; border: 1px solid #1e293b; border-left: 3px solid #475569; background: rgba(2,6,23,.75); border-radius: 8px; padding: 7px 8px; cursor: pointer; }
.led-card:active { background: rgba(30,41,59,.9); }
.led-card.st-pass { border-left-color: #10b981; } .led-card.st-fail { border-left-color: #f43f5e; } .led-card.st-incomplete { border-left-color: #f59e0b; }
.led-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.led-name { font-size: 11.5px; font-weight: 700; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-pill { font-size: 10px; padding: 1px 6px; border-radius: 999px; font-weight: 700; flex: none; }
.p-pass { background: #065f46; color: #a7f3d0; } .p-fail { background: #9f1239; color: #ffe4e6; } .p-incomplete { background: #78350f; color: #fde68a; } .p-empty { background: #334155; color: #cbd5e1; }
.led-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 10px; color: #94a3b8; margin-top: 2px; }
.led-read { font-size: 10.5px; color: #cbd5e1; font-family: ui-monospace, monospace; margin-top: 2px; padding-right: 40px; word-break: break-all; }
.led-del { position: absolute; right: 6px; bottom: 5px; font-size: 10px; color: #fda4af; border: 1px solid rgba(244,63,94,.4); border-radius: 5px; padding: 1px 6px; background: transparent; }
.probe-on { background: rgba(8,145,178,.45) !important; color: #fff !important; }
.webgl-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #94a3b8; font-size: 13px; background: #070d19; z-index: 5; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; transition: .2s; background: #0f172a; border: 1px solid #22d3ee; color: #e0f2fe; padding: 8px 14px; border-radius: 10px; font-size: 13px; z-index: 90; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.verdict-bar { position: fixed; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #1e293b; color: #e2e8f0; border-top: 2px solid #475569; box-shadow: 0 -6px 20px rgba(0,0,0,.45); }
.verdict-bar .vb-l { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.verdict-bar b { font-size: 20px; letter-spacing: 2px; }
.verdict-bar span { font-size: 11.5px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.verdict-bar button { flex: none; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; font-weight: 700; font-size: 14px; border-radius: 10px; padding: 9px 14px; }
.verdict-bar[data-status="pass"] { background: #047857; border-top-color: #34d399; }
.verdict-bar[data-status="fail"] { background: #be123c; border-top-color: #fb7185; }
.verdict-bar[data-status="incomplete"] { background: #b45309; border-top-color: #fbbf24; }
.toggle-3d { display: none; }

@media (min-width: 1024px) {
  .verdict-bar { right: 12px; bottom: 12px; width: 391px; border-radius: 12px; border-top-width: 0; padding: 8px 12px; }
  #rightAside { padding-bottom: 80px !important; }
}
@media (max-width: 1023.98px) {
  html, body { height: auto !important; width: 100% !important; overflow-x: hidden !important; overflow-y: auto !important; }
  body { display: block !important; padding-bottom: calc(76px + env(safe-area-inset-bottom)); -webkit-text-size-adjust: 100%; }
  #topHeader { height: auto !important; flex-wrap: wrap; gap: 6px; padding: 8px 10px !important; position: static; }
  #topHeader > div { flex-wrap: wrap; gap: 6px !important; }
  #topHeader h1 { font-size: 14px !important; line-height: 1.35; }
  #topHeader > div:last-child { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; }
  #topHeader > div:last-child button { justify-content: center; padding: 8px 6px !important; font-size: 12px !important; }
  #workspace { display: flex !important; flex-direction: column !important; overflow: visible !important; height: auto !important; }
  #rightAside { order: 1; width: 100% !important; height: auto !important; overflow: visible !important; border: 0 !important; padding: 8px !important; }
  #btnToggle3D { order: 2; } #mainView { order: 3; }
  #btnToggleTools { order: 4; } #leftAside { order: 5; }
  #leftAside { width: 100% !important; height: auto !important; overflow: visible !important; border: 0 !important; padding: 8px !important; display: none !important; }
  body.tools-open #leftAside { display: flex !important; }
  #mainView { display: none !important; width: 100%; height: 62vh; min-height: 320px; flex: none !important; }
  body.view-open #mainView { display: block !important; }
  .toggle-3d { display: block; margin: 4px 8px; padding: 11px; border-radius: 10px; border: 1px solid rgba(56,189,248,.45); background: rgba(15,23,42,.9); color: #7dd3fc; font-size: 14px; font-weight: 700; }
  .toggle-3d.tools { color: #fcd34d; border-color: rgba(245,158,11,.45); }
  .toggle-3d.tools.on, body.view-open #btnToggle3D { background: rgba(8,51,68,.9); }
  .verdict-bar { left: 0; right: 0; bottom: 0; }
  /* 触控尺寸：输入框 ≥16px 防 iOS 放大 */
  #rightAside input, #rightAside select { font-size: 16px !important; }
  #rightAside select, #inpOuterDesignUm, #inpInnerDesignUm, #inpAdhesionMPa, #inpBlastHours { min-height: 40px; }
  #customLayersBreakdownList { max-height: none !important; overflow: visible !important; }
  #thicknessInputsGrid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 6px !important; }
  #thicknessInputsGrid .tk-inp { min-height: 46px; font-size: 17px !important; text-align: center; padding: 4px 2px !important; }
  #rightAside button { min-height: 36px; }
  .glass-card { backdrop-filter: none; }
}
