* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000;
  color: #000;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.app {
  width: 530px;
  height: 560px;
  margin: 20px 50px 20px 12px;
  padding: 20px;
  overflow: hidden;
}

.screen {
  display: none;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

h1 {
  margin: 0;
  font-size: 36px;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  transition: all 0.25s ease;
}

.category-grid button {
  height: 116px;
  border: 2px solid rgba(0, 0, 0, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 6px 0 0 0;
}

.category-grid button:focus,
.category-grid button:active {
  background: rgba(255, 255, 255, 0.95);
}

.category-grid .empty-category-slot {
  visibility: hidden;
  pointer-events: none;
}

#editGridButton {
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  font-size: 22px;
  line-height: 1;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 4px 0;
}

#homeScreen.results-mode #editGridButton {
  display: none;
}

.category-grid.compact {
  grid-template-columns: repeat(9, 1fr);
  gap: 5px;
  margin-top: -4px;
}

.category-grid.compact button {
  height: 38px;
  border-radius: 12px;
  font-size: 34px;
  padding: 1px 0 0 0;
  line-height: 1;
}

.category-grid.compact button.inactive-category {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

#homeScreen {
  position: relative;
}

#homeScreen.results-mode {
  gap: 6px;
}

#homeScreen.results-mode #appTitle {
  display: none;
}

.results-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.left-header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.results-title-controls {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.right-title-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

#radiusMinusButton,
#radiusPlusButton {
  position: relative;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
}

#homeScreen:not(.results-mode) #radiusMinusButton,
#homeScreen:not(.results-mode) #radiusPlusButton,
#homeScreen:not(.results-mode) #openOnlyButton {
  visibility: hidden;
}

#homeScreen:not(.results-mode) .results-title-controls {
  grid-template-columns: 1fr;
}

#homeScreen:not(.results-mode) .results-title-controls #radiusMinusButton,
#homeScreen:not(.results-mode) .results-title-controls .right-title-controls {
  display: none;
}

#radiusMinusButton.inactive,
#radiusPlusButton.inactive {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

#openOnlyButton {
  font-size: 16px;
  line-height: 1;
  padding: 0 0 2px 0;
}

#openOnlyButton.inactive {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

#openOnlyButton.active {
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  border-color: #000;
}

#routeResult {
  min-height: 38px;
  font-size: 30px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  margin: 0;
}

#prevResultsButton,
#nextResultsButton,
#homeButton,
#favoriteButton,
#savedButton,
#recentButton,
#searchButton,
#bottomResetButton,
#homeFavoriteButton,
#homeSavedButton,
#homeRecentButton,
#resumeNavigationButton,
#resumeSearchButton,
#newSearchButton,
#openOnlyButton,
#radiusMinusButton,
#radiusPlusButton,
#backButton,
#favoriteLocationButton,
#saveLocationButton,
#editBackButton,
#resetGridButton,
#saveGridButton,
#editPrevPageButton,
#editNextPageButton,
#keyboardCloseButton,
#keyboardButton {
  width: 38px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  font-size: 18px;
  line-height: 1;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px 0;
}

#radiusMinusButton,
#radiusPlusButton {
  font-size: 30px;
  line-height: 0;
  padding-bottom: 0.1px;
}

#prevResultsButton,
#nextResultsButton,
#editPrevPageButton,
#editNextPageButton {
  font-size: 26px;
  line-height: 1;
  padding-bottom: 8px;
}

#prevResultsButton.inactive,
#nextResultsButton.inactive,
#editPrevPageButton.inactive,
#editNextPageButton.inactive {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

#homeScreen:not(.results-mode) #prevResultsButton,
#homeScreen:not(.results-mode) #nextResultsButton {
  visibility: hidden;
}


#radiusMinusButton.inactive,
#radiusPlusButton.inactive {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

#results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

#homeScreen.results-mode #results {
  min-height: 393px;
  max-height: none;
}


.result-card {
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.7);
  color: #000;
}

.result-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.result-header strong {
  font-size: 26px;
  font-weight: bold;
  line-height: 1.05;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 18px;
  white-space: nowrap;
  flex-shrink: 0;
}

.result-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
}

.result-details p {
  margin: 0;
  font-size: 18px;
  color: #000;
  line-height: 1.15;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.result-details span {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  white-space: nowrap;
}

.result-card button {
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.5);
  color: #000;
  font-size: 22px;
  font-weight: bold;
}

.empty-message {
  padding: 30px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid #000;
  color: #000;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

#homeScreen.results-mode .empty-message {
  flex: 1;
  min-height: 393px;
}

#bottomActions {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: -2px;
}

#homeScreen.results-mode #bottomActions {
  display: flex;
}

#radiusIndicator {
  display: none;
  position: absolute;
  right: 0;
  bottom: -2px;
  min-width: 70px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  z-index: 998;
  align-items: center;
  justify-content: center;
  padding: 0 8px 1px 8px;
  white-space: nowrap;
}

#homeScreen.results-mode #radiusIndicator {
  display: flex;
}

#bottomResetButton {
  display: none;
}

#bottomActions.show-reset #bottomResetButton {
  display: flex;
}

#bottomResetButton.feedback {
  width: 78px;
  min-width: 78px;
  justify-content: center;
  gap: 0;
  font-size: 15px;
  font-weight: bold;
  padding: 0 8px 2px 8px;
}

#homeButton.inactive,
#favoriteButton.inactive,
#savedButton.inactive,
#recentButton.inactive,
#searchButton.inactive,
#bottomResetButton.inactive {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

#editScreen.active {
  height: 100%;
  position: relative;
  justify-content: center;
  padding-top: 28px;
  padding-bottom: 18px;
}

#editBackButton {
  position: absolute;
  top: -16px;
  left: 0;
}

.edit-grid button {
  position: relative;
  opacity: 0.35;
}

.edit-grid button.selected {
  opacity: 1;
  background: rgba(255, 255, 255, 0.85);
}

.edit-grid button.locked {
  opacity: 1;
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
  color: rgba(0, 0, 0, 0.35);
}

.edit-grid button:focus,
.edit-grid button:active {
  background: rgba(255, 255, 255, 0.95);
}

.edit-order-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  font-size: 18px;
  font-weight: bold;
  line-height: 24px;
  text-align: center;
}

.edit-actions {
  position: absolute;
  top: -16px;
  left: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 999;
}

.edit-actions #resetGridButton,
.edit-actions #saveGridButton {
  position: relative;
  top: auto;
  left: auto;
  overflow: hidden;
  white-space: nowrap;
  flex: 0 0 auto;
}

#resetGridButton.disabled,
#saveGridButton.disabled {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

.edit-pager {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

#editGridStatus,
#editGridTopStatus {
  min-height: 38px;
  font-size: 30px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  margin: 0;
}

#navScreen.active {
  height: 100%;
  justify-content: center;
  position: relative;
  padding-top: 28px;
  padding-bottom: 18px;
}

#backButton {
  position: absolute;
  top: -16px;
  left: 0;
}

#favoriteLocationButton {
  position: absolute;
  top: -16px;
  left: 44px;
  overflow: hidden;
  white-space: nowrap;
}

#saveLocationButton {
  position: absolute;
  top: -16px;
  left: 88px;
  overflow: hidden;
  white-space: nowrap;
}

#favoriteLocationButton.favorited,
#saveLocationButton.saved {
  background: rgba(255, 255, 255, 0.95);
}

#favoriteLocationButton.feedback,
#saveLocationButton.feedback {
  width: 124px;
  justify-content: center;
  gap: 4px;
  font-size: 15px;
  font-weight: bold;
}


#favoriteButton,
#favoriteLocationButton,
.result-favorite-icon {
  color: #ff9800;
}

#favoriteButton.inactive {
  color: rgba(255, 152, 0, 0.45);
}

#favoriteLocationButton {
  z-index: 1002;
}

#saveLocationButton {
  z-index: 1001;
}

#favoriteLocationButton.feedback {
  z-index: 1003;
}
#navHud {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-current {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  border: 3px solid rgba(0, 0, 0, 0.88);
  text-align: center;
  color: #000;
}

.nav-icon {
  font-size: 120px;
  line-height: 1;
  margin-bottom: 6px;
  color: #000;
}

.nav-current .label {
  font-size: 18px;
  opacity: 0.85;
  color: #000;
}

.nav-current .instruction {
  margin-top: 6px;
  font-size: 42px;
  font-weight: bold;
  line-height: 1.05;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-current .distance {
  margin-top: 10px;
  font-size: 42px;
  font-weight: bold;
  color: #000;
}

.nav-next {
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 2px solid rgba(0, 0, 0, 0.58);
  color: #000;
  text-align: center;
}

.nav-next .nav-icon {
  font-size: 48px;
  margin-bottom: 2px;
}

.nav-next .label {
  font-size: 16px;
  opacity: 0.75;
  color: #000;
}

.nav-next .instruction {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.1;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-footer {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  opacity: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  margin-top: -2px;
}

.nav-arrived {
  padding: 34px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  border: 3px solid #000;
  text-align: center;
  color: #000;
}

.nav-arrived div {
  font-size: 86px;
  line-height: 1;
}

.nav-arrived strong {
  display: block;
  margin-top: 10px;
  font-size: 42px;
}

.nav-arrived span {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  font-weight: bold;
}

.nav-complete {
  padding: 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  border: 3px solid #000;
  text-align: center;
  font-size: 30px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#routeModeControls {
  position: absolute;
  top: -16px;
  right: 0;
  display: flex;
  gap: 4px;
  z-index: 999;
}

#routeModeControls button {
  position: relative;
  width: 30px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px 2px 0;
}

#routeModeControls button.inactive {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}


#bottomActions #favoriteButton,
#bottomActions #favoriteButton:not(.inactive),
#favoriteLocationButton,
.result-meta .result-favorite-icon {
  color: #ff9800 !important;
}

#bottomActions #favoriteButton.inactive {
  color: rgba(255, 152, 0, 0.45) !important;
}

.result-meta .result-favorite-icon {
  display: inline-block;
}

/* Directions page transparent HUD treatment */
#navScreen .nav-current,
#navScreen .nav-next,
#navScreen .nav-arrived,
#navScreen .nav-complete {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

#navScreen .nav-current,
#navScreen .nav-next,
#navScreen .nav-arrived {
  color: #39FF14;
}

#navScreen .nav-current .nav-icon,
#navScreen .nav-next .nav-icon,
#navScreen .nav-arrived div,
#navScreen .nav-current .label,
#navScreen .nav-next .label,
#navScreen .nav-current .instruction,
#navScreen .nav-next .instruction,
#navScreen .nav-current .distance,
#navScreen .nav-arrived strong,
#navScreen .nav-arrived span {
  color: #39FF14;
  text-shadow:
    -2px -2px 0 rgba(0, 0, 0, 0.95),
    2px -2px 0 rgba(0, 0, 0, 0.95),
    -2px 2px 0 rgba(0, 0, 0, 0.95),
    2px 2px 0 rgba(0, 0, 0, 0.95),
    0 0 8px rgba(57, 255, 20, 0.85);
}

#navScreen .nav-footer,
#navScreen .nav-complete {
  color: #39FF14;
  text-shadow:
    -2px -2px 0 rgba(0, 0, 0, 0.95),
    2px -2px 0 rgba(0, 0, 0, 0.95),
    -2px 2px 0 rgba(0, 0, 0, 0.95),
    2px 2px 0 rgba(0, 0, 0, 0.95),
    0 0 8px rgba(57, 255, 20, 0.85);
}

#navScreen .nav-complete {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

#navScreen .nav-current,
#navScreen .nav-next {
  padding-left: 4px;
  padding-right: 4px;
}


/* Navigation separator */
#navScreen .nav-current::after {
  content: "";
  display: block;
  width: 85%;
  height: 2px;
  margin: 12px auto 4px auto;
  background: #39FF14;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(57, 255, 20, 0.85);
  border-radius: 2px;
}


#keyboardScreen.active {
  height: 100%;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 24px;
  position: relative;
}

.custom-search-display {
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  font-size: 30px;
  font-weight: bold;
  line-height: 1.1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

.keyboard-placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.keyboard-cursor {
  display: inline-block;
  margin: 0 1px;
  color: #000;
}

.keyboard-grid,
.keyboard-actions {
  display: grid;
  gap: 5px;
}

.keyboard-numbers {
  grid-template-columns: repeat(10, 1fr);
}

.keyboard-letters {
  grid-template-columns: repeat(10, 1fr);
}

.keyboard-grid button,
.keyboard-actions button {
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  font-size: 19px;
  font-weight: bold;
  line-height: 1;
  padding: 0 0 2px 0;
}

.keyboard-letters button {
  font-size: 22px;
}

.keyboard-actions {
  grid-template-columns: 42px minmax(0, 1fr) 42px 50px 76px 76px;
  margin-top: 2px;
}

.keyboard-actions .keyboard-space {
  font-size: 20px;
}

/* Custom search history + reset spacing polish */
.search-history-card .result-header strong {
  max-width: 100%;
}

#bottomActions.show-reset {
  padding-right: 86px;
}

#bottomActions.show-reset #bottomResetButton.feedback {
  width: 162px;
  font-size: 14px;
}

#bottomActions.show-reset:has(#bottomResetButton.feedback) {
  transform: translateX(-16px);
}

/* Clear feedback should cover keyboard area, not sit behind it */
#keyboardButton {
  z-index: 996;
}

#bottomActions.show-reset {
  padding-right: 0;
}

#bottomActions.show-reset #bottomResetButton.feedback {
  width: 162px;
  font-size: 14px;
  position: relative;
  z-index: 1005;
}

#bottomActions.show-reset:has(#bottomResetButton.feedback) {
  transform: translateX(18px);
}

/* Short cleared feedback override */
#bottomActions.show-reset #bottomResetButton.feedback,
#bottomResetButton.feedback {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
}

#editGridTopStatus {
  position: absolute;
  top: -18px;
  left: 88px;
  right: 88px;
  min-height: 38px;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  margin: 0;
  pointer-events: none;
}

#editGridStatus {
  min-height: 38px;
}

#navControlLabel {
  position: absolute;
  top: -16px;
  left: 132px;
  right: 168px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  text-shadow:
    -2px -2px 0 rgba(0, 0, 0, 0.9),
    2px -2px 0 rgba(0, 0, 0, 0.9),
    -2px 2px 0 rgba(0, 0, 0, 0.9),
    2px 2px 0 rgba(0, 0, 0, 0.9),
    0 1px 5px rgba(0, 0, 0, 0.95);
  z-index: 1000;
  pointer-events: none;
}

#navControlLabel:empty {
  display: none;
}

/* Header keyboard placement */
#keyboardButton {
  position: static;
  display: flex;
}

#homeScreen:not(.results-mode) #prevResultsButton {
  display: none;
}

#homeScreen:not(.results-mode) .left-header-controls {
  width: 42px;
}

#homeScreen.results-mode .left-header-controls {
  display: flex;
}

#homeScreen.results-mode #prevResultsButton {
  display: flex;
}

#homeScreen.results-mode .left-header-controls #keyboardButton {
  position: absolute;
  left: 0;
  bottom: -2px;
}

/* Keyboard top controls aligned with the keyboard content */
#keyboardTopControls {
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  pointer-events: none;
}

#keyboardTopControls #keyboardCloseButton {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  flex: 0 0 auto;
  pointer-events: auto;
}

#keyboardHoverLabel {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  text-shadow:
    -2px -2px 0 rgba(0, 0, 0, 0.9),
    2px -2px 0 rgba(0, 0, 0, 0.9),
    -2px 2px 0 rgba(0, 0, 0, 0.9),
    2px 2px 0 rgba(0, 0, 0, 0.9),
    0 1px 5px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

#keyboardHoverLabel:empty {
  display: none;
}

/* Main home quick access buttons */
#homeQuickActions {
  display: none;
}

#homeScreen:not(.results-mode) #homeQuickActions {
  position: absolute;
  right: 0;
  bottom: 20px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 998;
}

#homeScreen.results-mode #homeQuickActions,
#homeScreen:not(.active) #homeQuickActions {
  display: none;
}

#homeFavoriteButton {
  color: #ff9800;
}

#homeFavoriteButton:focus,
#homeFavoriteButton:active,
#homeSavedButton:focus,
#homeSavedButton:active,
#homeRecentButton:focus,
#homeRecentButton:active {
  background: rgba(255, 255, 255, 0.95);
}

/* Empty home quick actions */
#homeFavoriteButton.inactive,
#homeSavedButton.inactive,
#homeRecentButton.inactive {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

#homeFavoriteButton.inactive {
  color: rgba(255, 152, 0, 0.45);
}

/* Home resume modal prompt */
#resumePrompt {
  display: none;
}

#homeScreen:not(.results-mode) #resumePrompt.visible {
  position: absolute;
  inset: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  background: rgba(220, 220, 220, 0.72);
  pointer-events: auto;
}

#resumePopup {
  width: 330px;
  padding: 22px;
  border-radius: 22px;
  border: 3px solid #000;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  pointer-events: auto;
}

#resumeNavigationButton,
#resumeSearchButton,
#newSearchButton {
  width: 100%;
  min-width: 100%;
  height: 44px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: bold;
  padding: 0 10px 2px 10px;
  white-space: nowrap;
}

#resumeNavigationButton.inactive,
#resumeSearchButton.inactive,
#resumeNavigationButton:disabled,
#resumeSearchButton:disabled {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 0, 0, 0.35);
}

#homeScreen.results-mode #resumePrompt,
#homeScreen:not(.active) #resumePrompt {
  display: none;
}

#resumeNavigationButton:focus,
#resumeSearchButton:focus,
#newSearchButton:focus {
  outline: 3px solid #000;
  background: rgba(255, 255, 255, 1);
}


.result-card.result-placeholder {
  visibility: hidden;
  pointer-events: none;
}


.results-loading-shell {
  min-height: 393px;
  border-radius: 18px;
  background: transparent;
  pointer-events: none;
}


#homeScreen.results-mode.route-transition #results {
  min-height: 393px;
}
