/* Product workflow: variance 3, motion 2, density 4. Existing scenic assets,
   shared 44px returns and mobile system-safe regions remain unchanged. */
/* Home has history on the left and three actions on the right. Conversation has one return. */
.app-shell.mode-messages #assistantPanel { display: none !important; }
.route-screen.is-ongoing-route .route-header { display: none; }
.route-screen.is-ongoing-route #routeGuide[data-kind=""] { display: none !important; }
.route-ongoing-team {
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #20251f;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
}
.route-ongoing-team[hidden] { display: none !important; }
.route-track-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.route-track-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.route-track-legend i { width: 16px; height: 3px; border-radius: 2px; background: #2b6847; }
#routeLegendWalked i { background: #df7d3e; }
#routeTrackLegend[hidden], #routeLegendWalked[hidden] { display: none !important; }
body.scene-home #assistantPanel:not(.is-chatting) > .assistant-header { display: contents; }
body.scene-home .assistant-conversation-heading { display: none; }
.assistant-screen.is-chatting > .assistant-header {
  display: flex;
  align-items: center;
  min-height: 68px;
  height: 68px;
  padding: 10px 0;
}
.assistant-screen.is-chatting .immersive-nav { display: none !important; }
.assistant-conversation-heading { display: flex; align-items: center; min-width: 0; gap: 12px; }
.assistant-conversation-heading .assistant-brand { min-width: 0; }
.assistant-screen.is-chatting .assistant-conversation-heading .assistant-brand strong { display: inline; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.assistant-conversation-heading #assistantHome { display: grid !important; }
.immersive-nav button:focus-visible { outline: 2px solid #181818; outline-offset: 3px; }
.immersive-nav .ui-icon { display: block; width: 24px; height: 24px; fill: currentColor; }
#assistantOptions > .assistant-header-action { min-height: 44px; }
body.scene-home .immersive-dock #assistantSuggestions > button { white-space: normal; }
body.scene-home .immersive-dock #assistantSuggestions > button > span {
  white-space: normal;
  line-height: 16px;
  text-align: left;
}
body.scene-home .immersive-dock #assistantSuggestions > button > .ui-icon {
  flex: none;
  width: 14px;
  height: 14px;
  color: inherit;
}

#personaOverlay .persona-preference-group { margin: 0 0 24px; }
#personaOverlay .persona-preference-group h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
  color: #181818;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
#personaOverlay .persona-preference-group h2 > span {
  color: #767676;
  font-size: 12px;
  font-weight: 400;
}
#personaOverlay .persona-difficulties,
#personaOverlay .persona-play-styles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
#personaOverlay .persona-play-styles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#personaOverlay :is(.persona-difficulties, .persona-play-styles) button {
  min-width: 0;
  min-height: 44px;
  padding: 10px 6px;
  border: 0;
  border-radius: 14px;
  background: #f3f3f3;
  color: #181818;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}
#personaOverlay .persona-difficulties button.selected { background: #181818; color: #fff; }
#personaOverlay .persona-play-styles button.selected { background: #d5fa44; color: #181818; }
#personaOverlay .persona-gender-row { display: block; width: 100%; margin-bottom: 24px; }
#personaOverlay .persona-genders { width: 100%; }
#personaOverlay .persona-role-options { margin: 0 0 8px; }
#personaOverlay .persona-role-options > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: #181818;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  list-style: none;
  cursor: pointer;
}
#personaOverlay .persona-role-options > summary::-webkit-details-marker { display: none; }
#personaOverlay .persona-role-options > summary > span {
  margin-left: auto;
  color: #686868;
  font-size: 12px;
  font-weight: 400;
}
#personaOverlay .persona-role-options > summary::after { content: '+'; font-size: 18px; font-weight: 400; }
#personaOverlay .persona-role-options[open] > summary { margin-bottom: 12px; }
#personaOverlay .persona-role-options[open] > summary::after { content: '−'; }
#personaOverlay .persona-role-options > summary:focus-visible { outline: 2px solid #181818; outline-offset: 3px; }

.app-shell.mode-team :is(.sidebar,.assistant-screen,.route-screen,.profile-screen,.guide-screen,.empty-state,.chat) { display: none !important; }
.app-shell:not(.mode-team) #teamPanel,
#teamPanel[hidden] { display: none !important; }
.app-shell.mode-team .main { display: block; height: 100%; min-height: 0; overflow: hidden; background: #fff; }
.app-shell.my-teams-view #newButton { display: none; }
.team-list-placeholder { display: none; }
.app-shell.my-teams-view #emptyState > :not(.team-list-placeholder) { display: none; }
.app-shell.my-teams-view #emptyState .team-list-placeholder { display: block; }
.team-list-placeholder p { color: #686868; font-size: 14px; line-height: 24px; }
.assistant-team-suggestions { display: grid; gap: 10px; margin-top: 20px; }
.assistant-team-suggestions > h3 { margin: 0 0 2px; color: #181818; font-size: 14px; font-weight: 600; line-height: 22px; }
.assistant-team-draft { border-color: transparent; background: #f7f7f7; }
.assistant-team-draft > button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #181818;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.assistant-team-draft > button:hover { background: #333; }

@media (min-width: 681px) {
  body.immersive-navigation.scene-home .app-shell:has(> .rail:not([inert]):not([hidden])) .immersive-nav { display: flex; }
  body.scene-home .app-shell.mode-agent > .rail :is(#routesTab, .rail-bottom) { display: none; }
  #personaOverlay :is(.persona-preference-group,.persona-role-options,.persona-gender-row) { width: 100%; max-width: 540px; margin-inline: auto; }
}
@media (max-width: 360px) {
  #personaOverlay .persona-play-styles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  #personaOverlay :is(.persona-difficulties,.persona-play-styles) button { transition: none; }
}

/* One preference selection language across all four choice groups. */
#personaOverlay .persona-genders { gap: 8px; padding: 0; background: transparent; }
#personaOverlay :is(.persona-genders, .persona-difficulties, .persona-play-styles) button,
#personaOverlay .persona-card {
  border: 0;
  border-radius: 14px;
  background: #f3f3f3;
  box-shadow: none;
  color: #181818;
}
#personaOverlay :is(.persona-genders, .persona-difficulties, .persona-play-styles) button:hover,
#personaOverlay .persona-card:hover { background: #ebebeb; }
#personaOverlay :is(.persona-genders, .persona-difficulties, .persona-play-styles) button.selected,
#personaOverlay :is(.persona-genders, .persona-difficulties, .persona-play-styles) button.selected:hover,
#personaOverlay .persona-card.selected,
#personaOverlay .persona-card.selected:hover {
  border: 0;
  background: #d5fa44;
  box-shadow: none;
  color: #181818;
}

/* History stays on the left; route, team and profile actions share the right. */
.immersive-nav-left { display: flex; align-items: center; gap: 8px; }
body.scene-home .immersive-nav > div { flex: none; min-width: 0; }
body.scene-home .immersive-nav button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
@media(max-width:360px) { .immersive-nav-right { gap:10px; } }

/* The route and team entries open trip lists, separate from chat history. */
.app-shell.mode-journeys :is(.sidebar,.assistant-screen,.route-screen,.profile-screen,.guide-screen,.empty-state,.chat) { display:none!important; }
.app-shell:not(.mode-journeys) #journeyPanel,
#journeyPanel[hidden] { display:none!important; }
.app-shell.mode-journeys .main { display:block; height:100%; min-height:0; overflow:hidden; background:#fff; }
