/* Scoped chat presentation, independent of full-chat font preferences. */
.chat-panel:has(.chat-messages){display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;background:#080808}
#simfest-chat.chat-messages{flex:1;min-height:0;min-width:0;width:100%;overflow-y:auto;padding:.5rem .75rem;font-family:Arial,Helvetica,sans-serif;font-size:clamp(18px,1.4vw,28px);line-height:1.3;font-weight:600;color:#fff;overflow-wrap:anywhere;scrollbar-width:thin}
.chat-messages .chat-message{padding:.18em 0}.chat-messages .chat-name{color:#80deea;font-weight:800}.chat-messages .action{font-style:italic}
.chat-panel:has(.chat-messages) #chat-status{flex:none;margin:0;padding:.5rem .75rem;font-size:.85rem;color:#bbb}
.leg-chat-grid>.upcoming-panel{min-height:0;overflow-y:auto}

/* Crew display: stream above chat, retaining the larger video row. */
.secondary-column:has(>.stream-panel):has(>.chat-panel){grid-template-rows:minmax(0,1fr) 14rem}
@media(max-width:1000px),(max-height:650px){.secondary-column:has(>.stream-panel):has(>.chat-panel){grid-template-rows:360px 240px}}

/* Standard crew display: compact flight strip, with the clock in the metrics. */
#display:has(.crew-time-now){grid-template-rows:auto minmax(0,1fr) 1.5rem}
#display:has(.crew-time-now) .current-card{padding:.2rem .65rem;gap:.2rem .7rem}
#display:has(.crew-time-now) .flight-metrics{grid-template-columns:repeat(7,minmax(0,1fr));gap:.25rem .5rem}
#display:has(.crew-time-now) .flight-heading h2{font-size:1.2rem;margin:.1rem 0}
#display:has(.crew-time-now) .flight-heading p{height:1.2rem;font-size:.7rem}
#display:has(.crew-time-now) .flight-metrics strong{font-size:.9rem;margin:.15rem 0}
#display:has(.crew-time-now) .flight-metrics span,#display:has(.crew-time-now) .flight-metrics small{font-size:.65rem}
#display:has(.crew-time-now) .aircraft-instruments{padding-top:.2rem;gap:.2rem .6rem}
#display:has(.crew-time-now) .aircraft-instruments span{font-size:.63rem;margin-bottom:.05rem}
#display:has(.crew-time-now) .aircraft-instruments strong{font-size:.85rem}
#display:has(.crew-time-now) .current-crew,#display:has(.crew-time-now) .current-visitors{height:1rem;font-size:.75rem;padding-top:.1rem}
#display:has(.crew-time-now) #giveaway-prize{height:1.8rem;font-size:.8rem}
#display:has(.crew-time-now) #fullscreen{font-size:1rem;padding:0 .4rem;line-height:1.2}
@media(max-width:1000px),(max-height:650px){#display:has(.crew-time-now) .flight-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
