/* Native dialogs keep focus in the active result, review or confirmation. */
#shipyard-mobile .sy-weekly-sell-option { display:flex; align-items:center; gap:10px; min-height:36px; margin:8px 0 12px; color:#c9dbe5; font-size:13px; cursor:pointer; }
#shipyard-mobile .sy-weekly-sell-option input { width:17px; height:17px; flex:0 0 auto; margin:0; accent-color:#efc35e; }
#shipyard-mobile .sy-result-dialog {
    position: fixed; inset: 0; margin: auto; padding: 0;
    width: min(1100px, 94vw); height: min(720px, 92vh); height: min(720px, 92dvh); max-width: none; max-height: none;
    color: #eaf6ff; border: 1px solid #43dfff; border-radius: 4px;
    background: linear-gradient(110deg, #00030877, #000308bb), url('../images/ui/fleet-command/fleet-command-background-mobile-dark-clean.png') center / cover;
    box-shadow: 0 0 24px #00bfff30; font-family: 'Exo 2', 'Segoe UI', sans-serif;
    overflow: hidden;
}
#shipyard-mobile .sy-result-dialog:not([open]) { display: none; }
.sy-result-dialog::backdrop { background: #000b; backdrop-filter: blur(4px); }
#shipyard-mobile #sy-pilot-reveal { border-color: var(--sy-rarity-color, #43dfff); }
#shipyard-mobile #sy-pilot-reveal .sy-reveal-identity { background: radial-gradient(ellipse at center, color-mix(in srgb, var(--sy-rarity-color, #43dfff) 22%, transparent), transparent 70%); }
#shipyard-mobile .sy-recruitment-intro .sy-reveal-card { visibility: hidden; }
#shipyard-mobile #sy-pilot-reveal .btn { transition-property: background-color, border-color, color, box-shadow; }
.sy-rarity-intro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; background: radial-gradient(ellipse, color-mix(in srgb, var(--sy-rarity-color) 45%, #000308) 0%, #000308ee 72%); }
.sy-rarity-signal { width: min(180px, 25vh); aspect-ratio: 1; border: 2px solid var(--sy-rarity-color); border-radius: 50%; box-shadow: 0 0 45px var(--sy-rarity-color), inset 0 0 35px var(--sy-rarity-color); animation: sy-signal-arrive 1.4s ease-out both; }
.sy-rarity-intro p { text-align: center; letter-spacing: .16em; font-size: 14px; }
.sy-rarity-intro .btn { flex: 0 0 auto; }
@keyframes sy-signal-arrive { from { transform: scale(.55); opacity: .15; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sy-rarity-signal { animation: none; } }
#shipyard-mobile .sy-result-dialog .btn { min-height: 44px; padding: 10px 14px; border: 1px solid #38d9ff; border-radius: 3px; background: #01070dcc; color: #b8f3ff; font: 700 13px 'Electrolize', sans-serif; }
#shipyard-mobile .sy-result-dialog .sy-result-primary, #shipyard-mobile #sy-reveal-continue { color: #fff0b9; border-color: #ffc44a; background: linear-gradient(#68431d, #241708); }
#shipyard-mobile .sy-result-dialog .sy-result-sell, #shipyard-mobile #sy-reveal-sell { background: #381316bb; color: #ffb7b0; border-color: #e77d76; }
#shipyard-mobile .sy-result-dialog h2 { font: 700 clamp(18px, 2.4vw, 30px) 'Electrolize', sans-serif; text-transform: uppercase; }
#shipyard-mobile .sy-result-dialog h3 { font: 700 15px 'Electrolize', sans-serif; margin: 0 0 12px; text-transform: uppercase; }
#shipyard-mobile .sy-result-dialog p { color: #c1d8e7; line-height: 1.5; }
.sy-result-kicker { color: #8ae9ff; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
#shipyard-mobile .sy-reveal-backdrop, #shipyard-mobile .sy-reveal-glow { display: none; }
#shipyard-mobile .sy-reveal-container { position: static; height: 100%; padding: 0; display: block; overflow: hidden; }
#shipyard-mobile .sy-reveal-card, .sy-result-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%; height: 100%; max-width: none; padding: 24px; gap: 18px;
    border: 0; border-radius: 0; background: none; animation: none; transform: none; opacity: 1;
}
.sy-reveal-card > .sy-result-kicker, .sy-result-layout > .sy-result-kicker { grid-column: 1 / -1; padding-bottom: 12px; border-bottom: 1px solid #277b96; }
#shipyard-mobile .sy-reveal-identity { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; min-height: 0; text-align: center; }
#shipyard-mobile .sy-reveal-stars { font-size: 26px; margin: 0; }
#shipyard-mobile #sy-reveal-portrait { min-height: 0; height: 100%; margin: 0; display: flex; align-items: center; justify-content: center; }
#shipyard-mobile .sy-reveal-headshot { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; border: 0; border-radius: 0; box-shadow: none; }
#shipyard-mobile .sy-reveal-fallback { font-size: clamp(48px, 12vh, 120px); }
#shipyard-mobile .sy-reveal-name { font: 700 clamp(18px, 2.4vw, 30px) 'Electrolize', sans-serif; margin: 8px 0 3px; }
#shipyard-mobile .sy-reveal-class { margin: 0; }
#shipyard-mobile #sy-reveal-owned { color: #b6cddd !important; font-size: 12px !important; }
#shipyard-mobile .sy-reveal-console { display: flex; flex-direction: column; min-height: 0; gap: 20px; padding: 16px; background: #00030855; border: 1px solid #287c96; }
#shipyard-mobile .sy-reveal-stats { flex: 0 0 auto; }
#shipyard-mobile .sy-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#shipyard-mobile .sy-stat-item, .sy-result-stats > div { display: flex; justify-content: space-between; gap: 6px; background: #000308a0; border: 1px solid #22576a; padding: 9px; border-radius: 2px; }
#shipyard-mobile .sy-reveal-skills { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; }
#shipyard-mobile .sy-skill-nav { flex: 0 0 auto; margin: 0 0 8px; }
#shipyard-mobile .sy-skill-arrow { min-width: 44px; min-height: 44px; background: #00030899; border-color: #2b9bb6; color: #9cedff; }
#shipyard-mobile .sy-skill-detail { flex: 1; min-height: 0; overflow: auto; padding: 14px; background: #000308b0; border: 1px solid #205269; }
#shipyard-mobile .sy-skill-name { color: #ffda80; font-size: 17px; }
#shipyard-mobile .sy-skill-desc { font-size: 14px; line-height: 1.5; }
#shipyard-mobile .sy-skill-meta { color: #b3c6d3; font-size: 12px; line-height: 1.5; margin-top: 12px; }
#shipyard-mobile .sy-reveal-actions, .sy-result-actions { grid-column: 1 / -1; display: flex; gap: 12px; margin: 0; }
#shipyard-mobile .sy-reveal-actions > button, .sy-result-actions > button { flex: 1; }
.sy-result-hero { display: flex; flex-direction: column; align-items: center; min-height: 0; }
.sy-result-hero img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.sy-result-hero h2 { margin: 8px 0; }
.sy-result-hero p { margin: 0; }
.sy-result-summary { align-self: center; padding: 20px; background: #00030899; border: 1px solid #287c96; }
.sy-result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#shipyard-mobile #sy-action-confirm {
    width: min(560px, calc(100vw - 32px)); height: auto; min-height: 0;
    top: 50%; bottom: auto; margin: 0 auto; transform: translateY(-50%);
    max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto;
}
#shipyard-mobile #sy-action-confirm h2 { font-size: clamp(18px, 2vw, 24px); margin: 0 0 16px; }
.sy-confirm-content { padding: 24px; }
.sy-confirm-copy { white-space: pre-line; }
.sy-action-error { color: #ffb5af !important; }
.sy-assignment-layout { display: grid; height: 100%; padding: 20px; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.sy-assignment-layout header, .sy-assignment-layout footer, .sy-assignment-filters { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sy-assignment-layout header h2 { margin: 4px 0 0; }
.sy-assignment-filters { color: #b6cedd; font-size: 13px; }
.sy-assignment-filters select { padding: 8px; min-height: 44px; color: #e6f8ff; background: #020b14; border: 1px solid #24829b; }
.sy-assignment-column { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.sy-assignment-chips { display: flex; flex: 0 0 auto; gap: 4px; margin-bottom: 6px; }
.sy-assignment-chips button { flex: 1; min-width: 0; min-height: 44px; padding: 4px; border: 1px solid #287c96; border-radius: 3px; background: #020b14bb; color: #b8e8f6; font: 600 clamp(10px, 1vw, 13px) 'Exo 2', sans-serif; cursor: pointer; }
.sy-assignment-chips button[aria-pressed="true"] { background: #473215cc; border-color: #ffc44a; color: #fff0b9; }
.sy-assignment-chips button:focus-visible { outline: 2px solid #fff0b9; outline-offset: 1px; }
.sy-assignment-list { min-height: 0; overflow-y: auto; padding: 4px; display: flex; flex-direction: column; gap: 8px; scrollbar-gutter: stable; }
.sy-assignment-item { flex-shrink: 0; display: flex; align-items: center; text-align: left; min-height: 90px; padding: 8px; gap: 12px; border: 1px solid #20627c; border-radius: 3px; background: #00030880; color: #d6eaf8; }
.sy-assignment-item[aria-pressed="true"] { border-color: #ffd36c; background: #413115aa; }
.sy-assignment-item img { width: 86px; height: 70px; object-fit: contain; }
.sy-assignment-item strong, .sy-assignment-item small { display: block; }
.sy-assignment-item strong { font-size: 16px; }
.sy-assignment-item small { font-size: 12px; margin-top: 4px; }
/* One assignment entry in the recruitment header; no Fleet Command navigation. */
#shipyard-mobile #sy-open-assignments-btn { display: block; grid-column: 1; grid-row: 1; align-self: start; justify-self: end; width: auto; max-width: 150px; min-height: 44px; margin: 0 !important; padding: 6px; background: #00030899; border: 1px solid #2bc8ec; font-size: 11px; }
#shipyard-mobile .sy-recruit-header { padding-right: 158px; }
@media (max-height: 540px) and (orientation: landscape) {
    #shipyard-mobile .sy-result-dialog { width: 96vw; height: 96vh; height: 96dvh; }
    #shipyard-mobile .sy-reveal-card, .sy-result-layout { padding: 10px; gap: 8px; }
    .sy-reveal-card > .sy-result-kicker, .sy-result-layout > .sy-result-kicker { padding-bottom: 5px; font-size: 10px; }
    #shipyard-mobile .sy-reveal-stars { font-size: 18px; }
    #shipyard-mobile .sy-reveal-console { padding: 8px; gap: 8px; }
    #shipyard-mobile .sy-result-dialog h3 { margin-bottom: 5px; font-size: 12px; }
    #shipyard-mobile .sy-stat-item { padding: 4px; font-size: 11px; }
    #shipyard-mobile .sy-stat-label, #shipyard-mobile .sy-stat-value { font-size: 11px; }
    #shipyard-mobile .sy-stats-grid { gap: 4px; }
    #shipyard-mobile .sy-skill-detail { padding: 6px; }
    #shipyard-mobile .sy-skill-name { font-size: 13px; }
    #shipyard-mobile .sy-skill-desc { font-size: 11px; }
    #shipyard-mobile .sy-skill-meta { font-size: 10px; margin-top: 4px; }
    #shipyard-mobile .sy-result-dialog .btn { font-size: 11px; padding: 6px; }
    .sy-assignment-layout { padding: 10px; gap: 6px; }
    .sy-assignment-layout header h2 { font-size: 16px !important; }
    .sy-assignment-layout footer p, .sy-assignment-filters { font-size: 11px; margin: 0; }
    .sy-assignment-item { min-height: 74px; padding: 4px; }
    .sy-assignment-item img { width: 64px; height: 58px; }
    .sy-assignment-item strong { font-size: 13px; }
    .sy-result-summary { padding: 8px; font-size: 12px; }
    #shipyard-mobile .sy-recruit-header { padding-right: 116px; }
    #shipyard-mobile #sy-open-assignments-btn { max-width: 110px; font-size: 10px; }
}
