.cut-mark-guide {
  min-width: 0;
  margin-block: 12px;
  color: var(--ink);
  line-height: 1.4;
  container-type: inline-size;
}
.cut-mark-guide .cm-title { margin: 0 0 5px; font: 650 18px/1.3 var(--body); }
.cut-mark-guide p { margin: 6px 0; }
.cut-mark-guide .cm-orientation, .cut-mark-guide .cm-note { font-size: 15px; }
.cut-mark-guide .cm-cut-title, .cut-mark-guide summary { margin: 8px 0; font: 650 15px/1.35 var(--body); }
.cut-mark-guide summary { min-height: 44px; cursor: pointer; align-content: center; }
.cm-cut + .cm-cut, .cm-more { border-top: 1px solid var(--line); }
.cm-more .cm-cut { margin-left: 10px; }
.cm-faces { display: grid; gap: 12px; }
.cm-face { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 9px; padding: 11px; }
.cm-face h5 { margin: 0; font: 650 16px/1.25 var(--body); }
.cm-face .cm-reference, .cm-face .cm-axes, .cm-face .cm-keep, .cm-face > p { font: 400 14px/1.4 var(--body); }
.cm-reference b, .cm-axes b { color: #3f5f52; }
.cm-keep b { color: #315c40; }
.cut-mark-guide .cm-plan { display: block; width: 100%; max-width: 490px; height: auto; max-height: 214px; margin: 4px auto; }
.cut-mark-guide .cm-plan-labeled { max-height: 282px; }
.cm-mark-dimension { text-anchor: middle; fill: var(--ink); font: 600 13px var(--mono); }
.cm-dim-line, .cm-dim-extension { fill: none; stroke: #647366; stroke-width: 1; }
.cm-dim-extension { stroke-dasharray: 2 2; opacity: .75; }
.cm-region { text-anchor: middle; font: 700 13px var(--mono); }
.cm-kept { fill: #3d4d35; }
.cm-waste-label { fill: #465251; font: 600 12px var(--body); }
.cm-region-leader { fill: none; stroke: #5c6660; stroke-width: 1; }
.cm-angle { fill: #783416; font: 700 12px var(--body); stroke: #fffaf0; stroke-width: 3px; stroke-linejoin: round; paint-order: stroke fill; }
.cm-square-ref { fill: none; stroke: #7c5c48; stroke-width: 1; stroke-dasharray: 2 2; }
.cm-angle-arc { fill: none; stroke: #934522; stroke-width: 1.4; }
.cm-hook-label { fill: #346252; text-anchor: end; font: 600 11px var(--body); }
.cm-stock { fill: #e8d6b2; stroke: #927652; stroke-width: 1.1; }
.cm-scrap, .cm-stock.cm-profile-blank { fill: #bdc5c3; }
.cm-outline { fill: #e8d6b2; stroke: #927652; stroke-width: 1; }
.cm-trace { fill: none; stroke: #983e1a; stroke-width: 2.8; }
@media (prefers-reduced-motion: no-preference) {
  .cm-trace { stroke-dasharray: 1; animation: cm-pencil .9s ease-out both; }
  .cm-line { opacity: .42; }
  @keyframes cm-pencil { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}
.cm-key { display: flex; flex-wrap: wrap; gap: 5px 16px; align-items: center; margin: 4px 0 9px; color: #465449; font: 600 14px/1.3 var(--body); }
.cm-key span::before { content: ''; display: inline-block; margin-right: 5px; width: .95em; height: .7em; border: 1px solid #927652; border-radius: 2px; }
.cm-key-keep::before { background: #e8d6b2; }
.cm-key .cm-key-waste::before { background: #bdc5c3; border-color: #7e8c87; }
.cm-field-transfer { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 8px 0; font: 400 15px/1.42 var(--body); }
.cm-field-transfer dt { color: #365844; font-weight: 650; }
.cm-field-transfer dd { margin: 0; }
.sawcard > .group-cut-marks { grid-column: 1 / -1; min-width: 0; }
.group-mark-select { display: block; width: 100%; min-height: 44px; margin: 5px 0 8px; padding: 7px 9px; border: 1px solid #bbc5ba; border-radius: 7px; background: var(--white); color: var(--ink); font: 600 15px/1.3 var(--body); }
.cm-break { stroke: #fffdf8; stroke-width: 3; fill: none; }
.cm-line { fill: none; stroke: #934522; stroke-width: 2.6; }
.cm-point { fill: #fff9ec; stroke: #924023; stroke-width: 2.3; }
.cm-leader { stroke: #5d5852; fill: none; stroke-width: 1.2; }
.cm-tag { fill: #8a442b; }
.cm-letter { fill: white; text-anchor: middle; font: 650 13px var(--mono); }
.cm-hook { fill: none; stroke: #346252; stroke-width: 3.4; stroke-linecap: round; }
.cm-axis { fill: none; stroke: #5f6f62; stroke-width: 1.5; }
.cm-axis-name, .cm-zero { fill: #3b5546; font: 650 13px var(--mono); }
.cm-face .cm-coordinates { width: 100%; border-collapse: collapse; font: 600 15px/1.35 var(--mono); }
.cm-coordinates th, .cm-coordinates td { padding: 5px 6px; border: 0; border-bottom: 1px solid #e3e3d9; text-align: left; vertical-align: top; }
.cm-coordinates thead th { color: #46564b; background: #edf1e9; font: 600 14px/1.4 var(--body); }
.cm-coordinates th[scope=row] { color: #8a442b; font-weight: 650; }
.cm-coordinates small { display: inline-block; margin-left: .5em; color: #565f57; font: 500 12px/1.3 var(--mono); }
.cm-face .cm-axes { margin-block: 8px; }
@container (min-width: 680px) {
  .cm-faces:has(.cm-face:nth-child(2)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.cut-mark-guide .cm-cut-list { display: grid; gap: 14px; }
.cut-mark-guide .cm-listed-cut { min-width: 0; container-type: inline-size; }
.cut-mark-guide .cm-listed-cut > .cm-cut-title { margin: 2px 0 6px; }
.cut-mark-guide .cm-listed-cut .piece-saw-info > summary { min-height: 32px; margin: 0; padding: 5px 0; }
@container (min-width: 630px) {
  .cut-mark-guide .cm-cut-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 900px) {
  .cm-cut-list:has(> :first-child .cm-face:only-child):has(> :nth-child(2):last-child .cm-face + .cm-face) { grid-template-columns: 1fr 2fr; }
  .cm-cut-list:has(> :first-child .cm-face + .cm-face):has(> :nth-child(2):last-child .cm-face:only-child) { grid-template-columns: 2fr 1fr; }
}
@container (min-width: 575px) {
  .cm-listed-cut .cm-faces:has(.cm-face + .cm-face) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.piece-saw-info > summary { width: fit-content; padding: 8px 0; cursor: pointer; color: #365747; font: 600 15px/1.35 var(--body); }
.piece-saw-info .cut-saw-mockup { display: block; width: 100%; height: clamp(195px, 24vw, 270px); background: #f5f5ef; border: 1px solid var(--line); border-radius: 9px; }
#cutCards .sawcard:has(.cm-plan) { grid-column: 1 / -1; }
#cutCards .sawcard { grid-template-columns: minmax(0,1fr); }
.group-mark-select select { margin-inline-start: 8px; max-width: 100%; font: inherit; }
@media (min-width: 720px) and (max-height: 850px) {
  .cut-mark-guide .cm-listed-cut .cm-face { padding: 8px; }
  .cut-mark-guide .cm-listed-cut .cm-plan { max-height: clamp(100px, 17dvh, 144px); margin-block: 2px; }
  .cut-mark-guide .cm-listed-cut .cm-faces { gap: 7px; }
}
@media print {
  .cm-face { break-inside: avoid; }
  .cm-plan { print-color-adjust: exact; }
}
