.measure-page {
  --measure-bg: #0b0f1a;
  --measure-panel: rgba(18, 24, 38, .93);
  --measure-control: #1b2434;
  --measure-border: #2a3548;
  --measure-text: #e7edf6;
  --measure-muted: #94a2b8;
  --measure-accent: #f49a52;
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--measure-bg);
  color: var(--measure-text);
  color-scheme: dark;
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.measure-page *, .measure-page *::before, .measure-page *::after { box-sizing: border-box; }
.measure-page [hidden] { display: none !important; }
.measure-page button, .measure-page input, .measure-page select { font: inherit; }
.measure-page button, .measure-page label, .measure-page summary { -webkit-tap-highlight-color: transparent; }
.measure-page button, .measure-page summary, .measure-page label[for] { cursor: pointer; }
.measure-page button:disabled, .measure-page input:disabled, .measure-page select:disabled { cursor: not-allowed; opacity: .35; }
.measure-page :is(button, input, select, summary, canvas):focus-visible { outline: 2px solid var(--measure-accent); outline-offset: 3px; }
.measure-page .measure-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
.measure-page .measure-stage, .measure-page .measure-viewport { position: absolute; inset: 0; width: 100%; height: 100%; }
.measure-page .measure-viewport > canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.measure-page .measure-stage.is-dragging::after, .measure-page.is-dragging .measure-stage::after { content: ""; position: absolute; inset: 10px; border: 2px dashed var(--measure-accent); border-radius: 14px; background: #f49a5209; pointer-events: none; }
.measure-page .measure-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #283346; pointer-events: none; }
.measure-page .measure-toolbar { position: absolute; z-index: 5; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; gap: 12px 20px; min-width: 0; padding: 10px 12px; border: 1px solid var(--measure-border); border-radius: 14px; background: var(--measure-panel); box-shadow: 0 6px 24px #0003; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.measure-page .measure-file-row { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.measure-page .measure-file-panel { display: flex; flex: 1; min-width: 0; }
.measure-page .measure-file-group { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.measure-page .measure-upload { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; padding: 10px 13px; min-height: 38px; margin: 0; border: 1px solid #f1f5fb; border-radius: 7px; background: #f1f5fb; color: #162133; font-size: 12px; font-weight: 650; line-height: 1.2; cursor: pointer; white-space: nowrap; }
.measure-page .measure-upload:hover { background: #fff; border-color: #fff; color: #0b0f1a; }
.measure-page .measure-upload[aria-disabled="true"] { pointer-events: none; opacity: .58; }
.measure-page #fileInput:focus-visible + .measure-upload { outline: 2px solid var(--measure-accent); outline-offset: 3px; }
.measure-page .measure-file-name { max-width: 350px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--measure-muted); font-size: 12px; }
.measure-page .measure-toolbar-controls { display: flex; align-items: center; flex-shrink: 0; gap: 7px; }
.measure-page .measure-button-group { display: inline-flex; align-items: center; gap: 3px; }
.measure-page .measure-button-group + .measure-button-group { margin-left: 5px; }
.measure-page .measure-button, .measure-page .measure-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 7px 9px; border: 1px solid var(--measure-border); border-radius: 7px; background: var(--measure-control); color: var(--measure-text); font-size: 12px; line-height: 1; white-space: nowrap; text-decoration: none; }
.measure-page .measure-axis { min-width: 31px; font-size: 11px; font-weight: 650; }
.measure-page .measure-icon { width: 34px; padding: 0; flex-shrink: 0; }
.measure-page .measure-button[aria-pressed="true"], .measure-page .measure-toggle:has(input:checked) { color: #ffb575; border-color: #906441; background: #392b26; }
.measure-page .measure-button:hover:not(:disabled), .measure-page .measure-toggle:hover:not(:has(input:disabled)) { border-color: #63738c; background: #263348; }
.measure-page .measure-toggle { margin: 0; padding: 7px 8px; cursor: pointer; }
.measure-page .measure-toggle:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.measure-page .measure-toggle input { margin: 0; width: 12px; height: 12px; accent-color: var(--measure-accent); cursor: inherit; }
.measure-page .measure-settings { position: relative; }
.measure-page .measure-settings summary { list-style: none; }
.measure-page .measure-settings summary::-webkit-details-marker { display: none; }
.measure-page .measure-settings-popover { position: absolute; top: 43px; right: 0; display: flex; align-items: center; gap: 12px; width: max-content; padding: 13px; border: 1px solid var(--measure-border); border-radius: 9px; background: #121826; box-shadow: 0 8px 30px #0004; font-size: 11px; }
.measure-page .measure-settings-popover select { min-width: 70px; padding: 5px 6px; border: 1px solid var(--measure-border); border-radius: 5px; background: var(--measure-control); color: var(--measure-text); }
.measure-page .measure-status { position: absolute; z-index: 10; top: 92px; left: 50%; transform: translateX(-50%); max-width: min(600px, calc(100% - 36px)); padding: 10px 16px; border: 1px solid #40536c; border-radius: 9px; background: #172235ed; color: #dce8f4; box-shadow: 0 6px 24px #0004; font-size: 12px; text-align: center; }
.measure-page .measure-status[data-kind="error"], .measure-page .measure-status.is-error { border-color: #a35146; background: #3a2328f2; color: #ffd1c6; }
.measure-page .measure-slice-controls { position: absolute; z-index: 3; top: 100px; bottom: 98px; right: 20px; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 30px; padding: 6px 3px; border: 1px solid var(--measure-border); border-radius: 10px; background: var(--measure-panel); box-shadow: 0 6px 24px #0002; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.measure-page .measure-cut-picker { display: flex; gap: 4px; }
.measure-page .measure-cut-picker .measure-button { width: 25px; min-height: 24px; padding: 2px 3px; font-size: 15px; }
.measure-page .measure-cut-input { display: flex; align-items: center; gap: 2px; width: 100%; padding: 3px; border: 1px solid #354257; border-radius: 5px; background: #101727; color: #b6c3d3; }
.measure-page .measure-cut-input > span { flex-shrink: 0; font-size: 9px; }
.measure-page .measure-cut-input input { min-width: 0; width: 100%; padding: 2px 0; border: 0; background: transparent; color: #eef4fa; font-size: 10px; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.measure-page .measure-cut-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.measure-page .measure-range-end { color: #6f8099; font-size: 9px; max-width: 100%; line-height: 1.3; overflow-wrap: anywhere; text-align: center; font-variant-numeric: tabular-nums; }
.measure-page .measure-slice-track { position: relative; width: 100%; flex: 1 1 auto; min-height: 60px; margin: 3px 0; touch-action: none; }
.measure-page .measure-slice-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; border-radius: 4px; background: #334158; transform: translateX(-50%); }
.measure-page .measure-slice-selection { position: absolute; left: 50%; bottom: 0; width: 3px; height: 100%; transform: translateX(-50%); border-radius: 4px; background: var(--measure-accent); pointer-events: none; }
.measure-page .measure-slice-handle { position: absolute; z-index: 2; left: 50%; transform: translate(-50%, 50%); width: 23px; height: 23px; padding: 0; border: 3px solid #ffe3c5; border-radius: 50%; background: #f49a52; box-shadow: 0 2px 8px #0007; cursor: ns-resize; touch-action: none; }
.measure-page .measure-slice-handle::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
.measure-page .measure-slice-handle-upper { bottom: 100%; }
.measure-page .measure-slice-handle-lower { bottom: 0; }
.measure-page .measure-slice-handle[aria-current="true"], .measure-page .measure-slice-handle.is-active, .measure-page .measure-slice-handle[data-active="true"] { z-index: 3; box-shadow: 0 0 0 5px #f49a5229, 0 2px 8px #0007; }
.measure-page .measure-handle-value { position: absolute; right: -2px; top: 50%; transform: translateY(-50%); max-width: 100px; min-width: 32px; padding: 3px 5px; border: 1px solid #79573e; border-radius: 5px; background: #231f21; color: #ffcb9f; font-size: 10px; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.measure-page .measure-slice-handle-upper .measure-handle-value { transform: translateY(-115%); }
.measure-page .measure-slice-handle-lower .measure-handle-value { transform: translateY(15%); }
.measure-page .measure-scene-value { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; padding: 4px 7px; border: 1px solid #a8744c; border-radius: 5px; background: #171b23f2; color: #ffc390; font: 600 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 2px 8px #0005; }
.measure-page .measure-section-panel { position: absolute; z-index: 3; top: 100px; left: 16px; bottom: 80px; display: flex; flex-direction: column; width: min(480px, calc(100% - 90px)); max-height: 600px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; border: 1px solid #3b4b63; border-radius: 13px; background: #111927f5; box-shadow: 0 8px 30px #0005; text-align: left; }
.measure-page .measure-section-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--measure-border); }
.measure-page .measure-section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; min-width: 0; }
.measure-page .measure-section-title h2 { margin: 0; color: var(--measure-text); font: 650 14px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.measure-page #sectionCaption { color: var(--measure-muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.measure-page .measure-section-zoom { display: flex; flex: 0 0 auto; gap: 4px; }
.measure-page .measure-section-zoom .measure-icon { width: 32px; min-height: 32px; height: 32px; font-size: 19px; }
.measure-page .measure-section-zoom svg { width: 16px; height: 16px; }
.measure-page .measure-line-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(105px, .62fr) 32px; flex: 0 0 auto; align-items: end; gap: 8px; padding: 9px 12px 7px; }
.measure-page .measure-line-editor label { display: grid; gap: 5px; min-width: 0; margin: 0; color: var(--measure-muted); font-size: 11px; line-height: 1.2; }
.measure-page .measure-line-editor :is(input, select) { width: 100%; min-width: 0; height: 34px; padding: 5px 8px; border: 1px solid #35445a; border-radius: 6px; background: #1b2637; color: var(--measure-text); font-size: 12px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.measure-page .measure-line-position[data-direction="h"] input, .measure-page #activeLine[data-direction="h"] { border-color: #805b3e; }
.measure-page .measure-line-position[data-direction="v"] input, .measure-page #activeLine[data-direction="v"] { border-color: #367581; }
.measure-page .measure-line-position[data-direction="h"] input:focus { border-color: var(--measure-accent); }
.measure-page .measure-line-position[data-direction="v"] input:focus { border-color: #67dce9; }
.measure-page .measure-line-remove { width: 32px; min-height: 34px; height: 34px; color: var(--measure-muted); }
.measure-page .measure-line-remove:hover:not(:disabled) { color: #ffb5a8; border-color: #a96960; background: #3d292c; }
.measure-page .measure-line-remove svg { width: 17px; height: 17px; }
.measure-page .measure-line-additions { display: flex; flex: 0 0 auto; gap: 7px; padding: 0 12px 9px; border-bottom: 1px solid var(--measure-border); }
.measure-page .measure-add-line { flex: 1 1 0; min-width: 0; min-height: 32px; padding: 5px 7px; font-size: 11px; font-weight: 500; }
.measure-page .measure-add-line > span { font-size: 18px; line-height: 1; }
.measure-page .measure-add-line[data-direction="h"] { color: #ffb575; border-color: #694c37; background: #302720; }
.measure-page .measure-add-line[data-direction="h"]:hover:not(:disabled) { border-color: #cf8a52; background: #493326; }
.measure-page .measure-add-line[data-direction="v"] { color: #67dce9; border-color: #285e68; background: #142f3a; }
.measure-page .measure-add-line[data-direction="v"]:hover:not(:disabled) { border-color: #47b5c4; background: #1c404b; }
/* The site enhances all selects, but this list is rebuilt by the measuring tool.
   Keep its native control visible instead of the plugin's stale option copy. */
.measure-page #activeLine { display: inline-block !important; }
.measure-page #activeLine + .nice-select { display: none !important; }
.measure-page .measure-section-canvas-wrap { position: relative; flex: 1 1 260px; min-height: 100px; width: 100%; overflow: hidden; background: #0d1522; }
.measure-page #sectionCanvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.measure-page .measure-section-hint { flex: 0 0 auto; margin: 0; padding: 5px 12px 7px; background: #0d1522; color: #8495aa; font-size: 10px; line-height: 1.3; text-align: center; }
.measure-page .measure-section-results { display: flex; flex: 0 0 auto; flex-direction: column; min-height: 72px; max-height: 153px; border-top: 1px solid var(--measure-border); }
.measure-page .measure-section-results h3 { flex: 0 0 auto; margin: 0; padding: 9px 12px 5px; color: #c5d0df; font: 600 11px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.measure-page .measure-line-summary { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-height: 36px; max-height: 120px; overflow: auto; padding: 0 8px 8px; color: #bbc8d8; font-size: 11px; line-height: 1.4; scrollbar-width: thin; }
.measure-page .measure-summary-row { --line-color: #ffb575; --line-border: #725039; --line-bg: #302720; --line-selected: #443021; display: grid; grid-template-columns: 138px minmax(0, 1fr); align-items: start; gap: 6px; min-width: 0; padding: 4px; border: 1px solid transparent; border-radius: 7px; }
.measure-page .measure-summary-row[data-direction="v"] { --line-color: #67dce9; --line-border: #2e6a76; --line-bg: #142f3a; --line-selected: #193d48; }
.measure-page .measure-summary-row[data-selected="true"] { border-color: var(--line-border); background: var(--line-bg); }
.measure-page .measure-summary-select { display: inline-flex; align-items: center; justify-content: flex-start; min-height: 30px; min-width: 0; padding: 5px 4px; border: 0; border-radius: 4px; background: transparent; color: var(--line-color); font-size: 11px; line-height: 1.2; text-align: left; cursor: pointer; }
.measure-page .measure-summary-select:hover { background: var(--line-selected); }
.measure-page .measure-summary-values { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.measure-page .measure-value { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 7px; border: 1px solid var(--line-border); border-radius: 5px; background: var(--line-bg); color: var(--line-color); font: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.measure-page .measure-value:hover:not(:disabled) { background: var(--line-selected); }
.measure-page .measure-value[aria-pressed="true"] { border-color: var(--line-color); background: var(--line-selected); color: #fff; box-shadow: inset 0 0 0 1px var(--line-border); }
.measure-page .measure-summary-empty { align-self: center; padding: 5px 2px; color: var(--measure-muted); font-size: 11px; line-height: 1.4; }
.measure-page .measure-rotation-panel { position: absolute; z-index: 4; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); overflow: hidden; border: 1px solid var(--measure-border); border-radius: 11px; background: var(--measure-panel); box-shadow: 0 6px 24px #0003; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.measure-page .measure-rotation-control { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; }
.measure-page .measure-rotation-axis { flex: 0 0 12px; color: var(--measure-muted); font-size: 10px; font-weight: 650; text-align: center; }
.measure-page #rotationRange { flex: 1 1 0; min-width: 35px; width: 100%; height: 24px; margin: 0; padding: 0; accent-color: var(--measure-accent); cursor: ew-resize; }
.measure-page #rotationRange:disabled { cursor: not-allowed; }
.measure-page #rotationValue { flex: 0 0 45px; color: #f5b583; font-size: 11px; line-height: 1.2; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.measure-page .measure-rotation-control .measure-icon { flex: 0 0 27px; width: 27px; height: 27px; min-height: 27px; border-radius: 5px; font-size: 18px; }
.measure-page .measure-dimensions { display: block; max-width: 220px; padding: 0; overflow: hidden; color: #8e9fb5; font-size: 10px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; text-align: left; pointer-events: none; }
.measure-page .measure-file-row .measure-dimensions { flex: 0 1 auto; margin-left: auto; }
@media (max-width: 850px) {
  .measure-page .measure-toolbar { gap: 8px; padding: 9px; }
  .measure-page .measure-file-group { gap: 8px; }
  .measure-page .measure-toolbar-controls { gap: 4px; }
  .measure-page .measure-file-name { max-width: 150px; }
  .measure-page .measure-button-group + .measure-button-group { margin-left: 1px; }
}
@media (max-width: 690px) {
  .measure-page .measure-toolbar { top: 10px; left: 10px; right: 10px; flex-wrap: wrap; border-radius: 12px; }
  .measure-page .measure-file-row { flex: 1 0 100%; }
  .measure-page .measure-file-name { flex: 1; max-width: none; }
  .measure-page .measure-upload { min-height: 34px; padding: 8px 11px; }
  .measure-page .measure-toolbar-controls { width: 100%; justify-content: space-between; }
  .measure-page .measure-button-group { gap: 2px; }
  .measure-page .measure-button, .measure-page .measure-toggle { min-height: 31px; }
  .measure-page .measure-icon { width: 30px; }
  .measure-page .measure-axis { min-width: 28px; padding: 6px; }
  .measure-page .measure-toggle { padding: 6px; gap: 3px; }
  .measure-page .measure-status { top: 114px; font-size: 11px; }
  .measure-page .measure-slice-controls { top: 130px; bottom: 88px; right: 10px; width: 30px; padding: 7px 2px; gap: 6px; }
  .measure-page .measure-cut-picker .measure-button { width: 24px; min-height: 26px; }
  .measure-page .measure-cut-input { padding: 3px; gap: 2px; }
  .measure-page .measure-cut-input input { font-size: 10px; }
  .measure-page .measure-cut-input > span { font-size: 8px; }
  .measure-page .measure-handle-value { right: 25px; font-size: 9px; padding: 3px 5px; }
  .measure-page .measure-slice-handle-upper .measure-handle-value, .measure-page .measure-slice-handle-lower .measure-handle-value { right: -2px; left: auto; }
  .measure-page .measure-section-panel { top: 130px; left: 10px; bottom: 74px; width: calc(100% - 70px); max-height: 600px; }
  .measure-page .measure-section-header { gap: 6px; padding: 4px 8px; }
  .measure-page .measure-section-title { display: grid; gap: 1px; }
  .measure-page .measure-section-title h2 { font-size: 13px; }
  .measure-page #sectionCaption { font-size: 10px; }
  .measure-page .measure-section-zoom { gap: 3px; }
  .measure-page .measure-line-editor { grid-template-columns: minmax(0, 1fr) 102px 32px; gap: 6px; padding: 5px 8px 4px; }
  .measure-page .measure-line-editor label { gap: 3px; font-size: 10px; }
  .measure-page .measure-line-editor :is(input, select) { height: 32px; padding-inline: 6px; font-size: 11px; }
  .measure-page .measure-line-remove { min-height: 32px; height: 32px; }
  .measure-page .measure-line-additions { gap: 5px; padding: 0 8px 5px; }
  .measure-page .measure-add-line { min-height: 30px; padding-inline: 4px; font-size: 10px; gap: 4px; }
  .measure-page .measure-section-canvas-wrap { flex-basis: 210px; min-height: 80px; }
  .measure-page .measure-section-hint { padding: 3px 8px 5px; font-size: 9px; }
  .measure-page .measure-section-results { min-height: 64px; }
  .measure-page .measure-section-results h3 { padding: 6px 8px 3px; font-size: 10px; }
  .measure-page .measure-line-summary { padding: 0 5px 5px; font-size: 10px; }
  .measure-page .measure-summary-row { grid-template-columns: 112px minmax(0, 1fr); gap: 3px; padding: 3px; }
  .measure-page .measure-summary-select { padding-inline: 2px; font-size: 10px; }
  .measure-page .measure-value { padding-inline: 5px; }
  .measure-page .measure-rotation-panel { bottom: 10px; width: calc(100% - 20px); }
  .measure-page .measure-rotation-control { gap: 6px; padding: 7px; }
  .measure-page #rotationValue { flex-basis: 42px; font-size: 10px; }
  .measure-page .measure-file-row .measure-dimensions { margin-left: 0; max-width: 180px; }
}
@media (max-width: 360px) {
  .measure-page .measure-file-row { flex-wrap: wrap; gap: 6px; }
  .measure-page .measure-file-panel { flex-basis: 100%; }
  .measure-page .measure-line-editor { grid-template-columns: minmax(0, 1fr) 32px; }
  .measure-page .measure-line-select { grid-column: 1 / -1; }
  .measure-page .measure-line-position { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .measure-page .measure-summary-row { grid-template-columns: 1fr; }
  .measure-page .measure-summary-select { min-height: 24px; }
}
@media (max-height: 540px) and (min-width: 691px) {
  .measure-page .measure-toolbar { top: 8px; left: 10px; right: 10px; padding: 7px 9px; }
  .measure-page .measure-slice-controls { top: 76px; bottom: 98px; gap: 6px; }
  .measure-page .measure-section-panel { top: 76px; bottom: 76px; width: min(480px, calc(100% - 90px)); }
  .measure-page .measure-section-header { padding-block: 5px; }
  .measure-page .measure-line-editor { padding-block: 6px; }
  .measure-page .measure-section-canvas-wrap { flex-basis: 120px; min-height: 80px; }
  .measure-page .measure-section-results { min-height: 64px; max-height: 104px; }
  .measure-page .measure-line-summary { max-height: 76px; }
  .measure-page .measure-range-end { display: none; }
}

/* Public route: keep the website header/footer around the same measuring
   workspace that is used by the installed PWA. The application shell remains
   full-height through pwa/measure.php; these rules apply only to the public
   measure page. */
.measure-public-header > .measure-file-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 0 auto 18px;
  padding: 0 12px;
}
.measure-public-header > .measure-file-panel .measure-file-group {
  display: flex;
  align-items: center;
  flex: 0 1 460px;
  gap: 10px;
  width: min(100%, 460px);
  min-width: 0;
  min-height: 52px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e6ebf5;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.measure-public-header > .measure-file-panel .measure-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.measure-public-header > .measure-file-panel :is(.measure-upload, .measure-file-demo) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 6px;
  min-height: 40px;
  margin: 0;
  padding: 10px 14px;
  background: #121a33;
  color: #fff;
  border: 1px solid #1f2948;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.measure-public-header > .measure-file-panel .measure-upload { box-shadow: 0 6px 14px rgba(15, 23, 42, .14); }
.measure-public-header > .measure-file-panel .measure-upload svg { flex-shrink: 0; width: 17px; height: 17px; }
.measure-public-header > .measure-file-panel .measure-file-demo { padding-inline: 18px; }
.measure-public-header > .measure-file-panel :is(.measure-upload, .measure-file-demo):hover { background: #203059; border-color: #30477a; }
.measure-public-header > .measure-file-panel .measure-file-demo:disabled,
.measure-public-header > .measure-file-panel .measure-upload[aria-disabled="true"] { cursor: not-allowed; opacity: .58; }
.measure-public-header > .measure-file-panel .measure-upload[aria-disabled="true"] { pointer-events: none; }
.measure-public-header > .measure-file-panel :is(.measure-upload, .measure-file-demo):focus-visible,
.measure-public-header > .measure-file-panel #fileInput:focus-visible + .measure-upload { outline: 3px solid rgba(255, 208, 44, .38); outline-offset: 2px; }
.measure-public-header > .measure-file-panel .measure-file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding-right: 10px;
  color: #64708a;
  font-size: 14px;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.measure-public-header > .measure-file-panel .measure-file-separator { color: #8a94aa; font-size: 14px; line-height: 1.2; }
.measure-page--public {
  position: relative;
  inset: auto;
  z-index: 0;
  width: 100%;
  height: clamp(560px, 76vh, 720px);
  min-height: 560px;
  max-height: 720px;
  overflow: hidden;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .10);
}
.measure-page--public .measure-toolbar { top: 14px; left: 14px; right: 14px; justify-content: space-between; }
.measure-page--public .measure-file-row .measure-dimensions { margin-left: 0; }
.measure-page--public .measure-slice-controls { top: 96px; }
.measure-page--public .measure-section-panel { top: 96px; }
html.measure-expanded-lock,
body.measure-expanded-lock { overflow: hidden; }
/* Moving the workspace under body avoids clipping by the site or app shell. */
body .measure-page.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  min-height: 0;
  max-height: none;
  max-width: none;
  border: 0;
  border-radius: 0;
}
.measure-article {
  background: #f5f7fa;
  padding-top: 0;
}
.measure-seo {
  background: #ffffff;
  border: 1px solid #e5ebf2;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
  color: #263545;
  padding: clamp(24px, 4vw, 48px);
}
.measure-seo h2 {
  color: #142637;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.12;
  margin-bottom: 22px;
}
.measure-seo h3 {
  color: #142637;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 42px 0 14px;
}
.measure-seo p,
.measure-seo li {
  color: #344456;
  font-size: 17px;
  line-height: 1.75;
}
.measure-seo p { margin: 0 0 18px; }
.measure-seo a {
  color: #142637;
  text-decoration: underline;
  text-decoration-color: rgba(20, 38, 55, .34);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
.measure-seo a:hover { color: #f0a800; text-decoration-color: #f0a800; }
@media (max-width: 700px) {
  .measure-public-header > .measure-file-panel { padding: 0; }
  .measure-public-header > .measure-file-panel .measure-file-group { flex-basis: 100%; width: 100%; }
  .measure-page--public {
    height: min(740px, calc(100vh - 260px));
    min-height: 520px;
    border-radius: 11px;
  }
  .measure-page--public .measure-toolbar { top: 10px; left: 10px; right: 10px; }
  .measure-page--public .measure-file-row:has(.measure-dimensions[hidden]) { display: none; }
  .measure-page--public .measure-slice-controls { top: 130px; }
  .measure-page--public .measure-section-panel { top: 130px; }
}
@media (max-width: 640px) {
  .measure-seo { border-radius: 10px; padding: 22px 18px; }
  .measure-seo p,
  .measure-seo li { font-size: 16px; line-height: 1.65; }
}
