/* 시트웍스: 계측 도면 자동화 UI 시안 (automate) */

.am {
  --bg: #EDF0F2;
  --surface: #FFFFFF;
  --surface-2: #F6F8F9;
  --text: #142130;
  --muted: #586776;
  --faint: #8C99A6;
  --line: #D3DAE0;
  --line-strong: #AEBBC7;
  --rail: #0F1B27;
  --rail-text: #AEBBC7;
  --primary: #0E4D7E;
  --primary-press: #0A3D66;
  --primary-soft: #E3EEF7;
  --primary-mid: #7FA6C6;
  --accent: #E2560E;
  --accent-ink: #C2470A;
  --accent-soft: #FDF1EA;
  --ok: #1B6E45;
  --ok-soft: #E4F3EA;
  --warn: #8A4B00;
  --warn-line: #C98A1B;
  --warn-soft: #FDF0D5;
  --danger: #B3261E;
  --danger-soft: #FBE7E5;
  --neutral: #4A5563;
  --neutral-soft: #ECEFF2;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --tech: "IBM Plex Sans Condensed", "Pretendard Variable", Pretendard, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 6px;
  --r-lg: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

.am {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 22px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
:where(.am) :where(p, h1, h2, h3, ol, ul, dl, dd, figure) { margin: 0; }
:where(.am) :where(button, input, select) { font: inherit; color: inherit; }
.am [hidden] { display: none !important; }
.am :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.am .demo-notice {
  order: -1;
  height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: #E2E7EB;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 틀 ─────────────────────────── */
.am-shell {
  --rail-w: 224px;
  flex: 1;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  background: linear-gradient(to right, var(--rail) var(--rail-w), transparent var(--rail-w));
}
.am-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 16px;
  background: var(--rail);
  color: var(--rail-text);
}
.am-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}
.am-brand__mark { flex: none; }
.am-brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.am-brand__name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.am-brand__sub { font-size: 11.5px; color: var(--rail-text); }
.am-nav { display: flex; flex-direction: column; gap: 2px; }
.am-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--r);
  color: var(--rail-text);
  text-decoration: none;
  font-weight: 500;
}
.am-nav__item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.am-nav__item.is-active { background: rgba(127, 166, 198, 0.16); color: #fff; box-shadow: inset 3px 0 0 var(--primary-mid); }
.am-rail__foot {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  line-height: 18px;
  color: #74879A;
}
.am-rail__tag { font-family: var(--tech); font-size: 12px; color: var(--rail-text); }

.am-main { min-width: 0; display: flex; flex-direction: column; }
.am-top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.am-top__crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.am-top__crumb a { color: var(--muted); text-decoration: none; }
.am-top__crumb a:hover { color: var(--text); text-decoration: underline; }
.am-crumb__sep { color: var(--line-strong); }
.am-crumb__cur { color: var(--text); font-weight: 600; }
.am-top__right { display: flex; align-items: center; gap: 10px; flex: none; }
.am-user {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.am-content { width: 100%; max-width: 1600px; padding: 28px 32px 104px; }

/* ── 글자 ─────────────────────────── */
.am-h1 { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; }
.am-h2 { font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; }
.am-h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
.am-lead { margin-top: 4px; color: var(--muted); }
.am-meta { font-size: 12px; line-height: 18px; color: var(--muted); font-weight: 500; }
.am-hint { padding: 12px 20px 16px; font-size: 12px; line-height: 18px; color: var(--muted); }
.is-num { text-align: right; }

/* ── 페이지 머리 ─────────────────────────── */
.am-page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.am-page__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.am-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  margin-bottom: 20px;
  padding: 0;
  list-style: none;
}
.am-flow li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.am-flow li + li::before { content: ""; width: 36px; height: 1px; margin: 0 10px; background: var(--line-strong); }
.am-flow span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-size: 11.5px;
  line-height: 1;
}
.am-flow .is-done { color: var(--text); }
.am-flow .is-done span { background: var(--primary); border-color: var(--primary); color: #fff; }
.am-flow .is-cur { color: var(--primary); }
.am-flow .is-cur span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* ── 버튼 ─────────────────────────── */
.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.am-btn--primary { background: var(--primary); color: #fff; }
.am-btn--primary:hover { background: var(--primary-press); }
.am-btn--secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.am-btn--secondary:hover { background: #F1F4F6; }
.am-btn--ghost { background: transparent; color: var(--primary); }
.am-btn--ghost:hover { background: var(--primary-soft); }
.am-btn--danger { background: var(--surface); border-color: #E9B4AF; color: var(--danger); }
.am-btn--danger:hover { background: #FEF6F5; }
.am-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.am-btn--xs { height: 28px; padding: 0 10px; font-size: 12.5px; }
.am-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.am-btn.is-busy::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: am-spin 0.8s linear infinite;
}
.am-icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.am-icon-btn:hover { background: var(--neutral-soft); color: var(--text); }

/* ── 배지·점 ─────────────────────────── */
.am-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.am-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.am-badge--xs { height: 20px; padding: 0 6px; font-size: 11.5px; }
.am-badge--ok { background: var(--ok-soft); color: var(--ok); }
.am-badge--warn { background: var(--warn-soft); color: var(--warn); }
.am-badge--danger { background: var(--danger-soft); color: var(--danger); }
.am-badge--info { background: var(--primary-soft); color: var(--primary); }
.am-badge--neutral { background: var(--neutral-soft); color: var(--neutral); }
.am-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }
.am-dot--ok { background: var(--ok); }
.am-dot--warn { background: var(--warn-line); }
.am-dot--danger { background: var(--danger); }
.am-dot--info { background: var(--primary); }

/* ── 도구 줄 ─────────────────────────── */
.am-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.am-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-lg); background: #E0E6EA; max-width: 100%; overflow-x: auto; }
.am-seg__item {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.am-seg__item:hover { color: var(--text); }
.am-seg__item.is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15, 27, 39, 0.14); }
.am-seg__n { margin-left: 2px; color: var(--faint); font-weight: 500; }
.am-seg--full { display: flex; margin: 16px 20px 0; }
.am-seg--full .am-seg__item { flex: 1; }
.am-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
  max-width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
}
.am-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 77, 126, 0.14); }
.am-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }

.am-review {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  scroll-margin-top: 72px;
}
.am-review__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.am-review__opts { display: flex; gap: 6px; flex-wrap: wrap; }
.am-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.am-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.am-chip:hover { border-color: var(--text); }
.am-chip.is-on { background: var(--text); border-color: var(--text); color: #fff; }
.am-chip__n { margin-left: 2px; color: var(--faint); font-weight: 500; }
.am-chip.is-on .am-chip__n { color: rgba(255, 255, 255, 0.7); }

/* ── 패널·표 ─────────────────────────── */
.am-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.am-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.am-table { width: 100%; border-collapse: collapse; }
.am-table th, .am-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.am-table thead th { padding-top: 9px; padding-bottom: 9px; background: var(--surface-2); color: var(--muted); font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.am-table .is-num { text-align: right; }
.am-table tbody tr:last-child > * { border-bottom: 0; }

/* 프로젝트 목록 */
.am-prow:hover { background: #F6F9FB; }
.am-prow.is-new { background: #F2F7FB; }
.am-prow__link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.am-prow__link:hover { color: var(--primary); text-decoration: underline; }
.am-prow__code { display: block; margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--muted); }
.am-prow__issue { display: block; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--muted); }
.am-prow__time { color: var(--muted); white-space: nowrap; font-size: 13px; }
.am-steps { display: flex; flex-direction: column; gap: 5px; }
.am-steps__bar { display: flex; gap: 3px; }
.am-steps__bar i { width: 20px; height: 4px; border-radius: 2px; background: var(--line); }
.am-steps__bar i.is-done { background: var(--primary); }
.am-steps__bar i.is-cur { background: var(--primary-mid); }
.am-steps__bar i.is-err { background: var(--danger); }
.am-steps__label { font-size: 12px; line-height: 16px; color: var(--muted); }

/* ── 상태 UI ─────────────────────────── */
.am-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 56px 24px;
  text-align: center;
}
.am-state__art { margin-bottom: 10px; }
.am-state__title { font-size: 16px; line-height: 24px; font-weight: 700; }
.am-state__text { max-width: 420px; color: var(--muted); margin-bottom: 10px; }
.am-state--inline { padding: 32px 24px; border-top: 1px solid var(--line); }
.am-state--mini { padding: 24px 16px; gap: 4px; }
.am-state--mini .am-state__title { font-size: 14px; line-height: 20px; }
.am-state--mini .am-state__text { font-size: 13px; line-height: 20px; }
.am-state--error .am-state__title { color: var(--danger); }

.am-skel { padding: 4px 0; }
.am-skel__msg { padding: 12px 16px 4px; font-size: 12px; color: var(--muted); }
.am-skel__row { display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.am-skel__row:last-child { border-bottom: 0; }
.am-skel__row i {
  display: block;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, #E5EAEE 25%, #F3F5F7 50%, #E5EAEE 75%);
  background-size: 200% 100%;
  animation: am-shimmer 1.2s linear infinite;
}
.am-skel--mini .am-skel__row { padding: 14px 16px; }

/* ── 대화상자 ─────────────────────────── */
.am-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(15, 27, 39, 0.28);
  overflow: auto;
}
.am-dialog::backdrop { background: rgba(15, 27, 39, 0.45); }
.am-dialog--map { width: min(660px, calc(100vw - 32px)); }
.am-dialog--export { width: min(600px, calc(100vw - 32px)); }
.am-dialog__body { padding: 20px 24px; }
.am-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.am-dialog__title { font-size: 18px; line-height: 26px; font-weight: 700; }
.am-dialog__foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.am-dialog__note { margin-top: 16px; font-size: 12px; line-height: 18px; color: var(--muted); }
.am-dialog__warn { margin-top: 14px; font-size: 13px; line-height: 20px; color: var(--muted); }
.am-dialog__warn.is-block { color: var(--danger); font-weight: 600; }
.am-dialog--export .am-dialog__warn { padding: 10px 12px; border-radius: var(--r); background: var(--warn-soft); color: var(--warn); }

.am-map { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.am-map__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.am-map__need { font-size: 14px; }
.am-map__show { color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.am-map__show:hover { text-decoration: underline; }

/* 폼 */
.am-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.am-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.am-field--wide { grid-column: 1 / -1; }
.am-field__label { font-size: 13px; line-height: 18px; font-weight: 600; padding: 0; }
.am-field__label em { margin-left: 4px; font-style: normal; font-size: 11px; color: var(--accent-ink); }
.am-field input[type="text"], .am-field select, .am-select, .am-settings input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
}
.am-field input[type="text"]:focus, .am-field select:focus, .am-select:focus, .am-settings input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 77, 126, 0.14); }
.am-field input[aria-invalid="true"], .am-settings input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12); }
.am-field__err { font-size: 12px; line-height: 18px; color: var(--danger); }
.am-radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.am-radio, .am-check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; font-weight: 600; cursor: pointer; }
.am-radio input, .am-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }

/* 토스트·떠 있는 버튼 */
.am-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px 12px 16px;
  border-left: 4px solid #5FD39A;
  border-radius: var(--r-lg);
  background: var(--text);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  box-shadow: 0 12px 32px rgba(15, 27, 39, 0.3);
  transform: translate(-50%, 8px);
  opacity: 0;
}
.am-toast.is-in { transform: translate(-50%, 0); opacity: 1; transition: transform 0.2s, opacity 0.2s; }
.am-toast[data-tone="info"] { border-left-color: var(--primary-mid); }
.am-toast[data-tone="warn"] { border-left-color: #F2B544; }
.am-toast[data-tone="danger"] { border-left-color: #F2766E; }
.am-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(15, 27, 39, 0.16);
  cursor: pointer;
}
.am-fab:hover { border-color: var(--text); }

/* ── 파싱 검수 ─────────────────────────── */
.am-tabs--inst { display: flex; gap: 8px; margin-bottom: 16px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.am-inst {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 148px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.am-inst:hover { border-color: var(--line-strong); }
.am-inst.is-on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: #F7FAFD; }
.am-inst__tag { font-family: var(--tech); font-size: 15px; line-height: 20px; font-weight: 600; }
.am-inst__place { font-size: 12px; line-height: 16px; color: var(--muted); }
.am-inst__sum { display: flex; gap: 4px; margin-top: 6px; min-height: 20px; }

.am-done {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid #B9DCC7;
  border-radius: var(--r-lg);
  background: var(--ok-soft);
}
.am-done p { flex: 1; min-width: 220px; }

.am-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.am-raw { position: sticky; top: 72px; }
.am-upload { position: relative; }
.am-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.am-upload:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }

.am-raw__text {
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: #FAFBFC;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
  overflow-x: auto;
}
.am-raw__line {
  display: flex;
  gap: 12px;
  width: max-content;
  min-width: 100%;
  padding: 3px 16px 3px 0;
  white-space: pre;
  cursor: pointer;
}
.am-raw__line:hover { background: #EFF3F6; }
.am-raw__no { flex: none; width: 34px; text-align: right; color: var(--faint); user-select: none; }
.am-raw__line code { font: inherit; }
.am-raw__line.has-warn { box-shadow: inset 3px 0 0 var(--warn-line); }
.am-raw__line.has-warn code { text-decoration: underline wavy var(--warn-line); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.am-raw__line.has-danger { box-shadow: inset 3px 0 0 var(--danger); background: #FEF6F5; }
.am-raw__line.has-danger code { text-decoration: underline wavy var(--danger); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.am-raw__line.is-hit { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.am-raw__foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; line-height: 18px; color: var(--muted); }

.am-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.am-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.am-switch__track { position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--line-strong); transition: background-color 0.15s; }
.am-switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.am-switch input:checked + .am-switch__track { background: var(--primary); }
.am-switch input:checked + .am-switch__track::after { transform: translateX(14px); }
.am-switch input:focus-visible + .am-switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }

.am-table--parsed .am-pr__field { width: 26%; font-size: 13.5px; font-weight: 600; }
.am-pr__val { font-weight: 500; }
.am-pr__unit { color: var(--muted); font-size: 12px; }
.am-pr__note { margin-top: 3px; font-size: 12px; line-height: 18px; color: var(--muted); }
.am-pr__line { width: 64px; }
.am-pr__line span { font-family: var(--tech); font-size: 12px; color: var(--faint); }
.am-pr__state { width: 150px; white-space: nowrap; }
.am-pr { transition: background-color 0.2s; }
.am-pr:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.am-pr--danger { background: #FEF7F6; }
.am-pr--danger > :first-child { box-shadow: inset 3px 0 0 var(--danger); }
.am-pr--danger .am-pr__note { color: var(--danger); }
.am-pr--warn { background: #FFFBF2; }
.am-pr--warn > :first-child { box-shadow: inset 3px 0 0 var(--warn-line); }
.am-pr--warn .am-pr__note { color: var(--warn); }
.am-pr--fixed .am-pr__note { color: var(--primary); }
.am-pr.is-hit { background: var(--accent-soft); }
.am-pr.is-hit > :first-child { box-shadow: inset 3px 0 0 var(--accent); }
.am-table--parsed.is-only tr.am-pr:not([data-tone="danger"]):not([data-tone="warn"]) { display: none; }
.am-ack {
  height: 26px;
  margin-left: 6px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.am-ack:hover { border-color: var(--text); }
.am-fix { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.am-fix input {
  width: 110px;
  height: 32px;
  padding: 0 10px;
  border: 1.5px solid var(--danger);
  border-radius: var(--r);
  background: var(--surface);
}
.am-fix input:focus { outline: 0; box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.14); }
.am-fix__unit { font-size: 12px; color: var(--muted); }
.am-fix__err { width: 100%; font-size: 12px; line-height: 18px; color: var(--danger); font-weight: 600; }

.am-alert-title { display: flex; align-items: flex-start; gap: 12px; }
.am-alert-icon { margin-top: 2px; }
.am-issues { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.am-issue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.am-issue--danger { border-color: #F0C7C3; background: #FEF8F7; }
.am-issue--warn { border-color: #F1DDB4; background: #FFFBF2; }
.am-issue__body strong { display: block; font-size: 14px; }
.am-issue__body p { font-size: 13px; line-height: 20px; color: var(--muted); }
.am-issue__src { font-family: var(--tech); font-size: 12px; color: var(--faint); }
.am-issue .am-check { min-height: 28px; }

/* ── 도식화 매핑 ─────────────────────────── */
.am-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
}
.am-banner p { flex: 1; min-width: 220px; }
.am-banner--danger { border: 1px solid #F0C7C3; background: var(--danger-soft); color: #7A1A14; }
.am-mapgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.am-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 4px; }
.am-legend i { display: inline-block; width: 18px; margin-right: 6px; vertical-align: middle; border-top: 2px solid var(--accent); }
.am-legend .am-legend__manual { border-top-color: var(--primary); }
.am-drawing { padding: 12px; background: #F7F9FA; border-bottom: 1px solid var(--line); }
.am-svg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); }
.am-svg text { font-family: var(--tech); font-size: 12px; fill: var(--text); }
.am-svg .am-svg__cap { font-size: 11px; font-weight: 600; fill: var(--muted); }
.am-node { cursor: pointer; }
.am-node rect { fill: #fff; stroke: var(--line-strong); stroke-width: 1.2; transition: fill 0.15s, stroke 0.15s; }
.am-node:hover rect { stroke: var(--primary); }
.am-node:focus-visible { outline: none; }
.am-node:focus-visible rect { stroke: var(--primary); stroke-width: 2; }
.am-node.is-picked rect { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 2; }
.am-svg .am-node__label { font-family: var(--font); font-size: 13px; font-weight: 700; }
.am-svg .am-node__value { font-size: 12px; fill: var(--muted); }
.am-svg .am-node__kind { font-size: 10.5px; fill: var(--faint); }
.am-node__port { fill: var(--accent); }
.am-node.is-missing rect { fill: #FEF6F5; stroke: var(--danger); stroke-dasharray: 4 3; }
.am-svg .am-node.is-missing .am-node__value { fill: var(--danger); font-family: var(--font); font-weight: 600; }
.am-link {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1), d 0.35s ease;
}
.am-link.is-drawn { stroke-dashoffset: 0; }
.am-link.is-manual { stroke: var(--primary); }
.am-link.is-missing { stroke: var(--danger); stroke-dasharray: 0.02 0.016; stroke-dashoffset: 0; opacity: 0.7; }
.am-tb__pin { fill: #fff; stroke: var(--text); stroke-width: 1; }
.am-tb__fn-box { fill: #F3F6F8; stroke: var(--text); stroke-width: 1; }
.am-svg .am-tb__no { font-weight: 600; }
.am-svg .am-tb__fn { font-size: 10.5px; fill: var(--muted); }
.am-tb__wire { stroke: var(--faint); stroke-width: 1; }
.am-tb__brace { stroke: var(--text); stroke-width: 2; }
.am-svg .am-tb__name { font-family: var(--font); font-size: 11.5px; fill: var(--muted); }
.am-tb.is-target { cursor: pointer; }
.am-tb.is-target .am-tb__pin, .am-tb.is-target .am-tb__fn-box { fill: var(--accent-soft); stroke: var(--accent); }
.am-titleblock rect { fill: #fff; stroke: var(--text); stroke-width: 1; }
.am-titleblock path { stroke: var(--text); stroke-width: 0.6; }
.am-svg .am-titleblock text { font-size: 10.5px; }

.am-tank { fill: #fff; stroke: var(--text); stroke-width: 1.5; }
.am-tank__liquid, .am-chamber__liquid { fill: var(--primary-soft); }
.am-tank__surface { fill: none; stroke: var(--primary); stroke-width: 1.2; }
.am-dim { fill: none; stroke: var(--muted); stroke-width: 1; }
.am-svg .am-dim__text { font-size: 11px; fill: var(--muted); }
.am-lvl path { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 6 4; }
.am-svg .am-lvl text { font-size: 11.5px; font-weight: 600; fill: var(--accent-ink); }
.am-lvl.is-missing path { stroke: var(--danger); opacity: 0.45; }
.am-svg .am-lvl.is-missing text { fill: var(--danger); font-family: var(--font); }
.am-nozzle, .am-chamber { fill: #fff; stroke: var(--text); stroke-width: 1.2; }
.am-gauge { fill: var(--primary); }
.am-svg .am-gauge__tag { font-size: 11px; font-weight: 600; fill: #fff; }
.am-svg .am-gauge__tag--out { fill: var(--primary); }
.am-beam { stroke: var(--primary); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.7; }
.am-pipe { fill: none; stroke: var(--muted); stroke-width: 5; }

.am-table--map th, .am-table--map td { padding: 8px 16px; }
.am-table--map tbody th { font-size: 13px; font-weight: 600; white-space: nowrap; }
.am-map-val { color: var(--muted); font-size: 13px; white-space: nowrap; }
.am-select { height: 36px; padding: 0 8px; font-size: 13px; }
.am-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 20px; }
.am-specs dt { font-size: 12px; line-height: 18px; color: var(--muted); }
.am-specs dd { font-weight: 600; }

/* ── 도면 시트 ─────────────────────────── */
.am-tabs--line { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.am-tab {
  height: 44px;
  margin-bottom: -1px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  scroll-margin-top: 72px;
}
.am-tab:hover { color: var(--text); }
.am-tab.is-on { color: var(--text); border-bottom-color: var(--primary); }
.am-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.am-thumb { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color 0.15s; }
.am-thumb:hover { border-color: var(--primary); }
.am-thumb.is-picked { border-color: var(--primary-mid); }
.am-thumb__pick { position: absolute; top: 4px; left: 4px; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.am-thumb__pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.am-thumb__paper { position: relative; padding: 14px; background: #E6EBEF; }
.am-thumb[data-tone="info"] .am-thumb__paper::after {
  content: "";
  position: absolute;
  inset: 14px;
  background: repeating-linear-gradient(135deg, rgba(14, 77, 126, 0.10) 0 10px, rgba(255, 255, 255, 0.5) 10px 20px);
  background-size: 200% 200%;
  animation: am-stripe 2.4s linear infinite;
}
.am-thumb__svg { display: block; width: 100%; height: auto; box-shadow: 0 1px 3px rgba(15, 27, 39, 0.18); }
.am-thumb__tb { font-family: var(--tech); font-size: 8.5px; fill: var(--text); }
.am-thumb__meta { padding: 12px 14px 14px; }
.am-thumb__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.am-thumb__no { font-family: var(--tech); font-size: 13px; font-weight: 600; }
.am-thumb__title { margin-top: 6px; font-weight: 600; }
.am-thumb__sub { font-size: 12px; line-height: 18px; color: var(--muted); }
.am-check--all { padding: 0 4px; }

.am-history { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.am-history__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.am-history__item:last-child { border-bottom: 0; }
.am-history__what { font-weight: 600; }
.am-rev {
  width: 34px;
  height: 30px;
  display: grid;
  place-items: end center;
  padding-bottom: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30'%3E%3Cpath d='M17 2L32 28H2z' fill='%23fff' stroke='%23142130' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  font-family: var(--tech);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.am-history__item.is-latest .am-rev {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30'%3E%3Cpath d='M17 2L32 28H2z' fill='%23FDF1EA' stroke='%23E2560E' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  color: var(--accent-ink);
}
.am-compare { margin-top: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.am-compare .am-h3 { margin-bottom: 8px; }
.am-diff__old { color: var(--muted); text-decoration: line-through; }
.am-diff__new { font-weight: 600; background: var(--accent-soft); }

.am-settings { margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.am-settings__row { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); min-height: 60px; }
.am-settings__row:last-child { border-bottom: 0; }
.am-settings dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.am-settings input { height: 36px; }
.am-settings__act { display: flex; gap: 6px; }

.am-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.am-card-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  font-weight: 600;
  cursor: pointer;
}
.am-card-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.am-card-opt small { display: block; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); }
.am-card-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.am-card-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.am-card-opt__shape { flex: none; border: 1.5px solid currentColor; border-radius: 2px; }
.am-card-opt__shape.is-a3 { width: 34px; height: 24px; }
.am-card-opt__shape.is-a4 { width: 26px; height: 18px; margin: 0 4px; }
.am-exlist { display: grid; gap: 0; max-height: 196px; margin: 0; padding: 4px 12px; overflow: auto; list-style: none; border: 1px solid var(--line); border-radius: var(--r-lg); }
.am-exlist .am-check { min-height: 34px; font-weight: 500; }
.am-exlist__no { font-family: var(--tech); font-size: 13px; font-weight: 600; }
.am-exlist__title { color: var(--muted); }
.am-filename { display: block; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--surface-2); font-family: var(--tech); font-size: 13px; line-height: 18px; word-break: break-all; }
.am-progress { padding: 28px 4px 12px; }
.am-progress__text { margin-bottom: 12px; font-weight: 600; }
.am-progress__bar { height: 8px; overflow: hidden; border-radius: 4px; background: #E0E6EA; }
.am-progress__bar i { display: block; width: 0; height: 100%; background: var(--primary); transition: width 0.25s; }
.am-exdone { padding-top: 12px; text-align: center; }
.am-exdone__title { margin-top: 8px; font-size: 16px; font-weight: 700; }
.am-exdone__file { margin-top: 4px; font-family: var(--tech); font-size: 13px; color: var(--muted); word-break: break-all; }
.am-exdone .am-dialog__foot { justify-content: center; }

/* ── 디자인 가이드 ─────────────────────────── */
.am-guide__toc {
  position: sticky;
  top: 56px;
  z-index: 5;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 -4px 24px;
  padding: 10px 4px;
  background: var(--bg);
}
.am-guide__toc a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.am-guide__toc a:hover { border-color: var(--text); }
.am-gsec { margin-bottom: 40px; scroll-margin-top: 120px; }
.am-gsec > .am-h2 { margin-bottom: 4px; }
.am-gsec__lead { max-width: 70ch; margin-bottom: 16px; color: var(--muted); }
.am-gsec > .am-h2 + .am-swatches, .am-gsec > .am-h2 + .am-fonts, .am-gsec > .am-h2 + .am-parts { margin-top: 16px; }
.am-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.am-swatch { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.am-swatch__chip { display: block; width: 100%; height: 72px; padding: 0; border: 0; border-bottom: 1px solid var(--line); cursor: copy; }
.am-swatch__meta { padding: 12px 14px 14px; }
.am-swatch__name { font-weight: 600; }
.am-swatch__token { font-family: var(--tech); font-size: 12.5px; color: var(--muted); }
.am-swatch__token span { color: var(--text); }
.am-swatch__note { margin-top: 4px; font-size: 12px; line-height: 18px; color: var(--muted); }
.am-table--badges, .am-table--type { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.am-hex { display: inline-flex; align-items: center; gap: 8px; font-family: var(--tech); font-size: 13px; }
.am-hex i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(15, 27, 39, 0.14); }
.am-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.am-font { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.am-font__sample { font-size: 34px; line-height: 42px; font-weight: 700; letter-spacing: -0.01em; }
.am-font--tech .am-font__sample { font-family: var(--tech); font-weight: 600; letter-spacing: 0; }
.am-font__name { margin-top: 8px; font-weight: 600; }
.am-font__use { font-size: 13px; line-height: 20px; color: var(--muted); }
.am-table--type tbody th { font-size: 13px; font-weight: 600; white-space: nowrap; }
.am-type__sample.is-tech { font-family: var(--tech); }
.am-parts { display: grid; gap: 12px; }
.am-part { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.am-part .am-h3 { margin-bottom: 12px; }
.am-part__row { display: flex; gap: 8px; flex-wrap: wrap; }
.am-part__row--inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 560px; }
.am-part__note { margin-top: 10px; font-size: 12px; line-height: 18px; color: var(--muted); }
.am-table--demo { border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; border-radius: var(--r-lg); overflow: hidden; }
.am-statecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.am-statecard { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.am-statecard__label { padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); }
.am-grids { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.am-gridfig { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.am-gridfig__frame { display: flex; aspect-ratio: 16 / 9; border: 1px solid var(--text); background: #F7F9FA; }
.am-gridfig:nth-child(2) .am-gridfig__frame { aspect-ratio: 16 / 10; }
.am-gridfig__rail { flex: none; width: var(--railw); background: var(--rail); }
.am-gridfig__cols { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.6%; padding: 9% 2.6% 0; background: linear-gradient(#fff, #fff) top / 100% 6% no-repeat; box-shadow: inset 0 1px 0 transparent; }
.am-gridfig__cols i { background: rgba(226, 86, 14, 0.12); border-left: 1px solid rgba(226, 86, 14, 0.4); border-right: 1px solid rgba(226, 86, 14, 0.4); }
.am-gridfig figcaption { margin-top: 12px; }
.am-gridfig strong { display: block; font-family: var(--tech); font-size: 16px; }
.am-gridfig figcaption span { font-size: 12.5px; color: var(--muted); }

@keyframes am-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes am-stripe { to { background-position: 100% 100%; } }
@keyframes am-spin { to { transform: rotate(360deg); } }

/* ── 넓은 화면 (1920 기준) ─────────────────────────── */
@media (min-width: 1680px) {
  .am-shell { --rail-w: 248px; }
  .am-content { padding: 32px 36px 104px; }
  .am-top { padding: 0 36px; }
}

/* ── 중간 폭 ─────────────────────────── */
@media (max-width: 1240px) {
  .am-mapgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .am-split { grid-template-columns: minmax(0, 1fr); }
  .am-raw { position: static; }
  .am-statecards { grid-template-columns: minmax(0, 1fr); }
}

/* ── 모바일 ─────────────────────────── */
@media (max-width: 900px) {
  .am-shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .am-rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 16px 6px; }
  .am-brand { margin: 0; padding: 0; border: 0; }
  .am-brand__mark { width: 26px; height: 26px; }
  .am-nav { flex-direction: row; width: calc(100% + 32px); margin: 0 -16px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .am-nav__item { height: 44px; padding: 0 10px; flex: none; font-size: 13.5px; }
  .am-nav__item svg { display: none; }
  .am-nav__item.is-active { box-shadow: inset 0 -3px 0 var(--primary-mid); background: transparent; border-radius: 0; }
  .am-rail__foot { display: none; }
  .am-top { position: static; height: 48px; padding: 0 16px; }
  .am-crumb__mid, .am-crumb__mid + .am-crumb__sep { display: none; }
  .am-content { padding: 20px 16px 104px; }
  .am-guide__toc { top: 0; }
}

@media (max-width: 760px) {
  .am-h1 { font-size: 22px; line-height: 30px; }
  .am-page__actions { width: 100%; }
  .am-page__actions .am-btn { flex: 1; }
  .am-btn { min-height: 44px; }
  .am-btn--sm, .am-btn--xs { min-height: 36px; }
  .am-search { width: 100%; }
  .am-flow li + li::before { width: 14px; margin: 0 6px; }

  .am-table--projects thead { display: none; }
  .am-table--projects tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .am-table--projects tbody tr:last-child { border-bottom: 0; }
  .am-table--projects td, .am-table--projects td.is-num { padding: 0; border: 0; text-align: left; }
  .am-table--projects .am-prow__name { grid-column: 1 / -1; }
  .am-table--projects td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; line-height: 16px; color: var(--faint); font-weight: 500; }

  .am-panel__head { padding: 14px 16px; flex-wrap: wrap; }
  .am-table--parsed thead { display: none; }
  .am-table--parsed tr.am-pr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "f s" "v v"; gap: 4px 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .am-table--parsed tr.am-pr > * { padding: 0; border: 0; box-shadow: none; }
  .am-table--parsed tr.am-pr--danger, .am-table--parsed tr.am-pr--warn, .am-table--parsed tr.am-pr.is-hit { box-shadow: inset 3px 0 0 var(--danger); }
  .am-table--parsed tr.am-pr--warn { box-shadow: inset 3px 0 0 var(--warn-line); }
  .am-table--parsed tr.am-pr.is-hit { box-shadow: inset 3px 0 0 var(--accent); }
  .am-table--parsed .am-pr__field { grid-area: f; width: auto; }
  .am-table--parsed .am-pr__state { grid-area: s; width: auto; }
  .am-table--parsed .am-pr__value { grid-area: v; }
  .am-table--parsed .am-pr__line { display: none; }

  .am-issue { grid-template-columns: auto minmax(0, 1fr); }
  .am-issue > :last-child { grid-column: 2; justify-self: start; }

  .am-dialog { width: 100%; max-width: none; max-height: 90vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .am-dialog__body { padding: 18px 16px 20px; }
  .am-dialog__foot .am-btn { flex: 1; }
  .am-form__grid, .am-cards, .am-part__row--inputs, .am-fonts, .am-grids { grid-template-columns: minmax(0, 1fr); }
  .am-map__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }

  .am-seg--full { margin: 12px 16px 0; }
  .am-specs { grid-template-columns: 1fr 1fr; padding: 14px 16px; }
  .am-table--map th, .am-table--map td { padding: 8px 12px; }
  .am-table--map thead th:nth-child(2), .am-table--map .am-map-val { display: none; }
  .am-hint { padding: 12px 16px 16px; }
  .am-drawing { padding: 8px; }

  .am-thumbs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .am-thumb__paper { padding: 8px; }
  .am-thumb[data-tone="info"] .am-thumb__paper::after { inset: 8px; }
  .am-thumb__meta { padding: 10px 10px 12px; }
  .am-thumb__row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .am-history__item { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; }
  .am-history__item > :last-child { grid-column: 2; justify-self: start; }
  .am-settings__row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; }
  .am-settings dt { grid-column: 1 / -1; }
  .am-table--badges thead, .am-table--type thead { display: none; }
  .am-table--badges tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .am-table--badges td, .am-table--badges td.is-num { padding: 0; border: 0; text-align: left; }
  .am-table--badges td:first-child { grid-column: 1 / -1; }
  .am-table--badges td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--faint); }
  .am-table--type th, .am-table--type td { padding: 10px 12px; }
  .am-table--type td:nth-child(3) { display: none; }
  .am-toast { bottom: 76px; }
  .am-fab { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .am *, .am *::before, .am *::after { animation: none !important; transition: none !important; }
}
