/* QuantiTake module (Drawing Intelligence) — scoped design tokens
   Redesigned 2026-08-27 against design/handoff/:
   Animated · Minimal · Effortless — tonal layering + soft shadows instead of
   border lines, one accent color used sparingly, Anuphan UI / JetBrains Mono
   numbers-only. Every id/class below is unchanged from the previous version —
   this file only restyles; js/drawing/*.js still drives all of it untouched. */
.qt-module {
  --canvas: #FAFAF9; --tone: #F4F4F2; --tone-2: #EDEDEA; --surface: #FFFFFF;
  --ink: #191C24; --ink-2: #565B68; --ink-3: #9A9EA9;
  --accent: #2066DF; --accent-hover: #1B58C4; --accent-press: #16418F; --accent-tint: #EDF3FE;
  --ok: #12A150; --ok-tint: #E9F6EE;
  --warn: #DB8A00; --warn-tint: #FCF3E3;
  --risk: #E5484D; --risk-tint: #FDEDEE;
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px -10px rgba(16,24,40,.12);
  --sh-3: 0 12px 32px -8px rgba(16,24,40,.18), 0 4px 12px rgba(16,24,40,.06), 0 0 0 1px rgba(16,24,40,.04);
  --r-1: 8px; --r-2: 12px; --r-3: 16px; --r-full: 999px;
  --font: 'Anuphan', sans-serif; --font-num: 'JetBrains Mono', monospace;
  --ctl-h: 32px; --row-h: 30px;
  --ease: cubic-bezier(.2,.8,.2,1); --ease-glide: cubic-bezier(.3,.7,0,1);
  --t-hover: 120ms; --t-pop: 180ms; --t-slide: 250ms;
  background: var(--canvas); color: var(--ink); font-family: var(--font);
}
@keyframes qt-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes qt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes qt-pop-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
@keyframes qt-shimmer { 0% { background-position: -120% 0; } 100% { background-position: 220% 0; } }
@media (prefers-reduced-motion: reduce) {
  .qt-module, .qt-module * { animation-duration: 80ms !important; transition-duration: 80ms !important; }
}

.qt-module *, .qt-module *::before, .qt-module *::after { box-sizing: border-box; margin: 0; padding: 0; }
.qt-module { scroll-behavior: smooth; position: relative; }
.qt-module ::-webkit-scrollbar { width: 6px; height: 6px; }
.qt-module ::-webkit-scrollbar-track { background: transparent; }
.qt-module ::-webkit-scrollbar-thumb { background: var(--tone-2); border-radius: var(--r-full); }

/* Redesign 2026-08-28 — หน้าอัปโหลดเป็นจอเดียวไม่เลื่อน: .qt-module เป็นคอลัมน์เต็มความสูง,
   header บางแถวเดียว (ชื่อ + phase bar + สถานะ รวมกัน), phase 1 คือ hero drop-zone ที่กินพื้นที่
   ที่เหลือทั้งหมด. Phase 2/3 (Review/Results) ยาวได้ — main เลื่อนในตัวเองตามปกติ */
.qt-module { display: flex; flex-direction: column; height: 100%; }
.qt-module header {
  flex: 0 0 auto; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 24px; background: var(--surface);
  box-shadow: var(--sh-1);
}
.qt-module .logo { display: flex; align-items: center; gap: 12px; }
.qt-module .logo-icon {
  width: 36px; height: 36px; border-radius: var(--r-2); background: var(--accent-tint);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.qt-module .logo-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--ink); }
.qt-module .logo-sub { color: var(--ink-3); font-size: 11.5px; margin-top: 1px; }
.qt-module #status-pill {
  display: flex; align-items: center; gap: 8px; background: var(--tone); border-radius: var(--r-full);
  padding: 6px 14px 6px 10px; font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.qt-module .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; transition: background var(--t-hover) ease, box-shadow var(--t-hover) ease; }

.qt-module .phase-bar { display: flex; align-items: center; gap: 0; margin: 0 auto; }
.qt-module .phase-step { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.qt-module .phase-num {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--tone);
  transition: background var(--t-slide) var(--ease), color var(--t-slide) var(--ease); flex-shrink: 0;
}
.qt-module .phase-step.active .phase-num { color: #fff; background: var(--accent); }
.qt-module .phase-step.done .phase-num { color: #fff; background: var(--ok); }
.qt-module .phase-label { font-size: 12.5px; font-weight: 500; color: var(--ink-3); transition: color var(--t-slide) var(--ease); }
.qt-module .phase-step.active .phase-label { color: var(--ink); font-weight: 600; }
.qt-module .phase-step.done .phase-label { color: var(--ink-2); }
.qt-module .phase-line { width: 32px; height: 2px; background: var(--tone-2); margin: 0 6px; flex-shrink: 0; transition: background var(--t-slide) var(--ease); border-radius: var(--r-full); }
.qt-module .phase-line.done { background: var(--ok); }

.qt-module main { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow-y: auto; width: 100%; padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 20px; }
/* Review/Results ยังเป็นคอลัมน์อ่านสบายกลางจอ (ยาวได้ เลื่อนใน main) */
.qt-module #review-section, .qt-module #result-section { width: 100%; max-width: 900px; margin: 0 auto; }

/* Phase 1 — จอเดียวพอดี: hero drop-zone ยืดเต็มพื้นที่ที่เหลือ แถว action อยู่ล่างเสมอ */
.qt-module #phase1 { flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 14px; width: 100%; max-width: 1100px; margin: 0 auto; }
.qt-module #phase1 .drop-zone {
  flex: 1 1 auto; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--r-3); padding: 24px;
}
.qt-module #phase1 .dz-icon { font-size: 46px; margin-bottom: 16px; }
.qt-module #phase1 .dz-title { font-size: 17px; font-weight: 700; }
.qt-module #phase1 .dz-sub { font-size: 13px; margin-top: 8px; }
.qt-module #phase1 .dz-file { font-size: 16px; }
.qt-module #phase1 .dz-size { font-size: 12.5px; margin-top: 6px; }
.qt-module .qt-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.qt-module .qt-actions .btn-primary { flex: 1 1 auto; width: auto; }
.qt-module .qt-actions .btn-secondary { height: 44px; border-radius: var(--r-2); padding: 0 22px; font-size: 13.5px; }
.qt-module .qt-footrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 0 0 auto; }
.qt-module .qt-footrow .hint { margin-top: 0; }
.qt-module .qt-rawlink {
  background: none; border: none; color: var(--ink-3); font-size: 11.5px; font-weight: 500; cursor: pointer;
  font-family: inherit; white-space: nowrap; padding: 0; transition: color var(--t-hover) ease;
}
.qt-module .qt-rawlink:hover { color: var(--accent); text-decoration: underline; }
.qt-module .card { background: var(--surface); border-radius: var(--r-3); padding: 22px 24px; box-shadow: var(--sh-1); animation: qt-fade-up 400ms var(--ease) both; transition: box-shadow var(--t-hover) ease; }
.qt-module .card:focus-within { box-shadow: var(--sh-2), 0 0 0 2px var(--accent-tint); }
.qt-module .section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.qt-module .step-num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent-tint); display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 700; color: var(--accent); flex-shrink: 0;
}

.qt-module .key-row { display: flex; gap: 8px; }
.qt-module .key-input { flex: 1; background: var(--tone-2); border: none; border-radius: var(--r-1); padding: 8px 12px; color: var(--ink); font-size: 13px; outline: none; font-family: var(--font-num); transition: background var(--t-hover) ease, box-shadow var(--t-hover) ease; }
.qt-module .key-input:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.qt-module .key-toggle { background: var(--tone-2); border: none; border-radius: var(--r-1); padding: 0 14px; color: var(--ink-2); cursor: pointer; font-size: 15px; }
.qt-module .key-hint { color: var(--ink-3); font-size: 11.5px; margin-top: 8px; }
.qt-module details { margin-top: 12px; }
.qt-module summary { color: var(--accent); font-size: 11.5px; font-weight: 600; cursor: pointer; user-select: none; list-style: none; }
.qt-module summary::marker, .qt-module summary::-webkit-details-marker { display: none; }
.qt-module .deploy-guide { margin-top: 10px; background: var(--tone); border-radius: var(--r-1); padding: 14px 16px; font-family: var(--font-num); font-size: 11.5px; color: var(--ink-2); line-height: 2; }

.qt-module .drop-zone {
  border-radius: var(--r-2); padding: 36px 24px; text-align: center; cursor: pointer; background: var(--tone);
  transition: background var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.qt-module .drop-zone:hover, .qt-module .drop-zone.drag { background: var(--accent-tint); box-shadow: 0 0 0 2px var(--accent) inset; }
.qt-module .drop-zone.has-file { background: var(--ok-tint); box-shadow: 0 0 0 2px var(--ok) inset; }
.qt-module .drop-zone input { display: none; }
.qt-module .dz-icon { font-size: 30px; margin-bottom: 10px; }
.qt-module .dz-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.qt-module .dz-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.qt-module .dz-file { font-weight: 600; font-size: 14px; color: var(--ok); }
.qt-module .dz-size { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

.qt-module .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qt-module .chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: var(--r-full);
  font-size: 12.5px; font-weight: 500; cursor: pointer; background: var(--tone); color: var(--ink-2);
  transition: background var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-hover) ease; user-select: none;
}
.qt-module .chip:hover { background: var(--tone-2); }
.qt-module .chip.active { background: var(--ink); color: #fff; }
.qt-module .chip .chip-sub { opacity: .6; font-size: 10.5px; }

.qt-module textarea {
  width: 100%; background: var(--tone-2); border: none; border-radius: var(--r-2); padding: 12px 16px;
  color: var(--ink); font-size: 13.5px; resize: vertical; outline: none; font-family: inherit;
  transition: background var(--t-hover) ease, box-shadow var(--t-hover) ease; min-height: 80px;
}
.qt-module textarea:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.qt-module .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.55; }
.qt-module .divider { margin-top: 12px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--tone-2); }

.qt-module .btn-primary {
  width: 100%; height: 44px; background: var(--accent); color: #fff; border: none; border-radius: var(--r-2);
  font-weight: 600; font-size: 14.5px; cursor: pointer; font-family: inherit; box-shadow: var(--sh-2);
  transition: background var(--t-hover) ease, transform var(--t-hover) ease, box-shadow var(--t-hover) ease;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.qt-module .btn-primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--sh-3); }
.qt-module .btn-primary:active:not(:disabled) { background: var(--accent-press); transform: translateY(0); }
.qt-module .btn-primary:disabled { background: var(--tone-2); color: var(--ink-3); box-shadow: none; cursor: not-allowed; }
.qt-module .btn-secondary {
  height: var(--ctl-h); padding: 0 18px; background: var(--surface); color: var(--ink); border: none; border-radius: var(--r-1);
  font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; box-shadow: var(--sh-1);
  transition: background var(--t-hover) ease, box-shadow var(--t-hover) ease; display: inline-flex; align-items: center; gap: 8px;
}
.qt-module .btn-secondary:hover { background: var(--tone); box-shadow: var(--sh-2); }
.qt-module .btn-green {
  height: 40px; padding: 0 24px; background: var(--ok); color: #fff; border: none; border-radius: var(--r-2);
  font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: inherit; box-shadow: var(--sh-2);
  transition: background var(--t-hover) ease, transform var(--t-hover) ease; display: inline-flex; align-items: center; gap: 8px;
}
.qt-module .btn-green:hover { background: #0E8A44; transform: translateY(-1px); }

.qt-module #error-box { display: none; background: var(--risk-tint); border-radius: var(--r-1); padding: 12px 16px; color: var(--risk); font-size: 13px; font-weight: 500; animation: qt-fade-up var(--t-slide) var(--ease) both; }
.qt-module #progress {
  display: none; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-2); padding: 13px 18px;
  box-shadow: var(--sh-1); animation: qt-fade-up var(--t-slide) var(--ease) both;
}
.qt-module .progress-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: qt-pulse 1.2s ease-in-out infinite; flex-shrink: 0; }
.qt-module #progress-msg { font-size: 13px; color: var(--ink-2); font-weight: 500; }

.qt-module #review-section { display: none; animation: qt-fade-up var(--t-slide) var(--ease) both; }
.qt-module .review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.qt-module .review-title { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.qt-module .review-hint { font-size: 12.5px; color: var(--ink-2); margin-bottom: 18px; padding: 10px 14px; background: var(--accent-tint); border-radius: var(--r-1); line-height: 1.6; }

.qt-module .el-card { background: var(--surface); border-radius: var(--r-3); margin-bottom: 12px; overflow: hidden; box-shadow: var(--sh-1); transition: box-shadow var(--t-hover) ease; animation: qt-fade-up 350ms var(--ease) both; }
.qt-module .el-card:hover { box-shadow: var(--sh-2); }
.qt-module .el-card-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--tone); gap: 12px; flex-wrap: wrap; }
.qt-module .el-id-input { background: transparent; border: none; outline: none; font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--ink); width: 80px; letter-spacing: -.01em; }
.qt-module .el-type-badge { font-size: 10.5px; font-weight: 600; color: var(--ink-2); background: var(--tone-2); padding: 3px 8px; border-radius: var(--r-1); text-transform: uppercase; letter-spacing: .04em; }
.qt-module .el-delete { background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: 15px; padding: 4px 8px; border-radius: var(--r-1); transition: background var(--t-hover) ease, color var(--t-hover) ease; }
.qt-module .el-delete:hover { background: var(--risk-tint); color: var(--risk); }
.qt-module .el-body { padding: 16px 18px; }
.qt-module .field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.qt-module .field-group { display: flex; flex-direction: column; gap: 5px; }
.qt-module .field-label { font-size: 10.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.qt-module .field-input {
  background: var(--tone-2); border: none; border-radius: var(--r-1); padding: 8px 12px; color: var(--ink);
  font-size: 13px; font-family: var(--font-num); font-variant-numeric: tabular-nums; outline: none;
  transition: background var(--t-hover) ease, box-shadow var(--t-hover) ease; width: 100%;
}
.qt-module .field-input:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.qt-module .field-input.estimated { background: var(--warn-tint); color: var(--warn); }
.qt-module .field-input.estimated:focus { background: #fff; box-shadow: 0 0 0 2px var(--warn); }
.qt-module .field-unit { font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }
.qt-module .steel-section { padding-top: 14px; margin-top: 4px; box-shadow: inset 0 1px 0 var(--tone-2); }
.qt-module .steel-section-title { font-size: 10.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.qt-module .steel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.qt-module .steel-pos { font-size: 11.5px; font-weight: 600; color: var(--ink-2); min-width: 64px; flex-shrink: 0; }
.qt-module .steel-input { background: var(--tone-2); border: none; border-radius: var(--r-1); padding: 7px 10px; color: var(--ink); font-size: 12px; font-family: var(--font-num); font-variant-numeric: tabular-nums; outline: none; transition: background var(--t-hover) ease, box-shadow var(--t-hover) ease; width: 72px; flex-shrink: 0; }
.qt-module .steel-input:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.qt-module .steel-input.estimated { background: var(--warn-tint); color: var(--warn); }
.qt-module .steel-between { font-size: 12px; color: var(--ink-3); text-align: center; }
.qt-module .bar-type-toggle { display: inline-flex; border-radius: var(--r-1); overflow: hidden; background: var(--tone-2); flex-shrink: 0; }
.qt-module .section-block { border-radius: var(--r-2); padding: 12px 14px; margin-top: 10px; background: var(--tone); }
.qt-module .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.qt-module .section-label { font-size: 11px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.qt-module .bar-type-btn { padding: 6px 10px; font-size: 11px; font-weight: 700; background: transparent; border: none; color: var(--ink-3); cursor: pointer; font-family: inherit; transition: background var(--t-hover) ease, color var(--t-hover) ease; letter-spacing: .02em; }
.qt-module .bar-type-btn.active-db { background: var(--accent-tint); color: var(--accent); }
.qt-module .bar-type-btn.active-rb { background: var(--warn-tint); color: var(--warn); }
.qt-module .estimated-badge { font-size: 9.5px; font-weight: 700; color: var(--warn); background: var(--warn-tint); padding: 2px 6px; border-radius: var(--r-1); margin-left: 8px; }

.qt-module .el-count-chip { font-size: 10.5px; font-weight: 600; color: var(--ink-2); background: var(--tone-2); padding: 3px 9px; border-radius: var(--r-full); font-family: var(--font-num); cursor: help; }
.qt-module .el-review-badge { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-full); }
.qt-module .el-review-badge--est { color: var(--warn); background: var(--warn-tint); }
.qt-module .el-review-badge--sure { color: var(--accent); background: var(--accent-tint); }
.qt-module .el-review-badge--verified { color: var(--ok); background: var(--ok-tint); }
.qt-module .el-verify-btn { background: var(--surface); border: none; border-radius: var(--r-1); padding: 6px 12px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; font-family: inherit; box-shadow: var(--sh-1); transition: background var(--t-hover) ease, color var(--t-hover) ease; white-space: nowrap; }
.qt-module .el-verify-btn:hover { background: var(--ok-tint); color: var(--ok); }
.qt-module .el-verify-btn.is-verified { background: var(--ok-tint); color: var(--ok); }
.qt-module .el-card--verified { box-shadow: var(--sh-1), 0 0 0 1.5px var(--ok-tint); }
.qt-module .el-card--verified:hover { box-shadow: var(--sh-2), 0 0 0 1.5px var(--ok-tint); }
.qt-module .add-el-btn {
  width: 100%; padding: 12px; border-radius: var(--r-2); background: var(--tone); color: var(--ink-2);
  font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background var(--t-hover) ease, color var(--t-hover) ease; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.qt-module .add-el-btn:hover { background: var(--accent-tint); color: var(--accent); }
.qt-module .review-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.qt-module .calc-options-box { background: var(--surface); border-radius: var(--r-3); padding: 16px 18px; margin-top: 20px; box-shadow: var(--sh-1); }
.qt-module .calc-options-title { font-size: 10.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.qt-module .calc-options-title::before { content: '⚙'; }
.qt-module .calc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qt-module .calc-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: var(--r-full);
  font-size: 12.5px; font-weight: 500; cursor: pointer; background: var(--tone); color: var(--ink-3);
  transition: background var(--t-hover) ease, color var(--t-hover) ease; user-select: none; line-height: 1;
}
.qt-module .calc-chip .cc-icon { font-size: 14px; }
.qt-module .calc-chip .cc-sub { font-size: 10.5px; opacity: .6; margin-left: 2px; }
.qt-module .calc-chip.active { background: var(--accent-tint); color: var(--accent); }
.qt-module .calc-chip.active-green { background: var(--ok-tint); color: var(--ok); }
.qt-module .calc-chip.active-yellow { background: var(--warn-tint); color: var(--warn); }

.qt-module .summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.qt-module .summary-cell { background: var(--surface); border-radius: var(--r-3); padding: 18px 16px; text-align: center; box-shadow: var(--sh-1); animation: qt-fade-up 400ms var(--ease) both; }
.qt-module .s-val { font-family: var(--font-num); font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.qt-module .s-unit { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.qt-module .s-label { font-size: 11.5px; color: var(--ink-2); margin-top: 6px; font-weight: 500; }
.qt-module .beam-cards { display: flex; flex-direction: column; gap: 12px; }
.qt-module .beam-card { background: var(--surface); border-radius: var(--r-3); overflow: hidden; box-shadow: var(--sh-1); transition: box-shadow var(--t-hover) ease; animation: qt-fade-up 350ms var(--ease) both; }
.qt-module .beam-card:hover { box-shadow: var(--sh-2); }
.qt-module .beam-header { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; background: var(--tone); cursor: pointer; }
.qt-module .beam-id-block { display: flex; align-items: center; gap: 10px; }
.qt-module .beam-id { font-size: 15px; font-weight: 700; color: var(--ink); }
.qt-module .beam-size { font-family: var(--font-num); font-size: 11px; color: var(--ink-2); background: var(--tone-2); padding: 3px 8px; border-radius: var(--r-1); }
.qt-module .beam-chevron { color: var(--ink-3); transition: transform var(--t-hover) ease; font-size: 11px; }
.qt-module .beam-card.open .beam-chevron { transform: rotate(180deg); }
.qt-module .beam-body { display: none; padding: 16px 18px; }
.qt-module .beam-card.open .beam-body { display: block; animation: qt-fade-up var(--t-slide) var(--ease) both; }
.qt-module .qty-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.qt-module .qty-pill { display: flex; flex-direction: column; align-items: center; background: var(--tone); border-radius: var(--r-2); padding: 10px 16px; min-width: 90px; }
.qt-module .qp-val { font-family: var(--font-num); font-size: 16px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.qt-module .qp-unit { font-size: 10px; color: var(--accent); font-weight: 700; margin-top: 1px; }
.qt-module .qp-label { font-size: 10px; color: var(--ink-3); margin-top: 4px; }
.qt-module .qty-pill-dia { background: var(--accent-tint); min-width: 72px; }

.qt-module .steel-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.qt-module .steel-table th { background: var(--tone); color: var(--ink-3); font-weight: 600; padding: 7px 10px; text-align: left; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.qt-module .steel-table td { padding: 7px 10px; color: var(--ink-2); }
.qt-module .steel-table tr:nth-child(even) td { background: var(--tone); }
.qt-module .steel-table tr:hover td { background: var(--accent-tint); }

.qt-module .result-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.qt-module .result-title-txt { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.qt-module .copy-btn { background: var(--tone); border: none; border-radius: var(--r-1); padding: 7px 16px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; font-family: inherit; transition: background var(--t-hover) ease; }
.qt-module .copy-btn:hover { background: var(--tone-2); }
.qt-module .copy-btn.copied { background: var(--ok-tint); color: var(--ok); }
.qt-module .save-btn { background: var(--accent); border: none; border-radius: var(--r-1); padding: 7px 16px; font-size: 11.5px; font-weight: 600; color: #fff; cursor: pointer; font-family: inherit; transition: background var(--t-hover) ease; }
.qt-module .save-btn:hover { background: var(--accent-hover); }
.qt-module .save-btn.saved { background: var(--ok); }
.qt-module .save-btn:disabled { opacity: .65; cursor: wait; }
.qt-module .result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.qt-module .warn-box { background: var(--warn-tint); border-radius: var(--r-1); padding: 10px 14px; color: var(--warn); font-size: 12.5px; margin-bottom: 14px; font-weight: 500; }

.qt-module .modal-overlay { position: absolute; inset: 0; background: rgba(25,28,36,.45); backdrop-filter: blur(2px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; animation: qt-fade-up 160ms ease both; }
.qt-module .modal-box { background: var(--surface); border-radius: var(--r-3); padding: 24px; max-width: 520px; width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: var(--sh-3); animation: qt-pop-in var(--t-pop) var(--ease) both; }
.qt-module .modal-title { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.qt-module .modal-sub { font-size: 12.5px; color: var(--ink-2); margin-bottom: 18px; line-height: 1.6; }
.qt-module .page-thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.qt-module .page-thumb { border-radius: var(--r-1); overflow: hidden; cursor: pointer; transition: box-shadow var(--t-hover) ease; position: relative; box-shadow: 0 0 0 1.5px var(--tone-2); }
.qt-module .page-thumb:hover { box-shadow: 0 0 0 1.5px var(--accent); }
.qt-module .page-thumb.selected { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-tint); }
.qt-module .page-thumb.selected::after { content: '✓'; position: absolute; top: 4px; right: 6px; color: var(--accent); font-weight: 800; font-size: 13px; background: #fff; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.qt-module .page-thumb img { width: 100%; display: block; object-fit: contain; background: var(--tone); }
.qt-module .page-thumb-label { font-size: 10px; color: var(--ink-2); text-align: center; padding: 4px 2px; background: var(--surface); }
.qt-module .modal-btns { display: flex; gap: 10px; justify-content: flex-end; }
.qt-module .modal-hint { background: var(--accent-tint); border-radius: var(--r-1); padding: 10px 14px; font-size: 11.5px; color: var(--ink-2); margin-bottom: 14px; line-height: 1.6; }
.qt-module #modal-selected-count { font-size: 11.5px; color: var(--ink-3); margin-bottom: 12px; }

.qt-module .dia-breakdown { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; }
.qt-module .dia-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 7px; background: var(--tone); border-radius: var(--r-1); }
.qt-module .dia-tag { font-size: 10px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.qt-module .dia-kg { font-size: 11px; font-weight: 600; color: var(--ink-2); }
