.tm-size-dialog { width: min(900px,calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 0; background: var(--m-paper,#fffcf7); color: var(--m-ink); overflow: auto; overscroll-behavior: contain; font-family: var(--m-sans); }
.tm-size-dialog::backdrop { background: rgba(16,47,45,.48); }
.tm-size-shell { padding: 24px 30px; position: relative; }
.tm-size-dialog h2 { margin: 0 40px 14px 0; font: 400 28px/1.25 var(--m-sans); letter-spacing: -.02em; text-transform: none; }
.tm-size-close { position: absolute; right: 12px; top: 10px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--m-ink); font-size: 28px; cursor: pointer; }
.tm-size-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.tm-size-subtitle { font: 400 12px/1.5 var(--m-sans); color: var(--m-label); }
.tm-size-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 16px; }
.tm-size-footer .tm-size-note { margin: 0; }
.tm-size-footer .tm-size-full { flex-shrink: 0; margin-left: auto; }
.tm-size-toolbar label { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--m-label); }
.tm-size-chart { border: 1px solid var(--m-hairline); background: transparent; padding: 8px; font: 400 14px var(--m-sans); color: var(--m-ink); }
.tm-size-units { display: flex; flex-shrink: 0; gap: 12px; }
.tm-size-units button { border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--m-label); padding: 8px 0; font: 500 12px var(--m-sans); text-transform: uppercase; cursor: pointer; }
.tm-size-units button[aria-pressed=true] { color: var(--tm-teal); border-bottom-color: currentColor; }
.tm-size-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 24px; }
.tm-size-figure { margin: 0; }
.tm-size-sketch { display: block; width: 100%; height: 230px; mix-blend-mode: multiply; }
.tm-size-outline { stroke: #6d7c73; stroke-width: 1; fill: #f8f7f1; }
.tm-size-detail { stroke: #7c877f; stroke-width: .8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tm-size-collar { stroke: #6d7c73; stroke-width: 1; fill: #f0f1e9; stroke-linejoin: round; }
.tm-size-stitch { stroke: #a8afa5; stroke-width: .6; stroke-dasharray: 1.5 2; fill: none; }
.tm-size-button { stroke: #7c877f; stroke-width: .7; fill: #fffcf7; }
.tm-size-measure { stroke: #95b3a5; stroke-width: 1; stroke-dasharray: 4 3; opacity: .5; }
.tm-size-measure.is-active { stroke: var(--tm-teal); stroke-width: 2; stroke-dasharray: none; opacity: 1; }
.tm-size-help { font: 400 12px/1.65 var(--m-sans); color: var(--m-label); text-align: center; margin-top: 12px; min-height: 65px; }
.tm-size-tablewrap { overflow-x: auto; }
.tm-size-table { width: 100%; border-collapse: collapse; min-width: 520px; table-layout: fixed; }
.tm-size-table th,.tm-size-table td { padding: 11px 10px; border: 0; border-bottom: 1px solid var(--m-hairline); text-align: center; font: 400 14px/1.5 var(--m-sans); white-space: nowrap; }
.tm-size-table th:first-child { width: 56px; text-align: left; font-weight: 500; }
.tm-size-table th,.tm-size-table td { padding-inline: 8px; }
.tm-size-table th,.tm-size-table td { vertical-align: middle; height: 44px; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.tm-size-table thead th { height: 52px; }
.tm-size-table thead th { border-bottom: 1px solid var(--m-ink); padding-top: 0; }
.tm-size-table thead th:first-child,.tm-size-table thead button { font: 500 10px/1.5 var(--m-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--m-label); }
.tm-size-table thead button { padding: 8px 0; border: 0; background: transparent; white-space: normal; cursor: pointer; }
.tm-size-table .is-active { background: var(--m-panel); }
.tm-size-table th.is-active button { color: var(--tm-teal); }
.tm-size-note { font: 400 12px/1.65 var(--m-sans); margin: 16px 0; color: var(--m-label); }
.tm-size-full { font: 500 12px/1.5 var(--m-sans); color: var(--tm-teal); text-decoration: underline; text-underline-offset: 4px; }
.tm-size-dialog [hidden] { display: none !important; }
.tm-size-dialog :focus-visible { outline: 2px solid var(--tm-teal); outline-offset: 3px; }
body.tm-size-open { overflow: hidden; }
@media(max-width: 767px) {
 .tm-size-footer { flex-wrap: wrap; }
 .tm-size-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); }
 .tm-size-shell { padding: 24px 18px; }
 .tm-size-dialog h2 { font-size: 24px; }
 .tm-size-toolbar { align-items: flex-end; gap: 12px; }
 .tm-size-toolbar label { display: grid; gap: 8px; }
 .tm-size-layout { grid-template-columns: 1fr; gap: 20px; }
 .tm-size-figure { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 20px; }
 .tm-size-sketch { height: 140px; }
 .tm-size-help { text-align: left; min-height: 0; margin: 0; }
}
