/*
  63-ship.css — v46.1 Ship (design/ship Main, Stores, Loadout, Actions, Fleet,
  Favour, Damage, Adjust, Desktop). Dark screen, cream cards, brass accents.
  The Damage and Adjust sheets are the app's Modal drawn as a bottom sheet on
  a phone, the way 49's filter sheet is (the legacy layer pins dialogs to the
  top with !important, so the override sits in @layer editor-pilot).
*/

.sh-screen { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 24px; color: #231a10; }
.sh-screen button { font: inherit; }
.sh-card { overflow: hidden; border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; color: #231a10; }
.sh-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 6px; }
.sh-card-title { font-size: 16px; font-weight: 700; }
.sh-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; color: #bfae8c; font-size: 13px; }
.sh-section-head h2 { margin: 0; font-size: 15px !important; font-weight: 700; color: #f1e4c4; letter-spacing: 0; text-shadow: none; font-family: inherit; }
.sh-screen button.sh-link, #modal button.sh-link { min-height: 32px !important; padding: 0; border: 0; background: none; box-shadow: none; color: #845c0f; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.sh-section-head button.sh-link { color: #e8c069; text-decoration: none; }
.sh-screen button.sh-row-link { align-self: flex-end; min-height: 36px !important; padding: 0 2px; border: 0; background: none; box-shadow: none; color: #e8c069; font-size: 13px; font-weight: 600; cursor: pointer; }
.sh-screen button.sh-row-link-light { align-self: auto; margin: 0 12px 8px; color: #845c0f; }
.sh-empty { padding: 14px 12px; font-size: 14px; color: #5c4a30; }
.sh-note { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: #5c4a30; }
.sh-desk-only { display: none; }

/* Bars */
.sh-bar { position: relative; display: block; height: 6px; overflow: hidden; border-radius: 999px; background: #ddd0ab; }
.sh-fill { display: block; height: 100%; border-radius: 999px; background: #845c0f; }
.sh-fill.is-hurt { background: #b0632b; }
.sh-fill.is-danger { background: #a33a2a; }
.sh-fill.is-good { background: #4f7d3f; }

/* Helm: the banner and the six tiles */
.sh-screen button.sh-alert { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px !important; padding: 10px 12px; border-radius: 14px; border: 1px solid #d9b46a; background: #f3d9a4; color: #3d2a0c; text-align: left; cursor: pointer; }
.sh-alert.is-danger { border-color: #e3b8ab; background: #f6e1db; color: #6b2216; }
.sh-alert.is-info { border-color: #ddd0ab; background: #efe4c3; color: #3d2f1d; }
.sh-alert-text { flex: 1 1 auto; font-size: 14px; font-weight: 600; }
.sh-alert b { flex-shrink: 0; font-size: 13px; }
.sh-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sh-screen button.sh-tile { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 0 !important; padding: 10px 12px; border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; color: #231a10; text-align: left; cursor: pointer; }
.sh-tile-label { font-size: 12px; font-weight: 700; color: #5c4a30; }
.sh-tile-value { display: flex; align-items: baseline; gap: 4px; }
.sh-tile-value b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-tile-value span { font-size: 13px; color: #5c4a30; }
.sh-tile-sub { font-size: 12px; line-height: 1.3; color: #5c4a30; }
.sh-helm, .sh-helm-main, .sh-helm-side { display: flex; flex-direction: column; gap: 10px; }

/* Parts */
.sh-screen button.sh-part { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px !important; padding: 6px 12px; border: 0; border-bottom: 1px solid #ddd0ab; background: transparent; color: #231a10; text-align: left; cursor: pointer; }
.sh-part:last-child { border-bottom: 0; }
.sh-part-name { width: 72px; flex-shrink: 0; font-size: 15px; font-weight: 700; }
.sh-part-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sh-part-sub { font-size: 12px; color: #5c4a30; font-variant-numeric: tabular-nums; }
.sh-part > .cx-icon, .sh-list-row > .cx-icon, .sh-slot > .cx-icon, .sh-dark-row > .cx-icon:last-child { flex-shrink: 0; color: #6e5b40; }
.sh-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 0 12px; }
.sh-stat { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: #f6efdc; }
.sh-stat small { font-size: 11px; font-weight: 700; color: #5c4a30; }
.sh-stat b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sh-stats .sh-note { padding: 0 12px 12px; }
.sh-moves { margin-top: 10px; }
.sh-move { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #ddd0ab; font-size: 14px; }
.sh-move:last-child { border-bottom: 0; }

/* Stores */
.sh-hold { padding: 12px; }
.sh-hold-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; color: #5c4a30; }
.sh-hold-head > b { font-size: 14px; color: #231a10; }
.sh-hold-head span b { font-size: 18px; color: #231a10; }
.sh-hold-bar { display: flex; height: 10px; margin: 8px 0; overflow: hidden; border-radius: 999px; background: #ddd0ab; }
.sh-hold-seg.is-sup, .sh-hold-key i.is-sup { background: #845c0f; }
.sh-hold-seg.is-lum, .sh-hold-key i.is-lum { background: #b0632b; }
.sh-hold-seg.is-oth, .sh-hold-key i.is-oth { background: #8f8574; }
.sh-hold-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: #5c4a30; }
.sh-hold-key i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; }
.sh-screen button.sh-dark-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px !important; padding: 8px 12px; border-radius: 14px; border: 1px solid #4a3a28; background: #2a1e15; color: #f1e4c4; text-align: left; cursor: pointer; }
.sh-dark-row > .cx-icon:first-child { color: #e8c069; }
.sh-dark-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
.sh-dark-text b { font-size: 15px; }
.sh-dark-text small { font-size: 13px; color: #bfae8c; }
.sh-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.sh-pills button { flex-shrink: 0; min-height: 40px !important; padding: 0 14px; border-radius: 999px; border: 1px solid #6e5b40; background: transparent; color: #f1e4c4; font-size: 14px; font-weight: 600; cursor: pointer; }
.sh-pills button span { margin-left: 2px; font-variant-numeric: tabular-nums; color: #bfae8c; }
.sh-pills button.is-on { border-color: #c18a2a; background: #c18a2a; color: #1f1712; }
.sh-pills button.is-on span { color: #1f1712; }
.sh-stores { display: flex; flex-direction: column; gap: 8px; }
.sh-store { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; }
.sh-screen button.sh-store-text { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; min-height: 44px !important; padding: 0; border: 0; background: none; color: #231a10; text-align: left; cursor: pointer; }
.sh-store-text b { font-size: 16px; }
.sh-store-text small { font-size: 13px; line-height: 1.35; color: #5c4a30; }
.sh-step { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sh-step button { width: 40px; height: 40px; min-height: 0 !important; padding: 0; border-radius: 999px; border: 1px solid #b9a77f; background: #f6efdc; color: #231a10; font-size: 20px; cursor: pointer; }
.sh-step button.sh-step-qty { width: auto; min-width: 52px; padding: 0 6px; border: 0; background: none; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-screen button.sh-quiet { align-self: flex-start; min-height: 44px !important; padding: 0 16px; border-radius: 12px; border: 1px solid #6e5b40; background: transparent; color: #f1e4c4; font-weight: 600; cursor: pointer; }
.sh-consumables { border-radius: 14px; background: #efe4c3; padding: 8px; }

/* Loadout */
.sh-ship { position: relative; height: 210px; border-radius: 16px; border: 1px solid #4a3a28; background: #2a1e15; }
.sh-hull { position: absolute; top: 20px; left: calc(50% - 45px); fill: #3a2a1d; stroke: #c18a2a; stroke-width: 2; }
.sh-hull .sh-keel { stroke: #6e5b40; stroke-width: 1.5; fill: none; }
.sh-screen button.sh-arc { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 96px; min-height: 48px !important; padding: 0 10px; border-radius: 12px; border: 1px solid #6e5b40; background: #1f1712; color: #f1e4c4; cursor: pointer; }
.sh-arc b { font-size: 13px; }
.sh-arc small { font-size: 12px; font-variant-numeric: tabular-nums; }
.sh-screen button.sh-arc.is-on { border-color: #c18a2a; background: #c18a2a; color: #1f1712; }
.sh-arc-front { top: 8px; left: calc(50% - 48px); }
.sh-arc-left { top: 81px; left: 16px; }
.sh-arc-right { top: 81px; right: 16px; }
.sh-arc-back { bottom: 8px; left: calc(50% - 48px); }
.sh-screen button.sh-slot { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px !important; padding: 8px 12px; border: 0; border-bottom: 1px solid #ddd0ab; background: transparent; color: #231a10; text-align: left; cursor: pointer; }
.sh-slot:last-child { border-bottom: 0; }
.sh-slot-n { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; background: #845c0f; color: #f4ecd8; font-size: 13px; font-weight: 700; }
.sh-slot.is-empty { color: #845c0f; }
.sh-slot.is-empty .sh-slot-n { box-sizing: border-box; border: 1.5px dashed #b9a77f; background: transparent; color: #845c0f; }
.sh-slot-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
.sh-slot-text b { font-size: 15px; }
.sh-slot.is-empty .sh-slot-text b { font-weight: 600; }
.sh-slot-text small { font-size: 13px; color: #5c4a30; }
.sh-deck { padding: 8px; }
.sh-screen button.sh-list-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px !important; padding: 0 12px; border: 0; border-bottom: 1px solid #ddd0ab; background: transparent; color: #231a10; text-align: left; cursor: pointer; }
.sh-list-row:last-child { border-bottom: 0; }
.sh-list-row > span { flex: 1 1 auto; font-size: 15px; font-weight: 600; }
.sh-list-row > small { flex-shrink: 0; font-size: 13px; color: #5c4a30; }

/* Actions */
.sh-count { font-size: 13px; color: #5c4a30; }
.sh-count b { color: #231a10; }
.sh-duty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px 12px 12px; }
.sh-screen button.sh-duty { display: flex; align-items: center; gap: 10px; min-height: 44px !important; padding: 6px 10px; border-radius: 12px; border: 1px solid #ddd0ab; background: #f6efdc; color: #231a10; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.sh-screen button.sh-duty.is-done { border-color: #c9b27a; background: #e8dbb6; }
.sh-box { display: grid; place-items: center; flex-shrink: 0; box-sizing: border-box; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #845c0f; color: #f4ecd8; }
.sh-duty.is-done .sh-box { background: #845c0f; }
.sh-combat { padding: 12px; border-radius: 14px; border: 1px solid #4a3a28; background: #2a1e15; color: #f1e4c4; }
.sh-combat .sh-card-head { padding: 0 0 6px; }
.sh-init { padding: 2px 10px; border-radius: 999px; background: #c18a2a; color: #1f1712; font-size: 13px; font-weight: 700; }
.sh-combat ul { margin: 4px 0 10px; padding-left: 18px; font-size: 14px; line-height: 1.45; color: #e6d7b5; }
.sh-combat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-combat-chips button { min-height: 40px !important; padding: 0 12px; border-radius: 12px; border: 1px solid #6e5b40; background: #1f1712; color: #f1e4c4; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Fleet */
.sh-fleet { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.sh-fleet-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sh-fleet-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1px solid #4a3a28; background: #2a1e15; color: #f1e4c4; }
.sh-fleet-stat small { font-size: 12px; font-weight: 700; color: #bfae8c; }
.sh-fleet-stat b { font-size: 22px; font-variant-numeric: tabular-nums; }
.sh-fleet-row { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px; border-bottom: 1px solid #ddd0ab; }
.sh-fleet-row:last-child { border-bottom: 0; }
.sh-fleet-row-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
.sh-fleet-row-text b { font-size: 15px; }
.sh-fleet-row-text small { font-size: 13px; color: #5c4a30; }
#screen-fleet button.sh-small { flex-shrink: 0; min-height: 36px !important; padding: 0 14px; border-radius: 10px; border: 1px solid #845c0f; background: #fbf7ec; color: #231a10; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
#screen-fleet button.sh-small-dark { border-color: #6e5b40; background: #2a1e15; color: #f1e4c4; }
#screen-fleet button.sh-row-link { align-self: flex-end; min-height: 36px !important; padding: 0 2px; border: 0; background: none; box-shadow: none; color: #e8c069; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sh-vessels { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#screen-fleet .sh-section-head h2 { margin: 0; font-size: 15px !important; color: #f1e4c4; }
#screen-fleet button.sh-vessel { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 12px; border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; color: #231a10; font: inherit; text-align: left; cursor: pointer; }
.sh-vessel-head { display: flex; align-items: center; gap: 12px; }
.sh-vessel-head img, .sh-vessel-pic { flex-shrink: 0; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.sh-vessel-pic { display: grid; place-items: center; background: #3f6f77; color: #e9f1ee; }
.sh-vessel-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.sh-vessel-text b { font-size: 16px; }
.sh-vessel-text small { font-size: 13px; color: #5c4a30; }
.sh-tag { flex-shrink: 0; padding: 2px 10px; border-radius: 999px; border: 1px solid #845c0f; font-size: 12px; font-weight: 700; color: #845c0f; }
.sh-vessel-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sh-vessel-bars > span { display: flex; flex-direction: column; gap: 4px; }
.sh-vessel-bars small { font-size: 12px; color: #5c4a30; }
/* The cards 39 still draws (a set flagship, squadrons, characters) */
#screen-fleet .fleet-card, #screen-fleet .fleet-squadron { border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; color: #231a10; box-shadow: none; }
#screen-fleet .fleet-squadrons > .section-title h3, #screen-fleet .fleet-squadrons > .section-title .hint { color: #f1e4c4; }

/* Captain's Favour */
.sh-favour { display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; }
.sh-favour-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sh-favour-head h2 { margin: 0; font-size: 15px !important; font-weight: 700; color: #f1e4c4; letter-spacing: 0; text-shadow: none; font-family: inherit; }
.sh-favour-head span { font-size: 13px; color: #bfae8c; }
.sh-berth-icons { display: grid; grid-template-columns: 116px minmax(0, 1fr); padding: 0 12px; }
.sh-berth-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); justify-items: center; }
.sh-favour .is-danger { color: #e0806b; }
.sh-favour .is-warn { color: #d9a64a; }
.sh-favour .is-neutral { color: #e8c069; }
.sh-favour .is-ok { color: #78b07a; }
.sh-favour .is-love { color: #e58fa6; }
.sh-officer { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; padding: 8px 12px; border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; }
.sh-favour button.sh-officer-who { display: flex; align-items: center; gap: 10px; min-height: 44px !important; min-width: 0; padding: 0; border: 0; background: none; color: #231a10; font: inherit; text-align: left; cursor: pointer; }
.sh-officer-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sh-officer-who b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.sh-officer-who small { font-size: 12px; font-weight: 700; }
.sh-officer-who small.is-danger { color: #8a2f20; }
.sh-officer-who small.is-warn { color: #8a5a10; }
.sh-officer-who small.is-neutral { color: #845c0f; }
.sh-officer-who small.is-ok { color: #3f6b33; }
.sh-officer-who small.is-love { color: #9c3552; }
.sh-face { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; overflow: hidden; border-radius: 999px; background: #c79a8a; color: #1f1712; font-size: 15px; font-weight: 800; }
.sh-face img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.sh-berths { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); justify-items: center; align-items: center; }
.sh-favour button.sh-berth { position: relative; display: grid; place-items: center; width: 44px; height: 44px; min-height: 0 !important; padding: 0; border: 0; border-radius: 999px; background: none; cursor: pointer; }
.sh-favour button.sh-berth::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: #c9b78f; }
.sh-favour button.sh-berth.is-on::before { display: none; }
.sh-favour button.sh-berth[disabled] { cursor: default; }
.sh-token { display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; box-sizing: border-box; border-radius: 999px; border: 3px solid currentColor; background: #845c0f; color: inherit; font-size: 14px; font-weight: 800; touch-action: none; cursor: grab; }
.sh-berth.is-danger .sh-token { border-color: #a33a2a; background: #c46b55; }
.sh-berth.is-warn .sh-token { border-color: #b07a22; background: #d8a14d; }
.sh-berth.is-neutral .sh-token { border-color: #c18a2a; background: #845c0f; }
.sh-berth.is-ok .sh-token { border-color: #4f7d3f; background: #4f7d3f; }
.sh-berth.is-love .sh-token { border-color: #b4486a; background: #d0708c; }
.sh-token img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.sh-token.is-dragging { cursor: grabbing; }
.sh-berths .drag-target::after { content: ""; position: absolute; inset: 4px; border-radius: 999px; border: 2px dashed #845c0f; }
.sh-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 2px; font-size: 12px; }
.sh-legend span { display: inline-flex; align-items: center; gap: 4px; color: #e6d7b5 !important; }
.sh-legend span .cx-icon { flex-shrink: 0; }
.sh-legend span.is-danger .cx-icon { color: #e0806b; } .sh-legend span.is-warn .cx-icon { color: #d9a64a; } .sh-legend span.is-neutral .cx-icon { color: #e8c069; } .sh-legend span.is-ok .cx-icon { color: #78b07a; } .sh-legend span.is-love .cx-icon { color: #e58fa6; }

/* The sheets: Damage (a part) and Adjust (a store) */
#modal:has(.sh-sheet) .modal-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#modal:has(.sh-sheet) { padding-top: 22px; background: #f4ecd8; }
#modal:has(.sh-sheet)::before { content: ""; position: absolute; top: 8px; left: calc(50% - 20px); width: 40px; height: 4px; border-radius: 999px; background: #c9b78f; }
.sh-sheet { display: flex; flex-direction: column; gap: 12px; color: #231a10; }
.sh-sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#modal .sh-sheet-head h3 { margin: 0; font-size: 22px; font-weight: 700; color: #231a10; }
.sh-now { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; color: #5c4a30; }
.sh-now b { font-size: 22px; color: #231a10; font-variant-numeric: tabular-nums; }
.sh-bar-big { height: 10px; }
.sh-fill-change { position: absolute; top: 0; bottom: 0; }
.sh-fill-change.is-repair { background: repeating-linear-gradient(135deg, #4f7d3f 0 4px, #8fb07a 4px 8px); }
.sh-fill-change.is-damage { background: repeating-linear-gradient(135deg, #a33a2a 0 4px, #d68b7b 4px 8px); }
.sh-after { margin-top: -6px; font-size: 13px; font-weight: 600; }
.sh-after.is-repair { color: #3f6b33; }
.sh-after.is-damage { color: #8a2f20; }
.sh-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: #e8dbb6; }
#modal .sh-seg button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: #5c4a30; font-size: 15px; font-weight: 600; }
#modal .sh-seg button.is-on { background: #fbf7ec; color: #231a10; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.sh-stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 10px; }
#modal .sh-stepper > button { width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 999px; border: 1px solid #b9a77f; background: #fbf7ec; color: #231a10; font-size: 22px; }
.sh-step-value { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: #5c4a30; }
#modal .sh-step-value input { width: 100%; max-width: 140px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: #231a10; font: inherit; font-size: 30px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.sh-presets { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
#modal .sh-presets button { min-height: 44px; border-radius: 999px; border: 1px solid #b9a77f; background: transparent; box-shadow: none; color: #231a10; font-size: 15px; font-weight: 600; }
#modal .sh-presets button.is-on { border-color: #845c0f; background: #845c0f; color: #fbf7ec; }
#modal .sh-presets button[disabled] { opacity: .45; }
.sh-check { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #efe4c3; cursor: pointer; }
.sh-check input { flex-shrink: 0; width: 22px; height: 22px; accent-color: #845c0f; }
.sh-check span { display: flex; flex-direction: column; gap: 1px; }
.sh-check b { font-size: 15px; }
.sh-check small { font-size: 13px; color: #5c4a30; }
#modal button.sh-save { width: 100%; min-height: 54px; border: 0; border-radius: 16px; background: #c18a2a; box-shadow: none; color: #1f1712; font-size: 17px; font-weight: 700; }
#modal button.sh-save[disabled] { opacity: .5; }
.sh-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sh-trio span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; border: 1px solid #ddd0ab; background: #efe4c3; }
.sh-trio small { font-size: 12px; font-weight: 700; color: #5c4a30; }
.sh-trio b { font-size: 22px; font-variant-numeric: tabular-nums; }
.sh-trio .is-up b { color: #3f6b33; }
.sh-trio .is-down b { color: #8a2f20; }
.sh-trio .is-after { background: #e8dbb6; }
.sh-line { margin: 0; font-size: 14px; line-height: 1.4; color: #3d2f1d; }
.sh-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #3d2f1d; }
#modal .sh-field input { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid #b9a77f; background: #fbf7ec; color: #231a10; font: inherit; font-size: 16px; font-weight: 400; }
.sh-sheet .sh-stats { border: 1px solid #ddd0ab; }

@layer editor-pilot {
  @media (max-width: 699px) {
    .modal-backdrop.active:has(> #modal .sh-sheet) { align-items: flex-end !important; padding: 0 !important; }
    #modal:has(.sh-sheet) { width: 100% !important; max-width: none !important; margin: 0 !important; border-radius: 20px 20px 0 0 !important; }
  }
}
@media (max-width: 699px) {
  #modal:has(.sh-sheet) { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* Desktop (design/ship/Desktop): tiles three across, Parts and Stats beside them */
@media (min-width: 900px) {
  .sh-desk-only { display: block; }
  .sh-phone-only { display: none; }
  .sh-helm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 16px; }
  .sh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sh-parts .sh-card-title { padding: 12px 12px 4px; border-bottom: 1px solid #ddd0ab; }
  .sh-part-name { width: 84px; }
  .sh-part-body { flex-direction: row; align-items: center; gap: 12px; }
  .sh-part-body .sh-bar { flex: 1 1 auto; }
  .sh-part-sub { flex-shrink: 0; font-size: 13px; }
  .sh-helm-side .sh-desk-only { display: flex; flex-direction: column; gap: 10px; }
  .sh-stores, .sh-hold, .sh-pills, .sh-dark-row { max-width: 640px; }
}
@media (prefers-reduced-motion: reduce) { .sh-screen * { transition: none !important; } }
/* 04's .favour-stop is a tall labelled tile; here it is a berth dot */
.sh-favour .sh-berths .favour-stop.sh-berth,
.sh-favour .sh-berths .favour-stop.sh-berth:hover,
.sh-favour .sh-berths .favour-stop.sh-berth.selected { min-height: 0; border: 0; background: none; box-shadow: none; transform: none; }
.sh-favour .sh-berths .favour-stop.sh-berth:focus-visible { outline: 2px solid #845c0f; outline-offset: 0; }
.sh-favour .sh-berths.is-dragging .favour-stop:not(.drag-target) { opacity: 1; }
.sh-favour-head h2 { white-space: nowrap; }
.sh-legend { gap: 6px 10px; }
/* The desktop header (113's hook): kind · captain beside the title, the alert at the right */
#deskHead .dk-sub { margin-left: 4px; font-size: 15px; color: #bfae8c; }
#deskHead .dk-aside { margin-left: auto; }
#deskHead button.sh-alert-chip { min-height: 40px !important; padding: 0 14px; border-radius: 12px; border: 1px solid #d9b46a; background: #f3d9a4; color: #3d2a0c; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
@media (min-width: 900px) { body.desk-shell .sh-screen > .sh-alert { display: none; } }
/* Below 380px the three Stores pills fit without the last being cut (spacing-check). */
@media (max-width: 379px) { .sh-pills { gap: 6px; } .sh-pills button { padding: 0 11px; font-size: 13px; } }
