.weight-toolbar { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:20px; }
.weight-toolbar h2 { margin:0 0 6px; font-size:20px; }
.weight-tools { display:flex; align-items:start; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.roster-sort-select { width:auto; min-width:0; min-height:48px; padding:10px; font-size:14px; font-weight:600; background:var(--raised); }
.weight-toolbar .weight-progress { margin:0; color:var(--muted,#a9b2bf); font-size:14px; }
.weight-downloads { position:relative; flex:none; }
.weight-downloads summary { display:flex; align-items:center; gap:12px; min-height:48px; box-sizing:border-box; padding:10px 14px; border:1px solid var(--line,#394451); border-radius:8px; background:var(--raised,#1c242d); color:var(--ink,#f6f7f8); font-size:14px; font-weight:600; cursor:pointer; list-style:none; }
.weight-downloads summary::-webkit-details-marker { display:none; }
.weight-downloads summary::after { content:'▾'; }
.weight-download-menu { position:absolute; top:calc(100% + 6px); right:0; z-index:12; display:grid; gap:6px; width:220px; padding:8px; background:var(--raised,#1c242d); border:1px solid var(--line,#394451); border-radius:8px; box-shadow:0 8px 24px #0008; }
.weight-download-menu button { width:100%; text-align:left; min-height:48px; }
.weight-download-menu .weight-export-options { display:flex; align-items:center; gap:10px; min-height:48px; margin:4px 0 0; padding:8px; border-top:1px solid var(--line,#394451); font-size:14px; font-weight:400; cursor:pointer; }
.weight-export-options input { width:18px; height:18px; min-height:18px; flex:none; margin:0; accent-color:var(--brand,#f2d448); }
.weight-export-status:empty { display:none; }
.weight-export-status { margin:0 0 16px; }
.weight-column-headings,.weight-row { display:grid; grid-template-columns:minmax(0,1fr) 210px; gap:16px; align-items:center; }
.weight-column-headings { padding:0 16px 8px; color:var(--muted,#a9b2bf); font-size:14px; font-weight:600; }
.weight-list { display:grid; gap:5px; }
.weight-row { border:1px solid var(--line,#394451); border-radius:8px; padding:8px 12px; min-width:0; }
.weight-summary { display:grid; grid-template-columns:minmax(0,1fr) max-content; gap:12px; min-width:0; text-align:left; border:0; background:transparent; padding:6px; color:inherit; width:100%; }
.weight-summary:hover { background:var(--raised); }
.weight-summary:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.weight-identity { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere; }
.weight-identity strong { font-size:18px; line-height:1.3; }
.weight-identity .app-muted { color:var(--muted,#a9b2bf); font-size:14px; line-height:1.4; }
.weight-last { display:grid; gap:3px; font-variant-numeric:tabular-nums; min-width:0; }
.weight-last strong { font-size:18px; font-weight:700; line-height:1.3; }
.weight-last>span { color:var(--muted,#a9b2bf); font-size:14px; line-height:1.4; }
.weight-row form { display:flex; gap:8px; align-items:center; margin:0; min-width:0; }
.weight-row label { display:grid; gap:4px; flex:1; min-width:0; margin:0; }
.weight-row input { width:100%; min-width:0; box-sizing:border-box; text-align:right; font-variant-numeric:tabular-nums; appearance:textfield; }
.weight-row input::-webkit-inner-spin-button,.weight-row input::-webkit-outer-spin-button { appearance:none; margin:0; }
.weight-row input,.weight-editor input { padding:10px; font-size:16px; }
.weight-row input,.weight-row button { min-height:48px; box-sizing:border-box; }
.weight-row form button { flex:none; }
.weight-history-button { width:100%; font-size:14px; }
.weight-row .weight-row-status { grid-column:1/-1; font-size:13px; margin:0; color:var(--muted,#a9b2bf); }
.weight-row-status button { margin-left:8px; }
.weight-row[data-state="attention"] .weight-row-status { color:var(--brand,#f2d448); }
.weight-sr-only,.weight-input-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.weight-editor { width:min(480px,calc(100% - 24px)); box-sizing:border-box; padding:16px; max-height:80vh; overflow:auto; background:var(--surface,#12171c); color:var(--ink,#f6f7f8); border:1px solid var(--line,#394451); border-radius:10px; }
.weight-editor::backdrop { background:#000b; }
.weight-editor label { display:grid; gap:5px; margin:12px 0; }
.weight-editor button { margin:4px; min-height:48px; }
.weight-history-entry { display:block; width:calc(100% - 8px); text-align:left; }
.weight-editor-actions { display:flex; align-items:center; gap:20px; margin:0; }
.weight-editor-actions button { flex:none; margin:0; font-size:14px; padding:10px 12px; }
.weight-editor-actions .weight-delete-button { display:flex; align-items:center; justify-content:center; width:48px; padding:0; color:#ffb4ab; border-color:#78524f; background:transparent; }
.weight-edit-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:16px; }
.weight-edit-identity { min-width:0; overflow-wrap:anywhere; }
.weight-dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.weight-dialog-heading h3 { margin:8px 0; font-size:18px; }
.weight-editor .weight-dialog-close { flex:none; display:flex; align-items:center; justify-content:center; width:48px; min-height:48px; padding:0; margin:0; font-size:26px; line-height:1; }
.weight-edit-heading h3 { margin:0 0 4px; font-size:18px; line-height:1.3; }
.weight-edit-heading p { margin:0; color:var(--muted,#a9b2bf); font-size:14px; }
.weight-edit-fields { display:grid; grid-template-columns:104px minmax(0,1fr); gap:12px; margin-top:16px; }
.weight-edit-fields label { min-width:0; margin:0; font-size:14px; }
.weight-edit-fields input { width:100%; min-width:0; height:48px; min-height:48px; line-height:1.2; box-sizing:border-box; }
.weight-edit-fields input[type="number"] { text-align:right; font-size:22px; font-weight:600; font-variant-numeric:tabular-nums; appearance:textfield; }
.weight-edit-fields input[type="number"]::-webkit-inner-spin-button,.weight-edit-fields input[type="number"]::-webkit-outer-spin-button { appearance:none; margin:0; }
.weight-edit-status:empty { display:none; }
.weight-edit-status { margin:8px 0 0; font-size:14px; color:#ffb4ab; }
.weight-audit { border-top:1px solid var(--line,#394451); padding-top:12px; margin-top:16px; }
.weight-audit h4 { font-size:14px; margin:0 0 8px; }
.weight-audit-list { max-height:180px; overflow:auto; overscroll-behavior:contain; }
.weight-audit-row { padding:8px 0; border-top:1px solid var(--line,#394451); }
.weight-audit-row:first-child { border-top:0; padding-top:0; }
.weight-audit-title { display:flex; justify-content:space-between; gap:12px; font-size:14px; }
.weight-audit-title strong { font-variant-numeric:tabular-nums; }
.weight-audit-row p { margin:4px 0 0; font-size:13px; color:var(--muted,#a9b2bf); overflow-wrap:anywhere; line-height:1.4; }
@media(max-width:799px) {
  .weight-column-headings { display:none; }
  .weight-row { grid-template-columns:minmax(0,1fr) minmax(130px,180px); gap:6px 10px; }
  .weight-summary { grid-column:1/-1; display:grid; grid-template-columns:minmax(0,1fr) max-content; gap:1px 8px; align-items:baseline; min-width:0; }
  .weight-identity,.weight-last { display:contents; }
  .weight-identity strong { grid-area:1/1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .weight-identity .app-muted { grid-area:2/1; }
  .weight-last strong { grid-area:1/2; text-align:right; }
  .weight-last>span { grid-area:2/2; white-space:nowrap; text-align:right; }
  .weight-row form { grid-area:2/1; }
  .weight-history-button { grid-area:2/2; align-self:end; justify-self:end; width:auto; }
  .weight-row input,.weight-row button { min-height:44px; }
  .weight-row input { height:44px; padding:8px; }
  .weight-row form { align-items:end; }
}
@media(max-width:480px) {
  .weight-edit-heading { grid-template-columns:1fr; gap:12px; }
  .weight-edit-heading .weight-editor-actions { justify-content:space-between; gap:20px; }
  .weight-toolbar { gap:8px; margin-bottom:16px; }
  .weight-toolbar .weight-progress { font-size:13px; }
  .weight-downloads summary { padding:10px; gap:8px; }
  .weight-toolbar { flex-wrap:wrap; }
  .weight-toolbar>div:first-child { flex:1 1 100%; }
  .weight-tools { width:100%; justify-content:space-between; }
  .weight-row { grid-template-columns:minmax(0,1fr) 96px; padding:8px 10px; gap:6px 8px; }
  .weight-identity strong,.weight-last strong { font-size:16px; }
  .weight-identity .app-muted,.weight-last>span { font-size:12px; }
  .weight-row form { grid-area:2/1; gap:6px; }
  .weight-row form button { padding:8px; }
  .weight-history-button { grid-area:2/2; align-self:end; font-size:12px; padding:10px 6px; width:100%; }
  .weight-row .weight-row-status { grid-row:3; }
}
@media(max-width:359px) {
  .weight-row { grid-template-columns:minmax(0,1fr) 88px; padding:8px; gap:6px; }
}
#screen-weight .prototype { min-height:0; }
#screen-weight #weight-progress { display:none; }
/* Rapid scale entry: one viewport-aware save action, with room to scroll every row above it. */
#weight-tracker { padding-bottom:140px; }
.weight-save-bar { position:fixed; z-index:15; left:50%; transform:translateX(-50%); bottom:calc(var(--weight-keyboard-inset,0px) + env(safe-area-inset-bottom,0px) + 8px); width:min(948px,calc(100% - 24px)); display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:0 3px 20px #0008; }
.weight-save-bar p { margin:0; font-size:14px; min-width:0; }
.weight-save-bar button { flex:none; min-width:110px; min-height:48px; }
.weight-row .weight-name { font:inherit; font-size:18px; font-weight:700; text-align:left; padding:0; border:0; background:none; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; min-width:0; min-height:44px; }
.weight-details { width:min(900px,calc(100% - 24px)); }
.weight-details-header { position:sticky; top:-20px; z-index:3; background:var(--surface); display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.weight-details-header h2 { margin:0; }
.weight-details-header { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto auto; }
.weight-plan-output { display:flex; gap:6px 18px; flex-wrap:wrap; font-size:13px; margin:8px 0; }
.weight-document-actions { display:flex; gap:8px; flex-wrap:wrap; }
.weight-document-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:8px 0; }
.weight-document-row>button:first-of-type { flex:1; text-align:left; overflow-wrap:anywhere; min-width:0; }
@media(max-width:799px){.weight-details-header h2{grid-column:1/-1}.weight-details-header{grid-template-columns:minmax(0,1fr) 44px auto minmax(70px,auto);gap:6px}.weight-details-header button{font-size:13px;padding:8px}.weight-details-header button:last-child{max-width:88px;white-space:normal}.weight-catalog-badge{font-size:11px;padding:4px}}
.weight-details-header button { flex:none; }
.weight-details section,.weight-details details { margin:16px 0; }
.weight-details dl,.weight-plan-output dl { display:grid; grid-template-columns:minmax(100px,1fr) minmax(0,2fr); gap:6px 12px; font-size:14px; }
.weight-details dt { color:var(--muted); text-transform:capitalize; }
.weight-details dd { margin:0; overflow-wrap:anywhere; }
.weight-details pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; }
.weight-history-graph svg { display:block; width:100%; overflow:visible; }
.weight-history-graph svg text { fill:var(--muted); font:12px system-ui,sans-serif; }
.weight-history-graph>p { font-size:13px; }
.weight-actual-point { fill:var(--brand); stroke:var(--ink); stroke-width:1; cursor:pointer; }
.weight-pending-point { fill:var(--surface); stroke:var(--brand); stroke-width:3; cursor:pointer; }
.weight-official-point { fill:#7dde9d; }
.weight-model-line { stroke:#7dde9d; stroke-dasharray:7 5; stroke-width:2; }
.weight-detail-entries article { display:block; margin:6px 0; }
.weight-measurement-card { width:100%; min-height:48px; }
.weight-print-button { display:inline-flex; align-items:center; justify-content:center; min-width:44px; }
.weight-history-graph { border:1px solid var(--line); border-radius:8px; padding:10px; }
.weight-graph-legend { display:flex; flex-wrap:wrap; gap:8px 16px; margin:0 0 10px; font-size:13px; }
.weight-graph-legend>span { display:inline-flex; align-items:center; gap:6px; }
.weight-graph-legend>span>span { display:inline-block; width:22px; height:0; border-top:2px solid; }
.weight-graph-legend .weight-key-actual,.weight-graph-legend .weight-key-pending { width:10px; height:10px; border:2px solid var(--brand); border-radius:50%; }
.weight-key-actual { background:var(--brand); }
.weight-graph-legend .weight-key-model { border-color:#7dde9d; border-top-style:dashed; }
.weight-graph-legend .weight-key-class { border-color:#b9a2ff; }
.weight-graph-legend .weight-key-official { width:10px; height:10px; background:#7dde9d; border:0; }
.weight-class-line { stroke:#b9a2ff; stroke-width:2; }
.weight-aew-line { stroke:#7dde9d; stroke-width:2; }
.weight-key-status { color:var(--muted); font-size:12px; }
#print-weight-history { display:none; }
@media print {
  body.weight-history-printing>* { display:none!important; }
  body.weight-history-printing>#print-weight-history { display:block!important; background:#fff; color:#111; font:10pt Arial,sans-serif; }
  #print-weight-history table { width:100%; border-collapse:collapse; table-layout:fixed; }
  #print-weight-history th,#print-weight-history td { border:1px solid #999; padding:5pt; text-align:left; overflow-wrap:anywhere; }
  #print-weight-history thead { display:table-header-group; }
  #print-weight-history tr { break-inside:avoid; }
}
.weight-detail-entries button { text-align:left; font-size:14px; }
.weight-plan-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:14px 0; }
.weight-plan-form label { font-size:14px; min-width:0; }
.weight-plan-form>details,.weight-plan-form>p { grid-column:1/-1; }
.weight-plan-form>details label { display:block; margin-top:12px; }
.weight-plan-form input,.weight-plan-form select,.weight-plan-form textarea { width:100%; font-size:16px; }
.weight-plan-form textarea { min-height:120px; background:var(--bg); color:var(--ink); border:1px solid var(--line); border-radius:8px; }
.weight-plan-form input[type=checkbox],.weight-review input[type=checkbox] { width:24px; height:24px; min-height:24px; margin-right:10px; }
.weight-review button { margin:8px 8px 0 0; }
.weight-review>input { margin:10px 0; }
@media(max-width:799px){.weight-identity .weight-name{grid-area:1/1}.weight-row .weight-name{font-size:16px}.weight-details-header{top:-14px}.weight-plan-form{grid-template-columns:1fr}.weight-detail-entries article{grid-template-columns:1fr}.weight-details dl{grid-template-columns:minmax(90px,1fr) minmax(0,1.5fr)}}
@media(max-width:799px){.weight-details-header{flex-wrap:wrap}.weight-details-header h2{flex:1 1 100%;min-width:0;overflow-wrap:anywhere}.weight-details-header button{font-size:14px}}
.weight-plan-report { min-width:0; max-width:100%; }
.weight-report-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:end; }
.weight-report-controls label { flex:1 1 130px; min-width:0; font-size:14px; }
.weight-report-controls input,.weight-report-controls select { width:100%; min-width:0; font-size:16px; }
.weight-report-sheet h2 { margin-top:16px; }
.weight-report-sheet dl { margin-bottom:12px; }
.weight-report-sheet>p { font-size:13px; }
.weight-report-scroll { width:100%; max-width:100%; max-height:380px; overflow:auto; overscroll-behavior:contain; border:1px solid var(--line); }
.weight-report-scroll table { width:100%; min-width:650px; border-collapse:collapse; font-size:13px; }
.weight-report-scroll th,.weight-report-scroll td { padding:8px; border:1px solid var(--line); text-align:left; vertical-align:top; }
.weight-report-scroll thead th { position:sticky; top:0; z-index:1; background:var(--raised); }
.weight-report-scroll tbody tr:nth-child(even) { background:var(--surface); }
.weight-report-scroll td:last-child { min-width:180px; }
.weight-report-scroll td p { margin:4px 0; }
.weight-report-scroll td button { display:block; width:100%; min-height:44px; text-align:left; margin:4px 0; font-size:13px; }
.weight-report-banner td { background:var(--raised); text-align:center; }
.weight-print-document { display:none; }
@media print {
  @page { margin:12mm; }
  html:has(body.weight-printing) { overflow:visible!important; background:white!important; color-scheme:light!important; }
  body.weight-printing { position:static!important; top:auto!important; left:auto!important; width:auto!important; overflow:visible!important; background:white!important; color:black!important; }
  body.weight-printing>* { display:none!important; }
  body.weight-printing>#print-weight-plan { display:block!important; --line:#999; --surface:#fff; --raised:#eee; --ink:#111; --muted:#333; color:#111; background:white; font:10pt Arial,sans-serif; }
  body.weight-printing>#print-practice { display:none!important; }
  body.weight-printing dialog { display:none!important; }
  .weight-print-document h2 { font-size:20pt; text-align:center; margin:0 0 6pt; }
  .weight-print-document dl { display:grid; grid-template-columns:1fr 2fr 1fr 2fr; gap:4pt 8pt; }
  .weight-print-document dd { margin:0; overflow-wrap:anywhere; }
  .weight-print-document .weight-report-scroll { max-height:none; overflow:visible; border:0; }
  .weight-print-document table { min-width:0; table-layout:fixed; font-size:9pt; }
  .weight-print-document th,.weight-print-document td { padding:5pt; overflow-wrap:anywhere; }
  .weight-print-document thead { display:table-header-group; }
  .weight-print-document thead th { position:static; }
  .weight-print-document tr { break-inside:avoid; }
  .weight-print-document td:last-child { min-width:0; }
}


.weight-catalog-badge { font-size:12px; line-height:1.2; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:4px 7px; text-align:center; }
.weight-class-guide { stroke:#7f8995; stroke-width:1; stroke-opacity:.45; vector-effect:non-scaling-stroke; pointer-events:none; }
.weight-history-graph svg .weight-class-guide-label { fill:#b4bcc6; font-size:14px; paint-order:stroke; stroke:var(--surface,#12171d); stroke-width:4px; stroke-linejoin:round; pointer-events:none; }
.weight-week-tick { stroke:var(--muted,#a9b2bf); stroke-width:1; }
.weight-history-graph svg .weight-week-label { fill:var(--muted,#a9b2bf); font-size:12px; }
.weight-graph-legend .weight-key-guide { border-color:#7f8995; border-top-width:1px; }
@media(max-width:799px){.weight-history-graph svg .weight-class-guide-label{font-size:22px}.weight-history-graph svg .weight-week-label{font-size:20px}.weight-catalog-badge{font-size:11px;padding:4px}}
