:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --party-bg: #fef3c7;
  --party-text: #b45309;
  --chill-bg: #e0f2fe;
  --chill-text: #0369a1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Modern App Header */
.app-header {
  padding: 1.75rem 0.75rem 0.5rem;
}

.header-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo-chip {
  width: 54px;
  height: 54px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.header-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.title-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.title-line h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

.season-pill {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.app-header p {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.15rem;
}

.container {
  max-width: 820px;
  margin: 1rem auto 2rem;
  padding: 0 0.75rem;
}

.hidden {
  display: none !important;
}

/* Calendar */
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  padding: 0.75rem 1rem;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid var(--border);
}

.calendar-controls button {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--card);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--border);
  gap: 1px;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.day-cell {
  position: relative;
  background: var(--card);
  min-height: 82px;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.party-corner-icon {
  position: absolute;
  top: 0.3rem;
  right: 0.35rem;
  font-size: 0.85rem;
  line-height: 1;
}

.day-cell.empty {
  background: #f8fafc;
}

.day-cell.past-day {
  background: #f8fafc;
  opacity: 0.55;
}

.day-cell.past-day::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    #cbd5e1 calc(50% - 1px),
    #cbd5e1 calc(50% + 1px),
    transparent calc(50% + 1px)
  ),
  linear-gradient(
    to top left,
    transparent calc(50% - 1px),
    #cbd5e1 calc(50% - 1px),
    #cbd5e1 calc(50% + 1px),
    transparent calc(50% + 1px)
  );
  pointer-events: none;
}


.day-num {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.day-cell.has-trip {
  cursor: pointer;
  background: #f0f9ff;
  transition: transform 0.1s ease, background 0.15s ease;
}

.day-cell.has-trip:hover {
  background: #e0f2fe;
}

.koala-badge {
  width: 38px;
  height: 38px;
  object-fit: contain;
  margin: 2px 0;
}

.trip-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: var(--primary-dark);
  line-height: 1.15;
}

/* Keep desktop ".multi-pill" looking like a clean blue pill */
.multi-pill {
  display: inline-block;
  background-color: #0284c7; /* Blue badge color */
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 2px;
}

/* Turn ".multi-pill" into a compact blue circle on mobile (<= 600px) */
@media (max-width: 600px) {
  .multi-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0 !important;
    border-radius: 50% !important;
    background-color: #0284c7 !important;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin: 2px auto 0 auto;
    flex-shrink: 0;
  }
}



/* Detail View */
.detail-top-bar {
  margin-bottom: 1rem;
}

.title-with-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.date-pill {
  display: inline-block;
  background: #e0f2fe;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.close-detail-btn {
  background: var(--card);
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.close-detail-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.updated-text {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.transport-card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
}

.tbc-banner {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.9rem;
}

.transport-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.price-box {
  text-align: right;
}

.price-box strong {
  display: block;
  font-size: 1.4rem;
  color: var(--primary-dark);
  line-height: 1.2;
}

.price-subtext {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

/* Badges & Departures stacked */
.badges-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.party-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.party-yes {
  background: var(--party-bg);
  color: var(--party-text);
}

.party-no {
  background: var(--chill-bg);
  color: var(--chill-text);
}

.departures-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.return-line {
  width: 100%;
  margin-top: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-weight: 500;
}

.return-line:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.book-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 0.85rem;
  border-radius: 10px;
  font-size: 1rem;
}

.book-btn:hover {
  background: var(--primary-dark);
}

.disclaimer-note {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* Map Section */
.map-section {
  background: var(--card);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.map-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.zoom-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.map-wrapper {
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.map-wrapper img {
  width: 100%;
  display: block;
  cursor: zoom-in;
}

.map-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
}

.resort-link-btn {
  display: inline-block;
  background: var(--bg);
  color: var(--primary-dark);
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  margin-top: 0.5rem;
  transition: background 0.15s ease;
}

.resort-link-btn:hover {
  background: #e0f2fe;
}

/* Multi-Trip Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}

.modal-sheet {
  background: var(--card);
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  max-height: 70dvh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.modal-trip-list {
  overflow-y: auto;
  padding-right: 0.25rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-trip-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.modal-trip-card h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.modal-trip-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.select-trip-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox img {
  max-width: none;
  width: 1400px;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  z-index: 101;
}

/* High-specificity selector using the exact ID */
#detail-map-img[src*="not_open_yet"] {
  width: 28% !important;
  max-width: 28% !important;
  min-width: 140px !important;
  height: auto !important;
  display: block !important;
  margin: 24px auto !important;
}



