/* Crew additions retain the bridge's Glass tokens and photographed rooms. */
body.glass-bridge.crew-ready .gl-main { grid-template-rows:[hero] minmax(var(--hero-min),1fr) [contacts] auto [panes] auto [detail] auto; }
body.glass-bridge.crew-ready .crew-room { position:absolute; inset:0; height:100%; min-height:0; aspect-ratio:auto; z-index:-1; }
body.glass-bridge.crew-ready .crew-strip { grid-row:contacts; grid-column:1; }
body.glass-bridge.crew-ready .gl-headline { grid-row:hero; grid-column:1; z-index:1; isolation:isolate; justify-content:flex-end; padding:18px; pointer-events:none; }
body.glass-bridge.crew-ready .gl-headline-copy { max-width:50%; text-align:right; }
body.glass-bridge.crew-ready .gl-headline .gl-alert { pointer-events:auto; }
body.glass-bridge.crew-ready .crew-room-caption { display:none; }
.crew-room { position:relative; width:100%; min-width:0; aspect-ratio:2.4; min-height:220px; overflow:clip; isolation:isolate; background:#0e120f; }
.crew-room-world { position:absolute; width:100%; height:100%; inset:0; }
.crew-room-photo,.crew-room-exterior,.crew-room-mask { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; pointer-events:none; }
.crew-room-exterior { object-fit:cover; }
.crew-person { position:absolute; padding:0; border:0; background:none; min-width:44px; min-height:44px; cursor:pointer; pointer-events:auto; aspect-ratio:2/3; z-index:2; }
.crew-person img { width:100%; height:100%; object-fit:contain; filter:brightness(var(--crew-light,.8)) saturate(.78); }
.crew-person:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.crew-room-mask { z-index:3; }
.crew-room-caption { position:absolute; bottom:10px; right:12px; max-width:50%; margin:0; color:#e8e4d6; text-shadow:0 2px 5px #000; font:13px/1.5 'Chakra Petch',sans-serif; z-index:4; }
.crew-room-caption span { display:block; font:11px/1.5 'JetBrains Mono',monospace; color:#c9cfc4; }
.crew-strip { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 0; min-width:0; }
.crew-strip .gl-btn { min-height:44px; }
.crew-strip img { width:30px; height:30px; object-fit:cover; margin-right:7px; }
.crew-strip-label { font:11px 'JetBrains Mono',monospace; color:var(--muted,#9ea596); margin-right:auto; }
.crew-social { flex-basis:100%; margin:0; font:12px/1.5 'Chakra Petch',sans-serif; color:var(--muted); }
.crew-dialog { width:min(1080px,calc(100vw - 32px)); max-height:90dvh; padding:0; border:1px solid #ffffff30; background:#0e120f; color:#e8e4d6; }
.crew-dialog::backdrop { background:#030605bb; backdrop-filter:blur(5px); }
.crew-dialog-head { display:flex; gap:12px; align-items:center; padding:14px 18px; border-bottom:1px solid #ffffff20; }
.crew-dialog-head h2 { margin:0 auto 0 0; font:600 25px 'Rajdhani',sans-serif; }
.crew-dialog-nav { display:flex; flex-wrap:wrap; gap:6px; padding:10px 18px; }
.crew-dialog-body { padding:8px 18px 24px; min-height:220px; }
.crew-dialog .gl-btn,.crew-dialog select,.crew-dialog input { min-height:44px; }
.crew-dialog p { font:15px/1.6 'Chakra Petch',sans-serif; }
.crew-dialog button,.crew-dialog select,.crew-dialog input,.crew-dialog textarea { font-family:'Chakra Petch',sans-serif; }
.crew-dialog input,.crew-dialog select,.crew-dialog textarea { color:#e8e4d6; background:#111b15; border:1px solid #ffffff30; padding:8px; max-width:100%; }
.crew-dialog input:focus-visible,.crew-dialog select:focus-visible,.crew-dialog textarea:focus-visible { outline:2px solid var(--accent); }
.crew-dialog [hidden],.crew-room[hidden],.crew-strip[hidden] { display:none!important; }
.crew-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:12px; }
.crew-card { padding:14px; border:1px solid #ffffff20; background:rgba(8,12,9,.78); min-width:0; }
.crew-card h3 { font:600 24px 'Rajdhani',sans-serif; margin:0; }
.crew-card summary { min-height:44px; padding:12px 0; cursor:pointer; }
.crew-card-head { display:flex; align-items:center; gap:14px; }
.crew-portrait { width:72px; height:88px; object-fit:cover; }
.crew-outfit-preview { display:block; width:auto; max-width:100%; height:220px; margin:8px auto; object-fit:contain; }
.crew-card small,.crew-meta { font:12px/1.6 'JetBrains Mono',monospace; color:#adb5a8; }
.crew-card dl { display:grid; grid-template-columns:1fr auto; gap:5px 12px; font:13px/1.6 'JetBrains Mono',monospace; }
.crew-card dt,.crew-card dd { margin:0; }
.crew-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; align-items:center; }
.crew-form { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; align-items:end; }
.crew-form label { display:grid; gap:5px; font-size:13px; flex:1; min-width:120px; }
.crew-notice { padding:10px 18px; margin:0; color:#f0b35a; }
.crew-chat { display:grid; grid-template-columns:110px minmax(0,1fr); gap:18px; }
.crew-chat .crew-portrait { width:110px; height:140px; }
.crew-chat-transcript { min-height:110px; max-height:360px; overflow:auto; }
.crew-story { margin-bottom:14px; }
.crew-story details { margin-top:10px; }
.crew-story summary { cursor:pointer; min-height:44px; padding:10px 0; }
.crew-cabin { position:relative; aspect-ratio:2.4; background:#151710; overflow:hidden; }
.crew-cabin>img:not(.crew-keepsake) { width:100%; height:100%; object-fit:cover; }
.crew-keepsake { position:absolute; width:8%; height:18%; object-fit:contain; filter:brightness(.75); }
.crew-keepsake-atlas { background:url('../assets/crew/keepsakes-atlas-v1-1024.webp') 0 0/200% 200% no-repeat; }
.crew-keepsake[data-object=first_voyage] { background-position:100% 0; }
.crew-keepsake[data-object=timely_delivery] { background-position:0 100%; }
.crew-keepsake[data-object=crew_trained] { background-position:100% 100%; }
.crew-collection-object { position:static; display:block; width:90px; height:90px; }
.crew-keepsake[data-slot=desk] { left:28%; top:62%; }
.crew-keepsake[data-slot=shelf] { left:75%; top:32%; }
.crew-keepsake[data-slot=bulkhead] { left:81%; top:49%; }
.crew-cabin-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:14px 0; }
.crew-cabin-metrics strong { display:block; font:24px/1.5 'JetBrains Mono',monospace; color:var(--accent,#9fd4a6); }
.crew-meter { display:block; width:100%; height:12px; accent-color:var(--accent,#9fd4a6); }
.crew-berths { display:flex; flex-wrap:wrap; gap:5px; margin:10px 0; }
.crew-berth { width:30px; height:36px; object-fit:cover; border:1px solid #ffffff30; background:#202820; }
.crew-empty { display:inline-grid; place-items:center; color:#9ea596; }
@media(min-width:900px) {
 /* The shell sizes its first screen around the live controls. Crop the room,
    occupants and foreground as one fixed-aspect photograph; never move anchors. */
 body.glass-bridge.crew-ready .crew-room { container-type:size; }
 body.glass-bridge.crew-ready .crew-room-world { width:max(100%,240cqh); height:auto; aspect-ratio:2.4; inset:auto; left:50%; top:50%; transform:translate(-50%,-50%); }
}
@media(max-width:899px) {
 body.glass-bridge.crew-ready .gl-headline { aspect-ratio:2.4; min-height:220px; }
}
@media(max-width:760px) {
 body.glass-bridge.crew-ready .gl-headline { padding:12px; aspect-ratio:1.65; min-height:210px; }
 body.glass-bridge.crew-ready .gl-headline-copy { max-width:60%; }
 .crew-room { aspect-ratio:1.65; min-height:210px; }
 .crew-room-world { width:145%; left:calc(var(--crew-crop,.2) * -45%); }
 .crew-room-caption { max-width:46%; font-size:12px; }
 .crew-dialog { width:calc(100vw - 12px); max-height:95dvh; }
 .crew-dialog-head,.crew-dialog-nav,.crew-dialog-body { padding-left:12px; padding-right:12px; }
 .crew-chat { grid-template-columns:64px minmax(0,1fr); gap:10px; }
 .crew-chat .crew-portrait { width:64px; height:82px; }
 .crew-cabin { aspect-ratio:2.4; }
 .crew-cabin>img:not(.crew-keepsake) { object-fit:contain; }
 .crew-cabin-metrics { grid-template-columns:1fr; }
}
@media(forced-colors:active) {
 .crew-person:focus-visible { outline:2px solid Highlight; }
 .crew-card,.crew-dialog { border:1px solid CanvasText; }
 .crew-room-caption { background:Canvas; color:CanvasText; text-shadow:none; }
}
@media(prefers-reduced-motion:reduce) { .crew-room * { animation:none!important; transition:none!important; } }
