.gxfl-deals {
  --gxfl-deals-ink: #123b5d;
  --gxfl-deals-blue: #007aa3;
  --gxfl-deals-yellow: #ffd76a;
  --gxfl-deals-muted: #4d6678;
  --gxfl-deals-line: #d6e5ec;
  --gxfl-deals-soft: #eef7fa;
  --gxfl-deals-gap: 16px;
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  min-width: 0;
  margin: 28px auto;
  padding: 0 12px;
  color: var(--gxfl-deals-ink);
  color-scheme: light;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  text-align: start;
}

.gxfl-deals *, .gxfl-deals *::before, .gxfl-deals *::after { box-sizing: border-box; }
.gxfl-deals[hidden], .gxfl-deals [hidden],
.gxfl-app[data-search-active="true"] + .gxfl-deals[data-context="search"] { display: none !important; }
.gxfl-deals p, .gxfl-deals h2, .gxfl-deals h3 { margin: 0; }

.gxfl-deals__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 3px 10px;
}

.gxfl-deals .gxfl-deals__heading {
  color: var(--gxfl-deals-ink);
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.gxfl-deals__track {
  display: grid;
  gap: var(--gxfl-deals-gap);
  min-width: 0;
  padding: 5px 3px 9px;
}

.gxfl-deals[data-layout="rail"] .gxfl-deals__track {
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--gxfl-deals-gap)) / 3);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 3px;
  scrollbar-width: thin;
  scrollbar-color: #abc5d1 transparent;
}

.gxfl-deals[data-layout="rail"] .gxfl-deals__card { scroll-snap-align: start; }
.gxfl-deals[data-layout="grid"] .gxfl-deals__track { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.gxfl-deals__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  border: 1px solid var(--gxfl-deals-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 10px #123b5d0b;
}

.gxfl-deals__card--entering { animation: gxfl-deals-enter .22s ease-out both; }

.gxfl-deals__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(154deg, #edf7fa 45%, #dcecf1 45%, #e7f1f4 75%, #f6f7f3 75%);
}

.gxfl-deals__cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.gxfl-deals__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 15px;
}

.gxfl-deals__destination {
  color: var(--gxfl-deals-blue);
  font-size: 13px;
  font-weight: 700;
}

.gxfl-deals .gxfl-deals__title {
  margin-bottom: 2px;
  color: var(--gxfl-deals-ink);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 780;
  line-height: 1.35;
}

.gxfl-deals__meta, .gxfl-deals__time, .gxfl-deals__fare-terms {
  color: var(--gxfl-deals-muted);
  font-size: 12px;
}

.gxfl-deals .gxfl-deals__summary {
  margin-top: 3px;
  color: var(--gxfl-deals-ink);
  font-size: 14px;
}

.gxfl-deals__fare {
  margin-top: 3px;
  padding: 6px 10px;
  border-inline-start: 3px solid var(--gxfl-deals-yellow);
  border-radius: 4px;
  background: #fff8e5;
}

.gxfl-deals__fare-kind { font-size: 12px; font-weight: 700; }
.gxfl-deals__fare-amount { font-size: 25px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }

.gxfl-deals__foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 7px;
}

.gxfl-deals__actions, .gxfl-deals__filters, .gxfl-deals__controls, .gxfl-deals__notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.gxfl-deals__actions .gxfl-deals__button { flex: 1 1 auto; }
.gxfl-deals__filters { margin: 0 3px 10px; }
.gxfl-deals__controls { justify-content: flex-end; margin: 7px 3px 0; }
.gxfl-deals__position { min-width: 5rem; color: var(--gxfl-deals-muted); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.gxfl-deals__notice { gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--gxfl-deals-line); border-radius: 12px; background: var(--gxfl-deals-soft); }
.gxfl-deals__status { color: var(--gxfl-deals-muted); font-size: 14px; }

.gxfl-deals .gxfl-deals__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--gxfl-deals-line);
  border-radius: 9px;
  background: #fff;
  color: var(--gxfl-deals-blue);
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s, border-color .15s, transform .12s;
}

.gxfl-deals .gxfl-deals__button--primary {
  border-color: var(--gxfl-deals-yellow);
  background: var(--gxfl-deals-yellow);
  color: var(--gxfl-deals-ink);
}

.gxfl-deals .gxfl-deals__button--all { padding-inline: 5px; border-color: transparent; background: transparent; }
.gxfl-deals .gxfl-deals__button--filter { border-radius: 25px; }
.gxfl-deals .gxfl-deals__button--filter[aria-pressed="true"] { border-color: var(--gxfl-deals-blue); background: var(--gxfl-deals-blue); color: #fff; }
.gxfl-deals .gxfl-deals__button--arrow { width: 44px; padding: 0; border-radius: 50%; font-size: 19px; }
.gxfl-deals .gxfl-deals__button[aria-disabled="true"] { opacity: .5; cursor: default; }
.gxfl-deals .gxfl-deals__button:not([aria-disabled="true"]):active { transform: translateY(1px); }
.gxfl-deals :is(.gxfl-deals__button, .gxfl-deals__track, .gxfl-deals__heading):focus-visible { outline: 3px solid var(--gxfl-deals-blue); outline-offset: 2px; }
.gxfl-deals .gxfl-deals__track:focus-visible { outline-offset: -1px; }

@media (hover: hover) {
  .gxfl-deals .gxfl-deals__button:not([aria-disabled="true"]):not([aria-pressed="true"]):hover { border-color: var(--gxfl-deals-blue); }
  .gxfl-deals .gxfl-deals__button--all:hover { text-decoration: underline; }
}

@keyframes gxfl-deals-enter {
  from { opacity: .65; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .gxfl-deals[data-layout="rail"] .gxfl-deals__track { grid-auto-columns: calc((100% - var(--gxfl-deals-gap)) / 2); }
  .gxfl-deals[data-layout="grid"] .gxfl-deals__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  .gxfl-deals { --gxfl-deals-gap: 12px; margin-block: 22px; }
  .gxfl-deals[data-layout="rail"] .gxfl-deals__track { grid-auto-columns: calc(100% - 42px); }
  .gxfl-deals[data-layout="grid"] .gxfl-deals__track { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .gxfl-deals .gxfl-deals__card--entering { animation: none; }
  .gxfl-deals .gxfl-deals__button { transition: none; }
  .gxfl-deals .gxfl-deals__button:not([aria-disabled="true"]):active { transform: none; }
  .gxfl-deals .gxfl-deals__track { scroll-behavior: auto; }
}
