/* Shared control families: layout-12/15, button-12/14. */
#app {
  --control-radius: 8px;
  --control-gap: 6px;
  --control-surface: rgb(18 32 35 / 72%);
  --control-line: rgb(230 236 222 / 18%);
  --control-selected: rgb(226 205 157 / 14%);
}
#app .skip-link {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 100;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  color: #172728;
  background: #ffe083;
  border-radius: 8px;
  transform: translateY(calc(-100% - 24px - env(safe-area-inset-top)));
}
#app .skip-link:focus {
  outline: 2px solid #172728;
  outline-offset: -4px;
  transform: none;
}
#app #scene:focus-visible {
  outline: 2px solid #ffe083;
  outline-offset: -4px;
}
#app .topbar button,
#app .tools-rail button,
#app .rail-controls button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: #e7ece5;
  background: var(--control-surface);
  border: 1px solid var(--control-line);
  border-radius: var(--control-radius);
}
#app #ride-nearest-bus {
  color: #172728;
  background: #f4d653;
  border-color: #e6cc79;
}
#app .tools-rail {
  gap: var(--control-gap);
}
#app .bottom > .detail-views:not([hidden]) {
  gap: var(--control-gap);
  padding: 6px;
  scrollbar-color: #bdc9bb66 transparent;
  background: var(--control-surface);
  border: 1px solid var(--control-line);
  border-radius: 12px;
}
#app .mode-toggle button,
#app .view-card-foot button {
  border-radius: var(--control-radius);
}
#app .view-tabs button,
#app .bottom > .detail-views button,
#app #platform-buttons button {
  padding-inline: 10px;
  color: #cbd5d0;
  border-radius: var(--control-radius);
}
#app .view-tabs button.active,
#app .mode-toggle button.active,
#app .bottom > .detail-views button[aria-pressed="true"],
#app #platform-buttons button.active {
  color: #f4e4bd;
  background: var(--control-selected);
  box-shadow: inset 0 -2px #d9c393;
}
#app .view-tabs button.active::after {
  display: none;
}
#app .mode-toggle {
  padding: 4px;
  border-radius: 12px;
}
#app #platform-buttons button {
  font-variant-numeric: tabular-nums;
}
#app .navigation-scroll-hint {
  margin-bottom: 8px;
  line-height: 1.4;
  color: #bfcac4;
}
/* Mayfield keeps the selected destination visible without moving the page.
   layout-1/12/15, scroll-2/3/5, button-14. */
#app #mayfield-views:not([hidden]) {
  display: block;
  padding: 6px;
  overflow: hidden;
  background: rgb(18 32 35 / 94%);
}
#app .mayfield-views-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 6px 6px;
  font-size: 10px;
  line-height: 1.4;
  color: #cbd5d0;
}
#app .mayfield-views-heading > span:first-child {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
#app .mayfield-views-scroll {
  display: flex;
  gap: var(--control-gap);
  padding: 2px;
  overflow-x: auto;
  overscroll-behavior-x: none;
  scroll-padding-inline: 2px;
  scrollbar-color: #bdc9bb66 transparent;
  scrollbar-width: thin;
}
#app #mayfield-views button {
  min-width: 44px;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  border-radius: 6px;
}
#app #mayfield-views button[aria-pressed="true"] {
  color: #fff0c4;
  background: rgb(226 205 157 / 20%);
  box-shadow: inset 0 -2px #e8cd89;
}
@media (min-width: 1024px) {
  #app .mayfield-views-scroll {
    flex-wrap: wrap;
  }
  #app #mayfield-scroll-hint {
    display: none;
  }
}
#app .view-card {
  background: rgb(18 32 35 / 88%);
  border: 1px solid var(--control-line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
#app .view-card h2 {
  text-wrap: balance;
}
#app .view-card-foot {
  font-variant-numeric: tabular-nums;
}
#app .chrome button:focus-visible,
#app .view-card a:focus-visible {
  outline: 2px solid #f4d98d;
  outline-offset: -3px;
}
#app .chrome button:active:not(:disabled) {
  background-color: #43504a;
}
#app #ride-nearest-bus:active:not(:disabled) {
  background: #ffe893;
}
@media (hover: hover) {
  #app .chrome button:hover:not(:disabled) {
    color: #fff4d8;
    background-color: #35433e;
  }
  #app #ride-nearest-bus:hover:not(:disabled) {
    color: #172728;
    background: #ffe893;
  }
}
@media (prefers-reduced-motion: no-preference) {
  #app .chrome button {
    transition:
      background-color 120ms ease-out,
      color 120ms ease-out,
      box-shadow 120ms ease-out;
  }
}
@media (prefers-reduced-motion: reduce) {
  #app .chrome button {
    transition: none;
  }
}
