#sail-desk {
 --sail-border: #a7c6b142;
 --sail-ink: #f1e1c1;
 --sail-gold: #eab776;
 width: min(950px, calc(100vw - 26px));
 max-width: none;
 max-height: calc(100dvh - 22px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
 padding: 17px 20px;
 background: radial-gradient(ellipse at 90% 0%, #30493b 0%, #192d2b 49%, #102324 100%);
 color: var(--sail-ink);
 border-color: #a7c6b169;
 box-shadow: 0 30px 100px #081112d9;
}
#sail-desk::backdrop { background: #071414bd; backdrop-filter: blur(5px); }
.sail-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 12px; }
.sail-heading p { margin: 0 0 4px; font: 9px ui-monospace, monospace; letter-spacing: .19em; color: var(--sail-gold); }
#sail-desk h2 { margin: 0; font-size: 33px; color: var(--sail-ink); }
#sail-part-name { color: #9db9a8; display: block; margin-top: 4px; }
.sail-metrics { display: flex; flex: 1; gap: 15px; justify-content: flex-end; align-self: center; }
.sail-metrics div { display: grid; gap: 3px; }
.sail-metrics b { font: 15px ui-monospace, Consolas, monospace; color: #e3ead5; white-space: nowrap; }
.sail-metrics small, .sail-card header small { color: #9ab6a9; font-size: 10px; }
#sail-desk button, #sail-desk input, #sail-desk select { background: #213e37; color: var(--sail-ink); border: 1px solid var(--sail-border); border-radius: 5px; }
#sail-desk button:hover:not(:disabled) { border-color: #eab776ba; background: #654f35; }
#sail-close { height: 40px; width: 40px; flex: none; font-size: 24px; }
.sail-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 8px; }
.sail-card { background: #102628; border: 1px solid var(--sail-border); border-radius: 7px; overflow: hidden; }
.sail-card header { padding: 7px 9px 0; display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.sail-card header span { color: var(--sail-gold); font: 10px ui-monospace, monospace; }
#sail-desk .sail-card h3 { margin: 0; color: var(--sail-ink); font: 13px system-ui, sans-serif; }
.sail-card header small { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.sail-card svg { display: block; width: 100%; }
#sail-pattern { max-height: 386px; }
#sail-relief { max-height: 212px; }
#sail-profile { max-height: 92px; }
.sail-grid line { stroke: #7fada531; stroke-width: 1; }
.sail-grid text { fill: #90afa6; font: 11px ui-monospace, monospace; }
.sail-fabric { stroke: #edc68e60; stroke-width: 1; fill: #ad8357; }
.sail-fabric.tone-1 { fill: #ba9468; }
.sail-fabric.tone-2 { fill: #955e47; }
.sail-hem { stroke: #f1dcb1; stroke-width: 1.5; fill: none; }
.sail-batten { stroke: #e1bc8d; stroke-width: 1.6; fill: none; }
.sail-batten.selected { stroke: #ffdf9e; stroke-width: 2.7; }
.sail-chord { stroke: #84aaa0; stroke-dasharray: 5 3; }
.sail-centroid { fill: #233d3a; stroke: #94d4c8; stroke-width: 1.2; pointer-events: none; }
.sail-handle { stroke: transparent; stroke-width: 18; fill: #e8b878; paint-order: stroke; cursor: grab; touch-action: none; }
.sail-handle.selected { fill: #ffe6aa; filter: drop-shadow(0 0 3px #ffc166); }
.sail-fields { display: grid; grid-template-columns: 1.1fr repeat(5,minmax(0,1fr)); gap: 6px; margin: 10px 0; }
.sail-fields label { display: grid; gap: 4px; font-size: 10px; color: #abc5b5; min-width: 0; }
#sail-desk .sail-fields input, #sail-desk .sail-fields select { width: 100%; min-height: 33px; font-size: 13px; padding: 4px 7px; color-scheme: dark; }
.sail-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sail-actions div { display: flex; flex-wrap: wrap; gap: 4px; }
.sail-actions button { min-height: 34px; padding: 4px 9px; font-size: 11px; white-space: nowrap; }
#sail-note { font-size: 10px; color: #99b3a7; flex: 1; line-height: 1.5; }
#sail-desk #sail-apply { background: #ddb47c; color: #2a251b; margin-left: auto; font-weight: 700; }
#sheet-angle { width: 100%; }
.sail-force-display { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 6px; background: #142623; border-radius: 5px; }
.sail-force-display svg { width: 100%; }
.sail-force-display dl { margin: 0; padding-right: 7px; }
.sail-force-display dl div { display: flex; justify-content: space-between; gap: 4px; padding: 3px 0; }
.sail-force-display dt { color: #9db4a4; font-size: 9px; }
.sail-force-display dd { margin: 0; color: #e5c18f; font: 10px ui-monospace, monospace; white-space: nowrap; }
.sail-force-display dd#sail-wind-speed { color: #a3d5d5; }
@media (max-width: 650px) {
 #sail-desk { padding: 11px; }
 .sail-heading { flex-wrap: wrap; gap: 5px; }
 #sail-desk h2 { font-size: 25px; }
 #sail-close { margin-left: auto; }
 .sail-metrics { order: 3; flex-basis: 100%; justify-content: space-between; }
 .sail-metrics b { font-size: 14px; }
 .sail-workspace { grid-template-columns: minmax(0,1fr); }
 .sail-section-card header:first-child, #sail-relief { display: none; }
 #sail-profile { max-height: 63px; }
 .sail-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
 #sail-desk .sail-fields input, #sail-desk .sail-fields select { font-size: 16px; }
 #sail-note { flex: 1 0 100%; order: 2; }
 .sail-actions button { min-height: 38px; }
}
