/* 思引CAD 介面模擬頁：三頁共用 */
:root {
  --brand: #1B2C8B;
  --brand-2: #2f44b8;
  --brand-bg: #eef1fb;
  --sky: #12A5E0;
  --green: #33A63B;
  --purple: #8B2CB0;
  --orange: #F5811E;
  --yellow: #FCC300;
  --pink: #E01A80;
  --teal: #0FA595;
  --paper: #FBF6EC;
  --ink: #1a2033;
  --muted: #535b72;
  --line: #d8ddee;
  --hi: #ff9a3c;
  --font: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #f3f5fb;
  font-size: 16px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }

/* 3D 視窗 */
.cad-host { position: relative; overflow: hidden; touch-action: none; }
.cad-canvas { position: absolute; inset: 0; display: block; }
.cad-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cad-host[data-tool="rect"] .cad-overlay, .cad-host[data-tool="dim"] .cad-overlay { cursor: crosshair; }
.cad-host.in-sketch { background-image: linear-gradient(rgba(27,44,139,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(27,44,139,.06) 1px, transparent 1px); background-size: 24px 24px; }
.ov-face { fill: rgba(255,154,60,.12); stroke: #ff9a3c; stroke-width: 2; stroke-dasharray: 8 6; }
.ov-rect { fill: rgba(18,165,224,.18); stroke: #1B2C8B; stroke-width: 3; }
.ov-rect.rubber { stroke-dasharray: 6 5; stroke: #12A5E0; }
.ov-pt { fill: #fff; stroke: #E01A80; stroke-width: 3; }
.ov-dim line { stroke: #8B2CB0; stroke-width: 2; }
.ov-dim rect { fill: #fff; stroke: #8B2CB0; stroke-width: 2; }
.ov-dim text { fill: #5b2a78; font: 700 15px var(--font); text-anchor: middle; }
.ov-dim.set rect { fill: #8B2CB0; }
.ov-dim.set text { fill: #fff; }
.cad-dim {
  position: absolute; z-index: 30; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 2px solid var(--purple); border-radius: 14px; padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(27,44,139,.22);
}
.cad-dim label { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #5b2a78; white-space: nowrap; }
.cad-dim input { width: 84px; height: 44px; border: 2px solid var(--line); border-radius: 10px; padding: 0 8px; font-size: 18px; font-weight: 700; }
.cad-dim button { min-height: 44px; min-width: 56px; border-radius: 10px; border: 0; font-weight: 700; padding: 0 12px; }
.cad-dim-ok { background: var(--purple); color: #fff; }
.cad-dim-x { background: #eee; color: #333; }

/* 提示 */
#toast-box { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(20,28,70,.94); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: tin .2s ease-out; max-width: 80vw; text-align: center; }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 切換 A / B / C */
.switcher { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.16); border-radius: 12px; padding: 3px; }
.switcher span { font-size: 13px; padding: 0 4px 0 6px; white-space: nowrap; }
.switcher a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 800; padding: 0 8px; white-space: nowrap; }
.switcher a:hover { background: rgba(255,255,255,.25); }
.switcher a.cur { background: #fff; color: var(--brand); }
.mascot { display: block; height: auto; }
