/* Shipyard presentation. The existing recruitment actions own all game state. */
#shipyard-mobile {
    --sy-line: rgba(44, 214, 255, .65);
    --sy-muted: #a4bdd1;
    font-family: 'Exo 2', 'Segoe UI', sans-serif;
    position: relative;
    box-sizing: border-box;
    padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    background: linear-gradient(115deg, rgba(0, 2, 8, .12), rgba(0, 2, 8, .25)), url('../images/ui/fleet-command/fleet-command-background-mobile-dark-clean.png') center / cover;
    color: #e9f4ff;
    overflow: hidden;
    gap: 10px;
}
#shipyard-mobile.active { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto minmax(0, 1fr); }
#shipyard-mobile.active:has(.sy-mode-btn[data-mode="pilots"].active) { grid-template-rows: auto auto minmax(0, auto); align-content: safe center; }
#shipyard-mobile #sy-pilots-content { height: calc(clamp(360px, 58vw, 500px) + 56px); max-height: 100%; }
#shipyard-mobile * { box-sizing: border-box; }
#shipyard-mobile::before { content: ''; position: absolute; inset: 5px; border: 1px solid #3edaff; box-shadow: inset 0 0 8px #009dff35, 0 0 7px #00bfff50; pointer-events: none; }
#shipyard-mobile .sy-header { grid-column: 1 / 3; grid-row: 1; padding: 0; background: none; border: 0; gap: 22px; }
#shipyard-mobile .sy-title-lockup { flex: 1; }
#shipyard-mobile .sy-title { text-align: left; text-transform: uppercase; font-size: clamp(19px, 2.3vw, 32px); letter-spacing: .14em; }
#shipyard-mobile .sy-eyebrow { color: #72d9ef; text-transform: uppercase; letter-spacing: .18em; font-size: 10px; }
#shipyard-mobile .sy-back-btn { margin: 0; padding: 8px 12px; min-height: 44px; border: 1px solid var(--sy-line); border-radius: 2px; }
#shipyard-mobile .sy-resource-bar { grid-column: 3; grid-row: 1; background: none; border: 0; padding: 0; gap: 16px; align-items: center; justify-content: flex-end; }
#shipyard-mobile .sy-resource { color: #e8f5ff; font: 16px 'Share Tech Mono', monospace; white-space: nowrap; }
#shipyard-mobile .sy-mode-toggle { grid-column: 1 / -1; grid-row: 2; margin: 0 auto; width: min(520px, 65%); border: 0; background: none; gap: 8px; border-radius: 0; }
#shipyard-mobile .sy-mode-btn, #shipyard-mobile .sy-tier-btn { border: 1px solid var(--sy-line); border-radius: 2px; background: linear-gradient(180deg, #01070d99, #010306cc); color: #8ceeff; min-height: 44px; padding: 8px 12px; }
#shipyard-mobile .sy-mode-btn.active, #shipyard-mobile .sy-tier-btn.active { color: #ffe48d; background: linear-gradient(180deg, #302814, #151812); border-color: #ffd15c; box-shadow: inset 0 0 14px #e9a82920, 0 0 8px #ffc43e30; }
#shipyard-mobile .sy-content-area { grid-column: 1 / -1; grid-row: 3; display: grid; min-width: 0; min-height: 0; padding: 0; overflow: hidden; gap: 12px; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); grid-template-rows: auto minmax(0, 1fr); }
#shipyard-mobile .sy-tier-row { grid-column: 1 / -1; padding: 0; gap: 8px; overflow: visible; }
#shipyard-mobile .sy-preview-panel, #shipyard-mobile .sy-purchase-area, #shipyard-mobile .sy-recruit-card { min-height: 0; min-width: 0; border: 1px solid var(--sy-line); border-radius: 3px; background: linear-gradient(135deg, #00030830, #00030866); box-shadow: inset 0 0 24px #00000030; }
#shipyard-mobile .sy-preview-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 14px; gap: 8px; }
#shipyard-mobile .sy-class-info { padding: 0; text-align: left; }
#shipyard-mobile .sy-class-title, #shipyard-mobile .sy-recruit-title, #shipyard-mobile .sy-console-title { font: 700 clamp(13px, 1.5vw, 21px) 'Electrolize', sans-serif; text-transform: uppercase; letter-spacing: .07em; margin: 0 0 5px; }
#shipyard-mobile .sy-class-desc, #shipyard-mobile .sy-recruit-desc { font-size: 12px; color: var(--sy-muted); }
#shipyard-mobile .sy-ship-grid { min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); padding: 0; gap: 10px; }
#shipyard-mobile .sy-ship-card { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; min-height: 0; padding: 8px 12px; text-align: left; border: 1px solid #257194; border-radius: 2px; background: linear-gradient(180deg, transparent 55%, #000308a6); }
#shipyard-mobile .sy-ship-img { min-height: 0; height: 100%; aspect-ratio: auto; margin: 0; position: relative; }
#shipyard-mobile .sy-ship-img::before { content: ''; position: absolute; bottom: 3%; width: 70%; height: 13%; border: 1px solid #17b8f780; border-radius: 50%; background: radial-gradient(ellipse, #06baff55, transparent 68%); box-shadow: 0 0 0 5px #00bfff10, 0 0 0 9px #00bfff12; }
#shipyard-mobile .sy-ship-img img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: auto; position: relative; filter: none; }
#shipyard-mobile .sy-ship-name { font: 700 clamp(12px, 1.3vw, 18px) 'Electrolize', sans-serif; text-transform: uppercase; letter-spacing: .04em; }
#shipyard-mobile .sy-ship-desc { display: block; color: var(--sy-muted); font-size: 12px; line-height: 1.4; }
#shipyard-mobile .sy-preview-note { text-align: center; color: #bad3e5; font-size: 12px; margin: 0; }
#shipyard-mobile .sy-purchase-area { display: flex; flex-direction: column; padding: clamp(14px, 2vw, 30px); text-align: left; gap: 16px; }
#shipyard-mobile .sy-console-title { padding-bottom: 16px; border-bottom: 1px solid #25617a; }
#shipyard-mobile .sy-fleet-status { padding: 10px 0; color: #ebf7ff; font-size: 16px; margin: 0; }
#shipyard-mobile .sy-cost-summary { margin: 0; border-block: 1px solid #25617a; padding: 18px 0; display: grid; gap: 14px; }
#shipyard-mobile .sy-cost-summary > div { display: flex; justify-content: space-between; gap: 12px; }
#shipyard-mobile dt { color: var(--sy-muted); }
#shipyard-mobile dd { margin: 0; text-align: right; font-family: 'Share Tech Mono', monospace; }
#shipyard-mobile .sy-text-action { min-height: 44px; border: 0; padding: 6px 0; background: none; color: #7fe9ff; text-align: left; font-size: 14px; cursor: pointer; }
#shipyard-mobile .sy-purchase-btn, #shipyard-mobile .sy-token-actions .btn-primary { background: linear-gradient(180deg, #754314, #312009); border: 1px solid #ffc64c; color: #fff1ba; box-shadow: inset 0 0 18px #ffb62722, 0 0 10px #ffb62725; border-radius: 3px; }
#shipyard-mobile .sy-purchase-btn { margin-top: auto; min-height: 64px; padding: 10px; font-size: clamp(12px, 1.3vw, 18px); white-space: normal; }
#shipyard-mobile .sy-purchase-note { margin: 0; color: var(--sy-muted); opacity: 1; font-size: 12px; }
#shipyard-mobile button:disabled { opacity: .5; cursor: default; }
#shipyard-mobile button:focus-visible { outline: 2px solid #fff4b7; outline-offset: 3px; }
#shipyard-mobile .sy-recruit-card { grid-column: 1 / -1; margin: 0; padding: 16px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 12px 24px; }
#shipyard-mobile .sy-recruit-header { grid-column: 1; grid-row: 1; text-align: left; padding: 0; margin: 0; border: 0; }
#shipyard-mobile .sy-pilot-showcase { grid-column: 1; grid-row: 2 / -1; min-width: 0; min-height: 0; margin: 0; padding: 0 36px; }
#shipyard-mobile .sy-recruit-card { align-self: start; height: 100%; max-height: clamp(360px, 58vw, 500px); }
#shipyard-mobile .sy-pilot-carousel { height: 100%; min-height: 0; padding: 0; align-items: center; }
#shipyard-mobile .sy-pilot-showcase-card { flex: 0 0 calc((100% - 10px) / 2); display: flex; flex-direction: column; min-height: 0; border-radius: 2px; background: linear-gradient(180deg, #00030818, #00030855); box-shadow: none; }
#shipyard-mobile .sy-pilot-showcase-card::before { background: none; }
#shipyard-mobile .sy-pilot-showcase-portrait { flex: 1; min-height: 0; width: 100%; height: auto; aspect-ratio: auto; border-radius: 3px; border: 0; box-shadow: none; background: none; }
#shipyard-mobile .sy-pilot-showcase-img { width: 100%; height: 100%; object-fit: contain; }
#shipyard-mobile .sy-pilot-showcase-card { aspect-ratio: 1 / 1.3; height: auto; max-height: 100%; padding: 6px; }
#shipyard-mobile .sy-pilot-showcase-portrait { aspect-ratio: 1; max-height: 100%; }
#shipyard-mobile .sy-pilot-nameplate { flex: 0 0 auto; min-height: 0; margin-top: 4px; padding: 6px 4px; background: #000308ba; }
#shipyard-mobile .sy-universal-token-btn { background: #000308a6; border: 1px solid #43dfff; color: #b2f1ff; box-shadow: inset 0 0 12px #00cfff12; }
#shipyard-mobile .sy-recruit-info { grid-column: 2; grid-row: 1 / 3; align-self: start; margin: 0; padding: 0; }
#shipyard-mobile .sy-recruit-row { padding: 10px 0; border-bottom: 1px solid #215069; gap: 12px; }
#shipyard-mobile .sy-recruit-value { text-align: right; }
#shipyard-mobile .sy-pity-note { margin-top: 10px; }
#shipyard-mobile #sy-pity-progress { width: 100%; height: 8px; margin-top: 10px; accent-color: #ffd05a; }
#shipyard-mobile #sy-rates-btn { grid-column: 2; grid-row: 3; }
#shipyard-mobile .sy-token-actions { grid-column: 2; grid-row: 4; display: grid; gap: 8px; margin: 0; }
#shipyard-mobile .sy-recruit-btn { min-height: 48px; padding: 8px; font-size: 12px; border-radius: 3px; }
#shipyard-mobile .sy-token-hint { display: none; }
#shipyard-mobile .sy-recruit-header::after { content: 'Preview only · Recruitment awards a random pilot.'; display: block; margin-top: 5px; font-size: 12px; color: var(--sy-muted); }
/* Assignment entry returns with the approved in-Shipyard drawer in slice 2. */
#shipyard-mobile #sy-open-assignments-btn, #shipyard-mobile #sy-open-assignments-btn + .sy-token-hint { display: none; }
#shipyard-mobile .sy-info-dialog { color: #eaf6ff; background: linear-gradient(#000308bb, #000308e8), url('../images/ui/fleet-command/fleet-command-background-mobile-dark-clean.png') center / cover; border: 1px solid #44d8ff; border-radius: 4px; padding: 26px; width: min(440px, 90vw); max-height: 88vh; max-height: 88dvh; overflow: auto; margin: auto 3vw auto auto; }
.sy-info-dialog::backdrop { background: #000a; backdrop-filter: blur(4px); }
.sy-info-dialog .sy-dialog-close { float: right; width: 44px; height: 44px; color: #80ebff; background: #103048; border: 1px solid #26748b; cursor: pointer; }
.sy-info-dialog h3 { clear: both; }
#sy-rates-dialog .sy-recruit-rates { clear: both; }
#sy-rates-dialog .sy-rate-stars { width: 104px; }
.sy-info-dialog p { margin-top: 18px; font-size: 13px; line-height: 1.6; color: #b8cede; }
@media (max-height: 540px) and (orientation: landscape) {
    #shipyard-mobile { padding-block: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-bottom)); gap: 5px; }
    #shipyard-mobile.active { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 44px minmax(0, 1fr); }
    #shipyard-mobile.active:has(.sy-mode-btn[data-mode="pilots"].active) { grid-template-rows: 44px minmax(0, auto); }
    #shipyard-mobile #sy-pilots-content { height: calc(clamp(360px, 58vw, 500px) + 49px); }
    #shipyard-mobile .sy-header { grid-column: 1; gap: 8px; }
    #shipyard-mobile .sy-eyebrow { display: none; }
    #shipyard-mobile .sy-title { font-size: 16px; letter-spacing: .05em; }
    #shipyard-mobile .sy-mode-toggle { grid-row: 1; grid-column: 2; width: 100%; }
    #shipyard-mobile .sy-resource-bar { display: grid; gap: 1px; justify-content: end; }
    #shipyard-mobile .sy-resource { font-size: 12px; }
    #shipyard-mobile .sy-mode-btn, #shipyard-mobile .sy-tier-btn { font-size: 11px; padding: 5px; }
    #shipyard-mobile .sy-content-area { grid-row: 2; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 5px 8px; }
    #shipyard-mobile .sy-preview-panel { padding: 7px; gap: 4px; }
    #shipyard-mobile .sy-class-desc, #shipyard-mobile .sy-ship-desc, #shipyard-mobile .sy-recruit-desc { display: none; }
    #shipyard-mobile .sy-ship-grid { gap: 5px; }
    #shipyard-mobile .sy-ship-card { padding: 3px 7px; }
    #shipyard-mobile .sy-ship-name { font-size: 11px; }
    #shipyard-mobile .sy-preview-note, #shipyard-mobile .sy-token-hint { font-size: 10px; }
    #shipyard-mobile .sy-purchase-area { padding: 10px; gap: 5px; }
    #shipyard-mobile .sy-console-title { padding-bottom: 5px; font-size: 13px; }
    #shipyard-mobile .sy-fleet-status { padding: 4px 0; font-size: 12px; }
    #shipyard-mobile .sy-cost-summary { padding: 7px 0; gap: 4px; font-size: 12px; }
    #shipyard-mobile .sy-text-action { font-size: 11px; }
    #shipyard-mobile .sy-purchase-btn { min-height: 44px; font-size: 11px; }
    #shipyard-mobile .sy-purchase-note { font-size: 10px; }
    #shipyard-mobile .sy-recruit-card { padding: 8px; gap: 4px 12px; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); }
    #shipyard-mobile .sy-recruit-row { padding: 4px 0; font-size: 11px; }
    #shipyard-mobile .sy-recruit-label, #shipyard-mobile .sy-recruit-value { font-size: 11px; line-height: 1.2; }
    #shipyard-mobile #sy-pity-progress { display: block; margin-top: 4px; }
    #shipyard-mobile .sy-pity-note { margin-top: 4px; font-size: 10px; }
    #shipyard-mobile .sy-pilot-nameplate { padding: 4px; min-height: 0; margin-top: 2px; }
    #shipyard-mobile .sy-recruit-header::after { font-size: 10px; margin-top: 2px; }
    #shipyard-mobile .sy-pilot-showcase-name { font-size: 12px; }
    #shipyard-mobile .sy-pilot-showcase-role, #shipyard-mobile .sy-pilot-showcase-tier { font-size: 10px; }
    #shipyard-mobile .sy-recruit-btn { min-height: 44px; font-size: 10px; padding: 4px; }
    #shipyard-mobile .sy-token-actions { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    #shipyard-mobile *, #sy-rates-dialog { scroll-behavior: auto; transition: none; animation: none; }
}
