/* shell.css: the frame around every screen, the same as the phone app's: the status strip (the sandbox label sits where the phone's
   status bar is), the top app bar, the five-tab bottom navigation bar, the splash and Home's header and search. On a wide screen the
   app is the same phone-width column, centred (no side rail, no second layout). Numbers: parity/specs/design.md. */

/* ------------------------------------------------------------------ the phone column */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--col-w));
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--background);
}
@media (min-width: 520px) {
  html {
    background: #dde2e7;
  }
  .app {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 10px 44px rgba(0, 0, 0, 0.16);
  }
}

/* Where the phone shows its status bar. It carries the one honest line: this is a preview, not the City. */
.statusbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: calc(var(--status-h) + var(--safe-top));
  padding: var(--safe-top) var(--gutter) 0;
  background: var(--background);
  color: var(--on-surface-variant);
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-align: center;
}

/* ------------------------------------------------------------------ top app bars (CityTopBar and the black bars) */
.app-bar-slot {
  position: sticky;
  top: calc(var(--status-h) + var(--safe-top));
  z-index: 50;
  flex: none;
}
.app-bar-slot:empty {
  display: none;
}
.app-bar {
  display: flex;
  align-items: center;
  height: var(--topbar-h);
  background: var(--background);
  color: var(--on-surface);
}
.app-bar__side {
  display: flex;
  align-items: center;
  flex: none;
}
.app-bar__lead {
  padding-left: 4px;
}
.app-bar__actions {
  padding-right: 4px;
}
.app-bar__title {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}
.app-bar--no-lead .app-bar__title {
  padding-left: 16px;
}
.app-bar__title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--bar-title-size, 20px);
  line-height: 26px;
  font-weight: 700;
  letter-spacing: var(--bar-title-ls, 0);
}
.app-bar__subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 15px;
  color: var(--on-surface-variant);
}
.app-bar__btn {
  color: inherit;
}
.app-bar--black,
.app-bar--planner {
  background: #000;
  color: #fff;
}
.app-bar--black .icon-btn:hover,
.app-bar--planner .icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.app-bar--black .app-bar__title-text {
  font-size: var(--bar-title-size, 20px);
  font-weight: 900;
  letter-spacing: var(--bar-title-ls, 4px);
  text-transform: uppercase;
}
.app-bar--black .app-bar__title-text {
  line-height: 24px;
}
.app-bar--black .app-bar__subtitle {
  margin-top: 3px;
  font-size: 10px;
  line-height: 24px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.75);
}
.app-bar--centre {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}
.app-bar--centre .app-bar__title {
  align-items: center;
  max-width: 100%;
  padding: 0;
  text-align: center;
}
.app-bar--centre .app-bar__actions {
  justify-content: flex-end;
}
.app-bar--centre .app-bar__lead {
  justify-content: flex-start;
  min-width: 52px;
}
.app-bar--centre.app-bar--no-lead .app-bar__lead {
  min-width: 52px;
}
.app-bar--planner .app-bar__title-text {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.app-bar--planner .app-bar__subtitle {
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
}

/* A fixed-dark screen (the trip planner, Where to? search): the page itself is #0A0A0A, not a theme. */
body[data-screen='dark'] .app {
  background: #0a0a0a;
  color: #fff;
}

/* ------------------------------------------------------------------ main area */
.main {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 16px var(--gutter) 24px;
  outline: none;
}
.main > h1:focus,
.main h1:focus {
  outline: none;
}
.main--in {
  animation: screen-in 0.7s ease both;
}
@keyframes screen-in {
  from {
    opacity: 0;
  }
}
body[data-nav='on'] .main {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}
/* The height free for a full-screen map or list: below the status strip and the bar, above the bottom bar. */
body {
  --fill-h: calc(100dvh - var(--status-h) - var(--safe-top));
}
body[data-bar='on'] {
  --fill-h: calc(100dvh - var(--status-h) - var(--safe-top) - var(--topbar-h));
}
body[data-bar='on'][data-nav='on'],
body[data-bar='black'][data-nav='on'] {
  --fill-h: calc(100dvh - var(--status-h) - var(--safe-top) - var(--topbar-h) - var(--tabbar-h) - var(--safe-bottom));
}
body[data-bar='none'][data-nav='on'] {
  --fill-h: calc(100dvh - var(--status-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom));
}
body[data-bar='black'] {
  --fill-h: calc(100dvh - var(--status-h) - var(--safe-top) - var(--topbar-h));
}

/* ------------------------------------------------------------------ bottom navigation bar (Material NavigationBar, five tabs) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 55;
  width: min(100%, var(--col-w));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--sc-lowest);
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  transform: translateX(-50%);
  overflow: hidden;
}
/* The phone's five items are 84 px apart (centres at 38, 122, 206, 290, 374 on a 412 px screen): a little wider than the screen. */
.bottom-nav__inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: calc(100% + 8px);
  margin-left: -4px;
}
.bottom-nav[hidden] {
  display: none;
}
.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 12px 0 16px;
  background: transparent;
  border: 0;
  color: var(--on-surface-variant);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
}
.bottom-nav__pill {
  display: grid;
  place-items: center;
  width: 64px;
  height: 32px;
  border-radius: 16px;
  transition: background-color 0.1s;
}
.bottom-nav__item:hover .bottom-nav__pill {
  background: rgba(24, 28, 30, 0.06);
}
.bottom-nav__item[aria-current='page'] {
  color: var(--on-surface);
}
.bottom-nav__item[aria-current='page'] .bottom-nav__pill {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.bottom-nav__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ splash (the app's launch screen) */
.splash {
  position: fixed;
  inset: calc(var(--status-h) + var(--safe-top)) 0 0 0; /* the status strip stays visible above it, as the phone's status bar does */
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--navy-deep);
  color: #fff;
  transition: opacity 0.35s;
  cursor: pointer;
}
.splash--out {
  opacity: 0;
  pointer-events: none;
}
.splash__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  animation: ring 2.4s linear infinite;
}
.splash__ring--a {
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
}
.splash__ring--b {
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  background: rgba(255, 255, 255, 0.04);
  animation-delay: 1.2s;
}
@keyframes ring {
  from {
    transform: scale(0.6);
    opacity: 0.18;
  }
  to {
    transform: scale(1.4);
    opacity: 0;
  }
}
.splash__centre {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.splash__logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.splash__flame {
  display: grid;
  margin-left: -12px;
}
.splash__forest {
  position: absolute;
  top: calc(50% - 14px - 18px);
  left: calc(50% - 14px + 18px);
  color: var(--live);
  display: grid;
}
.splash__eyebrow {
  margin-top: 24px;
  font-size: 13px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: 3px;
}
.splash__name {
  margin-top: 32px;
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
}
.splash__tag {
  margin-top: 10px;
  font-size: 16px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.72);
}
.splash__dots {
  position: absolute;
  bottom: 64px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.splash__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: bounce 0.5s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
.splash__dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.splash__dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes bounce {
  to {
    transform: translateY(-8px);
  }
}
.splash__credit {
  position: absolute;
  right: 32px;
  bottom: 100px;
  left: 32px;
  font-size: 11px;
  line-height: 15px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* ------------------------------------------------------------------ Home's header row and the search panel */
.home-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}
.home-head__place {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 6px;
  min-width: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
}
.home-head__place .icon {
  color: var(--primary);
}
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 24px;
  background: var(--sc-high);
  color: var(--on-surface);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.search-btn .icon {
  color: var(--primary);
}
.profile-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  text-decoration: none;
}
.home-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.home-body--in,
.msearch--in {
  animation: panel-in 0.3s ease-out both;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-10%);
  }
}

.msearch {
  display: flex;
  flex-direction: column;
  min-height: calc(var(--fill-h) - 40px);
}
.msearch__top {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 0 4px;
}
.msearch__top .ofield {
  flex: 1;
}
.msearch__top .ofield__input {
  font-size: 17px;
}
.msearch__close {
  min-height: 48px;
  padding: 0 12px;
  font-size: 16px;
}
.msearch__body {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}
.msearch__h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
}
.msearch__h .text-action {
  font-size: 15px;
}
.msearch__note {
  font-size: 13px;
  line-height: 18px;
  color: var(--on-surface-variant);
}
.msearch__recent {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 0 0 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
}
.msearch__recent > .icon {
  color: var(--on-surface-variant);
}
.msearch__recent > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msearch__intro {
  margin-top: 20px;
}
.msearch__intro p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 21px;
  color: var(--on-surface-variant);
}
.msearch__try {
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface-variant);
}
.msearch__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 1px 8px;
}
.msearch__status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  font-size: 15px;
  color: var(--on-surface-variant);
}
.msearch__empty h3 {
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
}
.msearch__empty p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 21px;
  color: var(--on-surface-variant);
}
.msearch__group-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 6px;
}
.msearch__group-disc {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 32, 69, 0.12);
  color: var(--primary);
}
.msearch__group-h b {
  font-size: 16px;
  font-weight: 700;
}
.msearch__group-h span:last-child {
  margin-left: -4px;
  font-size: 14px;
  color: var(--on-surface-variant);
}
.msearch__hit {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 8px 4px 8px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.msearch__hit:hover {
  background: rgba(24, 28, 30, 0.04);
}
.msearch__hit:active {
  background: rgba(24, 28, 30, 0.1);
}
.msearch__hit-text {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}
.msearch__hit-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.msearch__hit-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 24px;
  color: var(--on-surface-variant);
}
.msearch__hit mark {
  background: rgba(0, 32, 69, 0.16);
  color: inherit;
  font-weight: 700;
}
.msearch__hit-go {
  display: grid;
  flex: none;
  padding: 0 12px;
  color: var(--outline);
}
.msearch__more {
  align-self: flex-start;
  min-height: 48px;
  font-size: 15px;
}
.msearch__notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
}

/* ------------------------------------------------------------------ sign-in banner, install and account lines (Settings) */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 16px 0;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--warn-bg);
  color: var(--on-surface);
  font-size: 14px;
}
.account {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 20px;
}
.account__email {
  overflow-wrap: anywhere;
  font-weight: 600;
}
.install-hint {
  color: var(--on-surface-variant);
}
.home-slot {
  min-width: 0;
}
