/* RIO mobile category headings and four-category selection v1 */
.route-masthead,
.route-masthead > .wrap {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.route-masthead #routeTitle {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  -webkit-hyphens: none;
  hyphens: none;
  text-wrap: balance;
}
.catalog-controls { flex-wrap: wrap; }
.catalog-controls .catalog-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
  gap: 8px;
}
.catalog-controls .catalog-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}
.catalog-controls .catalog-sort { margin-left: auto; }

#rioFlavourChooser {
  width: min(520px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: calc(100dvh - 32px);
  padding: 20px;
  border: 1px solid #d9ceb8;
  border-radius: 18px;
  background: #fffaf0;
  color: #073e49;
  overflow-y: auto;
  box-shadow: 0 20px 70px #073e4940;
}
#rioFlavourChooser::backdrop { background: #073e4999; }
body.rio-chooser-open { overflow: hidden; }
.rio-chooser-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
#rioFlavourChooser h2 { flex: 1; min-width: 0; margin: 0; font-size: 26px; line-height: 1.2; }
#rioFlavourChooser .rio-chooser-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d9ceb8;
  border-radius: 50%;
  background: #f3ebd9;
  color: #073e49;
  font-size: 26px;
}
.rio-chooser-options { display: grid; gap: 10px; }
#rioFlavourChooser .rio-chooser-options a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 15px 18px;
  border: 1px solid #b7cfc4;
  border-radius: 12px;
  background: #e3f7ec;
  color: #073e49;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}
#rioFlavourChooser .rio-chooser-options a:hover { background: #cdeadd; }
#rioFlavourChooser :focus-visible { outline: 3px solid #b84008; outline-offset: 3px; }

@media (max-width: 680px) {
  .route-masthead { padding: 28px 16px; }
  .route-masthead > .wrap { width: 100%; padding-inline: 0; }
  .route-masthead #routeTitle {
    margin: 0 auto 12px;
    font-size: clamp(22px, 6.6vw, 32px) !important;
    line-height: 1.15;
    letter-spacing: -.02em;
  }
  .route-masthead #routeIntro { max-width: 100%; font-size: 16px; line-height: 1.5; }
  .catalog-controls .catalog-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-controls .catalog-tabs a { padding: 10px 6px; font-size: 14px; }
  .catalog-controls .catalog-sort { width: 100%; min-width: 0; margin-left: 0; }
  #rioFlavourChooser { padding: 16px; }
  #rioFlavourChooser h2 { font-size: 23px; }
  #rioFlavourChooser .rio-chooser-options a { font-size: 16px; }
}
@media (max-width: 320px) {
  .catalog-controls .catalog-tabs { grid-template-columns: minmax(0, 1fr); }
}
