:root {
  --g: #087a5b;
  --g2: #0aa174;
  --bg: #f4f7f6;
  --card: #ffffff;
  --ink: #0f1f33;
  --ink-2: #1f2d44;
  --muted: #5b6b80;
  --muted-2: #8a96a8;
  --line: #e3e9ee;
  --line-strong: #cdd6df;
  --warn: #b65f06;
  --purple: #6848bd;
  --red: #b42318;
  --shadow: 0 24px 60px -20px rgba(8, 35, 25, 0.35);
  --shadow-sm: 0 1px 2px rgba(15, 31, 51, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.btn {
  min-height: 41px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:hover { background: #f8faf9; border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--g); border-color: var(--g); color: #fff; }
.btn.primary:hover { background: var(--g2); border-color: var(--g2); }
.btn.soft { background: #eaf8f3; color: var(--g); border-color: #c7eade; }
.btn.danger { color: var(--red); }
.btn.icon { width: 41px; padding: 0; display: inline-grid; place-items: center; }

.shell { max-width: 1360px; margin: auto; padding: 26px 22px 60px; }
.page { display: none; }
.page.on { display: block; }

.calendar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.cal-head {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;
}
.cal-head h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.muted { color: var(--muted); }
.cal-head .actions { margin-left: auto; display: flex; gap: 8px; }

.cal-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cal-filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal-filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-filter-select,
.cal-filter-input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  min-width: 140px;
}
.cal-filter-input { min-width: 150px; }
.cal-filter-select:focus,
.cal-filter-input:focus {
  outline: none;
  border-color: var(--g);
  box-shadow: 0 0 0 3px rgba(8, 122, 91, 0.15);
}
.cal-filter-clear {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
.cal-filter-status {
  margin-top: 8px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
}

.cal-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cal-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.cal-search-wrap .cal-filter-input {
  width: 100%;
  min-width: 0;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 70;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow-y: auto;
  display: none;
}
.search-suggestions.on {
  display: block;
}
.search-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.search-suggestion:hover {
  background: #ecfdf5;
}
.search-suggestion:focus-visible {
  outline: 2px solid var(--g);
  outline-offset: -2px;
}

.day.is-dimmed {
  opacity: 0.45;
  filter: grayscale(0.4);
}
.day.is-past.is-dimmed {
  opacity: 0.55;
  filter: grayscale(0.5);
}
.day.is-past.is-dimmed .calitem {
  opacity: 0.6;
}
.day.is-selected {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  box-shadow: inset 0 0 0 2px var(--g), 0 6px 16px rgba(8, 122, 91, 0.12);
  border-radius: 15px;
}
.day.is-selected strong {
  color: var(--g);
}
.day.is-filtered-empty {
  background: repeating-linear-gradient(
    45deg,
    #f8faf9,
    #f8faf9 6px,
    #ffffff 6px,
    #ffffff 12px
  );
}
.day.is-filtered-empty strong {
  color: var(--muted-2);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-radius: var(--radius);
  background: transparent;
  gap: 8px;
  margin-top: 20px;
}

.day {
  min-height: 20px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: var(--card);
  border-radius: 10px;

}
.day.is-adjacent {
  background: #edf0f6;
}
.day.is-adjacent strong {
  color: #9aa4bd;
}
.day.is-adjacent .calitem {
  opacity: 0.45;
}
.day.is-adjacent.is-dimmed {
  opacity: 1;
}
.day.is-gap {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.day.is-today {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  box-shadow: inset 0 0 0 2px var(--g);
  border-radius: 15px;
}
.day.is-today strong {
  color: var(--g);
}
.day small {
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.day strong {
  display: block;
  margin: 4px 0 8px;
  font-size: 15px;
  color: var(--ink);
}

.calitem {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #e7f7f1;
  color: #075b45;
  margin: 4px 0;
  font-weight: 700;
  cursor: pointer;
  border-left: 3px solid var(--g);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  line-height: 1.3;
}
.calitem:hover {
  background: #d8f1e6;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(8,122,91,0.12);
}
.day.is-past {
  opacity: 0.55;
  filter: grayscale(0.5);
}
.day.is-past .calitem {
  opacity: 0.7;
  border-left-color: #bbb;
}
.m-logo-link {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: block;
  border-radius: 999px;
  line-height: 0;
  transition: transform 0.15s ease;
}
.m-logo-link:hover {
  transform: scale(1.08);
}
.calitem:hover { background: #d8f1e6; transform: translateY(-3x); }
.calitem:active { transform: translateY(1px); }

.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }

/* ─── Modal (professional) ────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 20, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  padding: 18px;
  z-index: 80;
  animation: modal-fade 0.18s ease;
}
.modal.on { display: grid; }

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dialog {
  background: #fff;
  border-radius: var(--radius-lg);
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: modal-pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-head {
  position: relative;
  padding: 18px 56px 18px 24px;
  background: linear-gradient(135deg, #0a5e44 0%, var(--g) 60%, var(--g2) 100%);
  color: #fff;
  flex: 0 0 auto;
}
.dialog-head .eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
}
.dialog-head .close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background 0.15s ease;
}
.dialog-head .close:hover { background: rgba(255, 255, 255, 0.32); }

.dialog-body {
  padding: 22px 24px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
  text-align: center;
}

/* ─── Modal body – redesigned ─────────────────────────────────────────── */
.detail-title {
  margin: 16px 0 8px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* Hero banner */
.m-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #e2edf0 0%, #cbdde3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.m-hero-img.is-broken {
  display: none;
}
.m-hero-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.m-poster-fail {
  margin: 8px 0 0;
  font-size: 13px;
  text-align: center;
}
.m-poster-fail a {
  color: var(--g);
  font-weight: 700;
  text-decoration: none;
}
.m-poster-fail a:hover {
  text-decoration: underline;
}
.m-logo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  padding: 4px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  border: 2px solid #fff;
}

/* Chips */
.m-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  justify-content: center;
}
.m-chip {
  font-size: 11px;
  font-weight: 700;
  background: #eef4f1;
  color: var(--g);
  border: 1px solid #d8e7e0;
  border-radius: 999px;
  padding: 4px 10px;
  letter-spacing: 0.02em;
}

/* Facts (icon rows) */
.m-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
}
.m-fact {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: left;
}
.m-fact-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--g);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.m-fact-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  flex: 0 1 auto;
}
.m-fact-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.m-fact-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Price badge row */
.m-price-row {
  margin: 0 0 14px;
  display: flex;
  justify-content: center;
}
.m-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #0a5e44 0%, var(--g) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  border-radius: 999px;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(8,122,91,0.18);
}

/* Optional fields */
.m-opts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 14px;
}
.m-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.m-opt-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.m-opt-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

/* Info cards */
.m-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
}
.m-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.m-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--g);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.m-card-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
}
.m-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.m-card-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.m-card-loc {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

/* Action buttons */
.m-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  justify-content: center;
}
.m-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  cursor: pointer;
  line-height: 1.3;
}
.m-btn:active {
  transform: translateY(1px);
}
.m-btn-primary {
  background: var(--g);
  color: #fff;
  border: 0;
}
.m-btn-primary:hover {
  background: var(--g2);
}
.m-btn-ghost {
  background: transparent;
  color: var(--g);
  border: 1px solid var(--g);
}
.m-btn-ghost:hover {
  background: #ecfdf5;
}
.m-btn-accent {
  background: #1656a8;
  color: #fff;
  border: 0;
}
.m-btn-accent:hover {
  background: #0f4080;
}

/* Responsive: stack cards and buttons on mobile */
@media (max-width: 600px) {
  .m-facts {
    grid-template-columns: 1fr;
  }
  .m-cards {
    grid-template-columns: 1fr;
  }
  .m-actions {
    flex-direction: column;
  }
  .m-btn {
    justify-content: center;
    width: 100%;
  }
  .detail-title {
    font-size: 1.2rem;
  }
  .dialog-head .eyebrow {
    font-size: 13px;
  }
}

/* ─── Responsive: tablet ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .day {
    padding: 6px 8px;
    min-height: auto;
  }
  .day strong {
    font-size: 13px;
    margin: 2px 0 4px;
  }
  .calitem {
    font-size: 10px;
    padding: 4px 6px;
  }
}

/* ─── Responsive: small tablet ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .cal-grid {
    gap: 4px;
  }
  .day {
    padding: 4px 5px;
  }
  .day strong {
    font-size: 11px;
  }
  .cal-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .cal-head .actions {
    align-self: stretch;
    display: flex;
    gap: 6px;
  }
  .cal-head .actions .btn {
    flex: 1;
  }
  .calendar {
    padding: 14px;
  }
}

/* ─── Responsive: phone (≤ 550px) ───────────────────────────────────────── */
@media (max-width: 550px) {
  .cal-grid {
    gap: 3px;
  }
  .day {
    padding: 2px 2px;
    border-radius: 6px;
  }
  .day strong {
    font-size: 10px;
    margin: 1px 0 2px;
  }
  .calitem {
    font-size: 0;
    padding: 0;
    margin: 1px auto;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    border-left: 0;
    background: #075b45;
    display: block;
  }
  .calitem:hover {
    transform: none;
    box-shadow: none;
  }
  .day small {
    font-size: 9px;
  }
  .calendar {
    padding: 10px;
  }
  .cal-head h1 {
    font-size: 1.1rem;
  }
  .cal-head .btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}


