:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f7f7;
  --border: rgba(0, 0, 0, 0.14);
  --border-strong: rgba(0, 0, 0, 0.25);
  --text: #000000;
  --muted: #4a4a4a;
  --accent: #e31c23;
  --warn-mid: #bd8a00;
  --sold: #b42318;
  --avail: #067647;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}

.app {
  max-width: 1024px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.app-footer {
  display: flex;
  justify-content: center;
  padding-top: 24px;
}

.header {
  position: relative;
  gap: 10px;
}

.logo {
  align-items: flex-start;
}

.logo-image {
  position: relative;
  display: block;
  width: 270px;
  height: auto;
}

.logo-sub {
  margin-top: 4px;
  font-size: 0.76rem;
}

.footer-logo {
  display: block;
  width: 75px;
  height: auto;
}

.header-right {
  gap: 0;
}

.refresh-btn {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  cursor: pointer;
}

.refresh-btn:hover {
  border-color: var(--border-strong);
}

.last-updated {
  font-size: 0.82rem;
  color: var(--muted);
}

.park-tabs {
  scrollbar-width: none;
}

.park-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: 'Bebas Neue', sans-serif;
  line-height: normal;
  letter-spacing: 1px;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.search-input {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--surface);
  box-shadow: none;
}

.search-input::placeholder {
  color: var(--muted);
}

.park-inline-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.search-meta {
  min-width: 0;
}

.park-inline-hours {
  color: var(--text);
}

.summary {
  font-size: 0.84rem;
  color: var(--muted);
}

.error-banner {
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--sold) 60%, transparent);
  background: color-mix(in srgb, var(--sold) 14%, transparent);
  color: var(--sold);
  border-radius: 10px;
  padding: 10px 12px;
}

.view-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  border: 0;
  background: rgba(0, 0, 0, 0.16);
  padding: 0;
}

.view-menu-backdrop:not(.hidden) {
  animation: view-menu-backdrop-in 180ms ease-out;
}

.view-menu-wrap {
  position: relative;
  display: inline-block;
  z-index: 30;
}

.view-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
}

.view-menu-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.view-menu-list {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(92vw, 360px);
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  z-index: 30;
  display: grid;
  align-content: start;
  gap: 16px;
  border-left: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, #ffffff);
  border-radius: 0;
  padding: 18px 16px;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.14);
}

.view-menu-list:not(.hidden) {
  animation: view-menu-drawer-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.view-menu-label {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.view-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.view-menu-stack {
  display: grid;
  gap: 6px;
}

.view-menu-item {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 11px 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.view-menu-item:hover {
  border-color: var(--border);
  color: var(--text);
}

.view-menu-item.active {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--text);
  font-weight: 600;
}

@keyframes view-menu-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes view-menu-drawer-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 761px) {
  .view-menu-list {
    width: min(420px, 36vw);
  }

  .view-menu-close {
    width: 32px;
    height: 32px;
  }
}

.overview-status {
  margin: 0;
}

.hidden {
  display: none;
}

.hidden-view {
  display: none;
}

.main-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ride-row {
  transition: background 120ms ease;
}

.ride-row.selected {
  background: var(--surface);
}

.ride-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ride-more-link {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
}

.ride-more-link:hover {
  color: var(--text);
}

.ride-inline-detail {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.ride-inline-detail-desktop {
  display: none;
}

.ride-detail-row {
  display: none;
  border-top: 0;
}

.ride-inline-detail-mobile {
  margin-top: 0;
}

.ride-inline-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ride-inline-park {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.7rem;
}

.ride-inline-stats {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

@media (min-width: 1024px) {
  .ride-inline-detail-desktop.is-open {
    display: block;
  }

  .ride-detail-row {
    display: none;
  }

  .ride-inline-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .ride-detail-row.is-open {
    display: table-row;
  }
}

.ride-ll-badge {
  display: inline-flex;
  align-items: center;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ride-ll-icon-group {
  display: inline-flex;
  align-items: center;
}

.ride-ll-icon {
  width: 0.7rem;
  height: 0.7rem;
  display: block;
  line-height: 1;
}

.ride-ll-multi {
  color: var(--text);
}

.ride-ll-single {
  color: var(--text);
}

.ride-legend {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.ride-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.show-row {
  cursor: default;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.dot.avail {
  background: var(--avail);
  box-shadow: 0 0 7px color-mix(in srgb, var(--avail) 65%, transparent);
}

.dot.sold {
  background: var(--sold);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-text {
  font-size: 0.74rem;
  color: var(--muted);
}

.col-wait-desktop.hot {
  color: var(--sold);
  font-weight: 700;
}

.col-wait-desktop.mid {
  color: var(--warn-mid);
  font-weight: 700;
}

.stat-card {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 12px;
}

.stat-card.ride-inline-meta-card {
  background: var(--surface);
}

.ride-inline-forecast-card {
  grid-column: 1 / -1;
}

.ride-inline-forecast-chart {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.ride-forecast-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.ride-forecast-time,
.ride-forecast-value {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.ride-forecast-value {
  text-align: right;
}

.ride-forecast-track {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.ride-forecast-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--text);
}

.ride-forecast-fill.is-empty {
  width: 0;
  background: transparent;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.stat-value {
  margin: 5px 0 0;
  color: var(--accent);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  line-height: 1;
}

.ride-inline-ll {
  margin-top: 12px;
}

.ride-inline-ll-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.ride-inline-ll-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.ride-inline-ll-name {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.ride-inline-ll-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.section-head {
  margin-bottom: 8px;
}

.section-title {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  font-size: 28px;
}

@media (min-width: 761px) {
  .section-title {
    margin-top: 10px;
  }
}

@media (max-width: 760px) {
  .search-row {
    gap: 8px;
  }

  .view-menu-wrap {
    display: inline-block;
  }

  .view-menu-list {
    width: min(92vw, 360px);
  }

  .search-meta {
    margin-left: 0;
    width: 100%;
    align-items: flex-start;
  }

  .park-inline-meta {
    flex-wrap: wrap;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.stat-secondary {
  color: var(--text);
  font-size: 1.2rem;
}

.detail-updated {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
