/* ==========================================================================
   HAINAN TOUR - Travel Package Detail Page (Stayfolio Architectural Editorial)
   Unified Design System: High-Legibility Typography, Crisp Timeline Cards,
   Clean Sticky Pricing Voucher, Seamless 1:1 Consultation Flow.
   ========================================================================== */

.package-detail-body {
  min-height: 100%;
  overflow-y: visible;
}

.package-detail-page {
  padding: 0 0 100px;
  background: #fff;
  min-height: 100vh;
}

.package-detail-page > [data-package-detail] {
  display: flow-root;
  min-height: 100vh;
  background: #fff;
}

/* --------------------------------------------------------------------------
   1. Product gallery and summary
   -------------------------------------------------------------------------- */
.ref-product-overview {
  width: var(--content-width);
  margin: 32px auto 0;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: stretch;
  box-sizing: border-box;
  border: 1px solid #e1e7e9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(24, 33, 38, .045);
}

.ref-product-gallery {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, .8fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 460px;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.ref-product-gallery figure {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #eef2f3;
}

.ref-product-gallery__count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  background: rgba(24, 33, 38, .78);
  color: #fff;
  font-size: .72rem;
  font-weight: 750;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.ref-product-gallery__side {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.ref-product-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.ref-product-gallery figure:hover img {
  transform: scale(1.025);
}

.ref-product-summary {
  position: relative;
  min-width: 0;
  align-self: stretch;
  min-height: 460px;
  height: auto;
  padding: 16px 24px;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto auto auto auto 48px;
  row-gap: 12px;
  align-content: space-between;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.ref-product-summary::before {
  display: none;
}

.ref-product-summary__breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #087e8b;
  font-size: .74rem;
  font-weight: 750;
}

.ref-product-summary__breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.ref-product-summary__breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ref-product-summary__breadcrumb span:last-child {
  color: #7a8790;
}

.ref-product-summary h1 {
  display: block;
  overflow: visible;
  margin: 0;
  color: #182126;
  font-size: clamp(1.5rem, 1.8vw, 1.8rem);
  font-weight: 850;
  line-height: 1.22;
  letter-spacing: -.045em;
}

.ref-product-summary__desc {
  margin: 0;
  color: #56656d;
  font-size: .94rem;
  line-height: 1.62;
  display: block;
  overflow: visible;
}

.ref-product-summary__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 72px;
  height: auto;
  margin: 0;
  padding: 12px 0;
  box-sizing: border-box;
  border-top: 1px solid #e5eaed;
  border-bottom: 1px solid #e5eaed;
}

.ref-product-summary__meta div {
  min-width: 0;
}

.ref-product-summary__meta dt {
  margin-bottom: 6px;
  color: #7a8790;
  font-size: .72rem;
  font-weight: 700;
}

.ref-product-summary__meta dd {
  overflow: visible;
  margin: 0;
  color: #182126;
  font-size: .92rem;
  font-weight: 800;
  white-space: normal;
}

.ref-product-summary__features {
  align-content: start;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  overflow: visible;
  list-style: none;
}

.ref-product-summary__features li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  position: relative;
  padding-left: 19px;
  color: #334155;
  font-size: .84rem;
  font-weight: 650;
  line-height: 1.45;
}

.ref-product-summary__features li::before {
  content: '✓';
  position: absolute;
  top: .05em;
  left: 0;
  color: #087e8b;
  font-weight: 900;
}

.ref-product-summary__features strong {
  color: #087e8b;
  font-size: .76rem;
}

.ref-product-summary__features span {
  display: block;
  min-width: 0;
  overflow: visible;
  white-space: normal;
}

.ref-product-summary__actions {
  position: relative;
  z-index: 2;
  margin: 0;
  background: #fff;
}

.ref-product-summary__cta {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  border-radius: 9px;
  background: #182126;
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.ref-product-summary__cta:hover {
  background: #055e68;
  transform: translateY(-1px);
}

#booking-panel {
  scroll-margin-top: 116px;
}

.ref-gallery-dialog {
  width: min(1080px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.ref-gallery-dialog::backdrop {
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(4px);
}

.ref-gallery-dialog__head {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #e5eaed;
}

.ref-gallery-dialog__head h2 {
  margin: 0;
  font-size: 1rem;
}

.ref-gallery-dialog__head button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef2f3;
  color: transparent;
  font-size: 0;
  line-height: 1;
  place-items: center;
  cursor: pointer;
}
.ref-gallery-dialog__head button::before,
.ref-gallery-dialog__head button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: #182126;
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}
.ref-gallery-dialog__head button::after { transform: translate(-50%, -50%) rotate(-45deg); }

.ref-gallery-dialog__grid {
  display: grid;
  gap: 14px;
  padding: 20px;
  max-height: calc(100dvh - 104px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-color: #9aa4a2 transparent;
  scrollbar-width: thin;
}

.ref-gallery-dialog__grid::-webkit-scrollbar { width: 7px; }
.ref-gallery-dialog__grid::-webkit-scrollbar-track { background: transparent; }
.ref-gallery-dialog__grid::-webkit-scrollbar-thumb { border-radius: 99px; background: #9aa4a2; }

.ref-gallery-dialog__grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #eef2f3;
}

.ref-gallery-dialog__grid img {
  display: block;
  width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   1-1. Top Interactive Travel Configurator Bar (출발/도착/인원 선택 바)
   -------------------------------------------------------------------------- */
.ref-config-bar-wrap {
  display: none;
}

.ref-config-bar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 24px;
  box-shadow: 0 8px 25px rgba(24, 33, 38, 0.06);
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.ref-config-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ref-config-label {
  font-size: .72rem;
  font-weight: 750;
  color: #71717a;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ref-config-date {
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: .88rem;
  font-weight: 650;
  color: #182126;
  background: #ffffff;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.ref-config-date:focus {
  border-color: #182126;
}

.ref-config-divider {
  color: #a1a1aa;
  font-size: .9rem;
  align-self: center;
  padding-top: 14px;
}

.ref-config-val {
  font-size: .88rem;
  font-weight: 700;
  color: #182126;
  padding: 7px 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  white-space: nowrap;
}

.ref-config-guest-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
}

.ref-guest-pill {
  font-size: .82rem;
  color: #52525b;
}

.ref-guest-pill b {
  color: #182126;
  font-weight: 750;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ref-mini-stepper {
  display: inline-flex;
  gap: 4px;
}

.btn-mini-counter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #d4d4d8;
  background: #ffffff;
  color: #182126;
  font-size: .88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}

.btn-mini-counter:hover:not(:disabled) {
  border-color: #182126;
  background: #f1f5f9;
}

.btn-mini-counter:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.ref-config-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.ref-config-price-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.ref-config-total-label {
  font-size: .72rem;
  color: #71717a;
  font-weight: 600;
}

.ref-config-total-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #df6042;
  letter-spacing: -.02em;
}

.ref-config-cta-btn {
  padding: 10px 20px;
  background: #182126;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
  transition: background .18s ease;
  white-space: nowrap;
}

.ref-config-cta-btn:hover {
  background: #000000;
}

/* Sidebar Interactive Stepper */
.ref-sidebar-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ref-sidebar-date-input {
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: .84rem;
  color: #182126;
  font-weight: 600;
  outline: none;
  font-family: inherit;
}

.ref-sidebar-date-input:focus {
  border-color: #182126;
}

.ref-sidebar-total-row {
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
}

.ref-sidebar-total-row span {
  font-size: .84rem;
  color: #71717a;
  font-weight: 600;
  white-space: nowrap;
}

.ref-sidebar-total-row strong {
  justify-self: end;
  font-size: 1.25rem;
  font-weight: 800;
  color: #df6042;
  line-height: 1.2;
  white-space: nowrap;
}

.ref-sidebar-total-row small {
  width: 100%;
  min-width: 0;
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: 2px;
  color: #718087;
  font-size: .72rem;
  line-height: 1.4;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

/* --------------------------------------------------------------------------
   2. Main 2-Column Split Container
   -------------------------------------------------------------------------- */
.ref-detail-container {
  width: var(--content-width);
  margin: 24px auto 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}

.ref-main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  container-type: inline-size;
  container-name: golf-detail-main;
}

.ref-section-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(max-content, 1fr));
  overflow-x: auto;
  background: rgba(255, 255, 255, .96);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  scrollbar-width: none;
  backdrop-filter: blur(10px);
}

.ref-section-nav::-webkit-scrollbar {
  display: none;
}

.ref-section-nav a {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #64748b;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}

.ref-section-nav a::after {
  content: '';
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 3px;
  background: #087e8b;
  border-radius: 3px 3px 0 0;
  opacity: 0;
  transform: scaleX(.5);
  transition: opacity .18s ease, transform .18s ease;
}

.ref-section-nav a:hover,
.ref-section-nav a.is-active {
  color: #087e8b;
}

.ref-section-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

[data-detail-section] {
  scroll-margin-top: 78px;
}

.ref-intro-copy {
  max-width: 720px;
  margin: 14px 0 28px;
  color: #475569;
  font-size: 1rem;
  line-height: 1.8;
}

.ref-tour-editorial {
  margin-top: 22px;
  display: grid;
  gap: 34px;
}

.ref-tour-editorial h3 {
  margin: 0 0 14px;
  color: #182126;
  font-size: 1rem;
  font-weight: 800;
}

.ref-tour-editorial__overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 0 28px;
  align-items: center;
}

.ref-tour-editorial__overview h3 {
  grid-column: 1 / -1;
}

.ref-tour-editorial__overview > p {
  max-width: none;
  margin: 0;
  color: #475569;
  font-size: .95rem;
  line-height: 1.8;
}

.ref-tour-editorial__overview dl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 4px 0 4px 24px;
  border-left: 1px solid #dfe7e9;
}

.ref-tour-editorial__overview dt {
  color: #708090;
  font-size: .76rem;
  font-weight: 750;
}

.ref-tour-editorial__overview dd {
  margin: 0;
  color: #182126;
  font-size: 1rem;
  font-weight: 850;
}

.ref-tour-editorial__points ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  list-style: none;
  border-top: 1px solid #e3e9eb;
}

.ref-tour-editorial__points li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #e3e9eb;
}

.ref-tour-editorial__points li > span {
  padding-top: 2px;
  color: #087e8b;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .05em;
}

.ref-tour-editorial__points strong {
  display: block;
  color: #182126;
  font-size: .9rem;
  line-height: 1.45;
}

.ref-tour-editorial__points p {
  margin: 6px 0 0;
  color: #66757d;
  font-size: .82rem;
  line-height: 1.6;
}

.ref-intro-summary {
  padding: 4px 0 0;
}

.ref-intro-overview {
  display: block;
  margin: 0;
  padding: 0 0 24px;
}

.ref-intro-overview div {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.ref-intro-overview dt {
  color: #708090;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.ref-intro-overview dd {
  margin: 0;
  color: #182126;
  font-size: 1.05rem;
  font-weight: 800;
}

.ref-package-basics h4 {
  margin: 0 0 22px;
  padding-top: 22px;
  border-top: 1px solid #dfe5e8;
  color: #7c8a9c;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.ref-package-basics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.ref-package-basic-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-width: 0;
  align-items: center;
  align-content: start;
  column-gap: 8px;
  row-gap: 9px;
  padding: 0 22px;
  border-left: 1px solid #e5eaed;
  text-align: left;
}

.ref-package-basic-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.ref-package-basic-item:last-child {
  padding-right: 0;
}

.ref-package-basic-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
}

.ref-package-basic-icon img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.ref-package-basic-heading {
  min-width: 0;
}

.ref-package-basic-heading strong {
  color: #087e8b;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.ref-package-basic-detail > strong {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 3em;
  color: #182126;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ref-package-basic-detail {
  grid-column: 1 / -1;
}

.ref-package-basic-detail p {
  display: none;
}

.ref-package-basics {
  margin-top: 0;
}

.ref-intro-section {
  padding-bottom: 26px;
}

.ref-cancellation-list {
  border-top: 1px solid #e5e7eb;
}

.ref-cancellation-list div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 2px;
  border-bottom: 1px solid #e5e7eb;
  color: #475569;
  font-size: .9rem;
}

.ref-cancellation-list strong {
  color: #182126;
}

.ref-policy-note {
  margin: 18px 0 0;
  color: #7c8799;
  font-size: .8rem;
  line-height: 1.65;
}

.ref-section {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  padding: 54px 36px 42px;
  box-shadow: none;
}

.ref-section + .ref-section {
  padding-top: 112px;
}

@media (max-width: 767px) {
  .ref-section + .ref-section {
    padding-top: 72px;
  }
}

.ref-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 1.32rem;
  font-weight: 800;
  color: #182126;
  letter-spacing: -.02em;
}

.ref-section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  border-radius: 999px;
  background: #0b7f89;
}

.ref-section-title::after {
  content: '';
  height: 1px;
  flex: 1 1 auto;
  margin-left: 4px;
  background: linear-gradient(90deg, #d7e3e5 0%, rgba(215, 227, 229, 0) 100%);
}

.ref-section-desc {
  margin: 0 0 22px;
  font-size: .88rem;
  color: #64748b;
  line-height: 1.55;
}

.ref-section-desc strong {
  color: #087e8b;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. Day Cards & Accordion Timeline
   -------------------------------------------------------------------------- */
.ref-itinerary-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ref-day-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  background: #ffffff;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

/* Compact date-first itinerary: keep only the information needed to scan a day. */
.ref-day-card--compact {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ref-day-card--compact:hover,
.ref-day-card--compact.is-open {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.ref-day-date-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 32px;
  min-height: 52px;
  align-items: center;
  padding: 0 14px 0 20px;
  border-top: 1px solid #aeb8bc;
  border-bottom: 1px solid #cbd3d6;
  background: #f3f4f4;
}

.ref-day-date-head strong {
  color: #182126;
  font-size: .96rem;
}

.ref-day-date-head time {
  color: #33464e;
  font-size: .92rem;
}

.ref-day-date-head .ref-day-chevron {
  justify-self: end;
  background: transparent;
}

.ref-day-card--compact .ref-day-timeline {
  margin: 0;
  padding: 20px 20px 28px 46px;
  border-bottom: 0;
}

.ref-day-card--compact .ref-day-title {
  margin: 0 0 2px;
  color: #182126;
  font-size: 1rem;
}

.ref-day-card--compact .ref-day-timeline::before {
  display: none;
}

.ref-day-card--compact .ref-timeline-item:not(.ref-timeline-item--last)::after {
  position: absolute;
  top: 16px;
  bottom: -25px;
  left: -21px;
  width: 1px;
  background: #8fc1c6;
  content: '';
}

.ref-day-card--compact .ref-timeline-item {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
}

.ref-day-card--compact .ref-timeline-content p {
  margin-top: 3px;
  color: #75848a;
  font-size: .78rem;
  line-height: 1.45;
}

.ref-day-card--compact .ref-timeline-content {
  display: grid;
  gap: 3px;
}

.ref-timeline-stage {
  color: #24363d;
  font-size: .86rem;
  font-weight: 750;
}

.ref-timeline-place,
.ref-day-card--compact .ref-timeline-course-link {
  color: #718087;
  font-size: .78rem;
  font-weight: 450;
  line-height: 1.4;
}

.ref-day-essentials {
  display: grid;
  gap: 0;
  width: 100%;
  margin: 38px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid #dce3e2;
  border-bottom: 0;
  background: transparent;
}

.ref-day-options-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 13px;
}

.ref-day-options-head strong {
  color: #087e8b;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: -.01em;
}

.ref-day-options-head span {
  color: #8a969b;
  font-size: .68rem;
}

.ref-day-essential {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 14px 0;
}
.ref-day-essential + .ref-day-essential {
  border-top: 0;
}

.ref-day-essential__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #4f5b60;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1;
}

.ref-day-essential__label .ref-essential-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  fill: none;
  color: #4e585d;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ref-day-essential__label .ref-icon-fill {
  fill: currentColor;
  stroke: none;
}

.ref-day-essential__label .ref-essential-icon--golf {
  width: 30px;
  height: 30px;
  margin-inline: -1px;
  stroke-width: 1.6;
}

.ref-day-essential__label .ref-essential-icon--meal {
  width: 25px;
  height: 25px;
  margin-inline: 1px 2px;
}

.ref-day-essential > div {
  display: grid;
  gap: 3px;
}

.ref-day-essential > div strong {
  color: #344248;
  font-size: .84rem;
}

.ref-hotel-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.ref-hotel-detail-trigger {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ref-hotel-detail-trigger > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: #7b878c;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .16s ease, stroke .16s ease;
}

.ref-hotel-detail-trigger:hover > svg {
  stroke: #087e8b;
  transform: translateX(3px);
}

.ref-hotel-detail-trigger:focus-visible {
  border-radius: 4px;
  outline: 2px solid #087e8b;
  outline-offset: 4px;
}

.ref-hotel-detail-trigger--static {
  cursor: default;
}

.ref-hotel-rating--stars-only {
  margin-left: 4px;
}

.ref-hotel-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ref-hotel-rating b {
  color: #555d61;
  font-size: .74rem;
  font-weight: 700;
}

.ref-hotel-rating > span {
  color: #f5b61b;
  font-size: .84rem;
  letter-spacing: 1px;
  line-height: 1;
}

.ref-hotel-grade-select {
  display: inline-flex;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #66757d;
  font-size: .74rem;
  font-weight: 600;
}

.ref-hotel-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 3px;
}

.ref-hotel-options .ref-hotel-grade-select {
  margin-top: 0;
}

.ref-hotel-options > small {
  flex-basis: 100%;
  color: #8a969b;
  font-size: .68rem;
}

.ref-hotel-grade-select small {
  flex-basis: 100%;
  color: #8a969b;
  font-size: .68rem;
  font-weight: 450;
}

.ref-hotel-grade-select select {
  min-width: 116px;
  height: 34px;
  padding: 0 30px 0 11px;
  border: 1px solid #d8e3e2;
  border-radius: 9px;
  background: #fff;
  color: #26383f;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.ref-hotel-grade-select select:focus-visible {
  outline: 2px solid #087e8b;
  outline-offset: 2px;
}

.ref-transport-select {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  color: #66757d;
  font-size: .74rem;
  font-weight: 600;
}

.ref-transport-select select {
  min-width: 122px;
  height: 34px;
  padding: 0 30px 0 11px;
  border: 1px solid #d8e3e2;
  border-radius: 9px;
  background: #fff;
  color: #26383f;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.ref-transport-select select:focus-visible {
  outline: 2px solid #087e8b;
  outline-offset: 2px;
}

.ref-tour-course-detail {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid #dbe6e4;
  border-radius: 12px;
  background: #f7faf9;
}

.ref-tour-course-detail[hidden],
.ref-tour-detail-more[hidden] {
  display: none;
}

.ref-tour-course-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ref-tour-course-detail__head span {
  color: #087e8b;
  font-size: .73rem;
  font-weight: 750;
}

.ref-tour-course-detail__head strong {
  color: #df6042 !important;
  font-size: .78rem !important;
  white-space: nowrap;
}

.ref-tour-course-detail > p,
.ref-tour-detail-more p {
  margin: 0;
  color: #34464d;
  font-size: .76rem;
  line-height: 1.65;
}

.ref-tour-course-detail > small {
  color: #77868c;
  font-size: .69rem;
  line-height: 1.55;
}

.ref-tour-day-select {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  color: #66757d;
  font-size: .72rem;
  font-weight: 650;
}

.ref-tour-day-select select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid #d4dfdd;
  border-radius: 8px;
  background: #fff;
  color: #26383f;
  font: inherit;
  font-weight: 700;
}

.ref-tour-detail-toggle {
  width: max-content;
  margin-top: 2px;
  padding: 0 0 2px;
  border-bottom: 1px solid #087e8b;
  background: transparent;
  color: #087e8b;
  font-size: .71rem;
  font-weight: 750;
}

.ref-tour-detail-more {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #dce5e3;
}

.ref-hotel-modal {
  width: min(720px, calc(100vw - 40px));
  max-height: min(820px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #182126;
  box-shadow: 0 28px 80px rgba(12, 24, 28, .24);
}

.ref-hotel-modal::backdrop {
  background: rgba(13, 22, 26, .58);
  backdrop-filter: blur(3px);
}

.ref-hotel-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid #e5e9e8;
}

.ref-hotel-modal__head span {
  color: #087e8b;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .11em;
}

.ref-hotel-modal__head h2 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}

.ref-hotel-modal__close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f3;
  color: #273338;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.ref-hotel-modal__body {
  display: grid;
  gap: 20px;
  max-height: calc(100dvh - 130px);
  padding: 24px 26px 28px;
  overflow-y: auto;
}

.ref-hotel-modal__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ref-hotel-modal__gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 11px;
}

.ref-hotel-modal__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ref-hotel-modal__title-row h3,
.ref-hotel-modal__title-row p {
  margin: 0;
}

.ref-hotel-modal__title-row h3 {
  font-size: 1.1rem;
}

.ref-hotel-modal__title-row p {
  margin-top: 4px;
  color: #748187;
  font-size: .76rem;
}

.ref-hotel-modal__stars {
  color: #596267;
  font-size: .78rem;
  white-space: nowrap;
}

.ref-hotel-modal__stars b {
  margin-left: 5px;
  color: #f5b61b;
  letter-spacing: 1px;
}

.ref-hotel-modal__description {
  margin: 0;
  color: #526269;
  font-size: .9rem;
  line-height: 1.7;
}

.ref-hotel-modal__facts {
  margin: 0;
  border-top: 1px solid #e5e9e8;
}

.ref-hotel-modal__facts > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e9e8;
}

.ref-hotel-modal__facts dt {
  color: #7a878c;
  font-size: .8rem;
}

.ref-hotel-modal__facts dd {
  margin: 0;
  color: #26343a;
  font-size: .86rem;
  font-weight: 700;
}

.ref-hotel-modal__notice {
  margin: 0;
  color: #77858a;
  font-size: .75rem;
  line-height: 1.55;
}

@media (max-width: 639px) {
  .ref-day-options-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .ref-hotel-detail-trigger {
    flex-wrap: wrap;
  }

  .ref-hotel-grade-select {
    width: 100%;
    justify-content: space-between;
  }

  .ref-hotel-modal__head {
    padding-inline: 18px;
  }

  .ref-hotel-modal__body {
    padding: 18px;
  }

  .ref-hotel-modal__gallery {
    gap: 6px;
  }

  .ref-hotel-modal__title-row {
    display: grid;
  }

  .ref-hotel-modal__facts > div {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
  }
}

.ref-day-essential > div small {
  color: #829096;
  font-size: .69rem;
  line-height: 1.4;
}

.ref-itinerary-gallery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 88px);
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 11px;
}

.ref-itinerary-gallery__example {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 1;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(24, 33, 38, .78);
  color: #fff;
  font-size: .56rem;
  font-weight: 650;
  line-height: 1;
  pointer-events: none;
}

.ref-itinerary-gallery figure {
  width: 88px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin: 0;
  border: 1px solid #e0e5e4;
  border-radius: 10px;
  background: #eef1f0;
}

.ref-itinerary-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-itinerary-gallery__detail-trigger {
  cursor: pointer;
}

.ref-itinerary-gallery__detail-trigger img {
  transition: transform .18s ease, filter .18s ease;
}

.ref-itinerary-gallery__detail-trigger:is(:hover, :focus-visible) img {
  transform: scale(1.035);
  filter: brightness(.94);
}

.ref-itinerary-gallery__detail-trigger:focus-visible {
  outline: 2px solid #0b8791;
  outline-offset: 2px;
}

.ref-day-essentials .ref-itinerary-gallery {
  grid-template-columns: repeat(3, 74px);
  gap: 7px;
  margin-top: 9px;
}

.ref-day-essentials .ref-itinerary-gallery figure {
  width: 74px;
  border-radius: 8px;
}

.ref-day-essential p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  margin: 0;
  color: #63737a;
  font-size: .76rem;
}

.ref-day-essential p b {
  color: #33464e;
  font-weight: 700;
}

.ref-day-essential p i {
  color: #b4c0c3;
  font-style: normal;
}

@media (max-width: 639px) {
  .ref-day-essential {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .ref-itinerary-gallery {
    grid-template-columns: repeat(3, minmax(0, 72px));
    gap: 6px;
  }

  .ref-itinerary-gallery figure {
    width: min(72px, 100%);
  }

  .ref-day-essentials {
    padding-inline: 0;
  }

  .ref-day-essentials .ref-itinerary-gallery {
    grid-template-columns: repeat(3, minmax(0, 62px));
  }

  .ref-day-essentials .ref-itinerary-gallery figure {
    width: min(62px, 100%);
  }

  .ref-tour-course-detail {
    padding: 12px;
  }

  .ref-tour-course-detail__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

.ref-day-card--compact .ref-day-meals-bar {
  margin-top: 4px;
  padding-top: 14px;
}

.ref-day-card:hover {
  border-color: #182126;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(24, 33, 38, 0.04);
}

.ref-day-card.is-open {
  border-color: #cbdde0;
  box-shadow: 0 8px 24px rgba(24, 33, 38, .05);
}

.ref-day-img {
  width: 88px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}

.ref-day-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ref-day-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ref-day-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ref-day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #182126;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .04em;
}

.ref-day-title {
  margin: 0;
  font-size: .98rem;
  font-weight: 750;
  color: #182126;
  letter-spacing: -.015em;
}

.ref-day-desc {
  margin: 0;
  font-size: .82rem;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: keep-all;
}

.ref-day-action-col {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 650;
  flex-shrink: 0;
}

.ref-day-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.ref-day-card.is-open .ref-day-chevron {
  transform: rotate(180deg);
  background: #182126;
  color: #ffffff;
}

.ref-day-timeline {
  position: relative;
  grid-column: 1 / -1;
  margin-top: 14px;
  padding: 24px 6px 6px 38px;
  border-top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ref-day-timeline::before {
  content: '';
  position: absolute;
  top: 30px;
  bottom: 14px;
  left: 15px;
  width: 2px;
  border-radius: 2px;
  background: #dcebed;
}

.ref-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: color .16s ease;
}

.ref-timeline-item::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 5px;
  left: -26px;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 2px solid #087e8b;
  border-radius: 50%;
  background: #fff;
}

.ref-timeline-item--last::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 18px;
  bottom: -22px;
  left: -24px;
  width: 4px;
  background: #fff;
}

.ref-timeline-item:hover {
  background: transparent;
}

.ref-timeline-item:hover .ref-timeline-content strong {
  color: #11171a;
}

.ref-timeline-item time {
  font-size: .76rem;
  font-weight: 700;
  line-height: 20px;
  color: #087e8b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ref-timeline-content {
  min-width: 0;
  transform: translateY(-2px);
}

.ref-timeline-content strong {
  display: block;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.35;
  color: #182126;
  margin-bottom: 2px;
}

.ref-timeline-content p {
  margin: 0;
  font-size: .78rem;
  color: #64748b;
  line-height: 1.4;
}

.ref-day-timeline .ref-day-meals-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid #e6ecee;
  background: #fff;
}

.ref-day-timeline .ref-day-meals-label {
  position: relative;
  z-index: 2;
  padding-right: 9px;
  background: #fff;
  color: #096f78;
  font-size: .72rem;
  font-weight: 850;
}

.ref-day-timeline .ref-meal-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #e7eeee;
  border-radius: 999px;
  background: #f7f9f9;
  color: #52616a;
  font-size: .72rem;
  line-height: 1.35;
}

.ref-day-timeline .ref-meal-item strong {
  color: #087e8b;
  font-size: .7rem;
  font-weight: 750;
}

.ref-timeline-view-tag {
  font-size: .72rem;
  font-weight: 700;
  color: #087e8b;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* --------------------------------------------------------------------------
   4. Inclusions & Exclusions Grid
   -------------------------------------------------------------------------- */
.ref-terms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ref-terms-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 22px;
  background: #ffffff;
}

.ref-terms-head {
  font-size: .95rem;
  font-weight: 750;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ref-terms-head--inc { color: #087e8b; }
.ref-terms-head--exc { color: #71717a; }

.ref-terms-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ref-terms-list li {
  font-size: .82rem;
  color: #52525b;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   5. Notice Card
   -------------------------------------------------------------------------- */
.ref-notice-card {
  background: #f8fafc;
  border-left: 2px solid #b8dadd;
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
}

.ref-notice-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .92rem;
  font-weight: 750;
  color: #182126;
  margin: 0 0 10px;
}

.ref-notice-icon {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  padding: 3px;
  border-radius: 50%;
  background: #e8f4f4;
  color: #087e8b;
}

.ref-notice-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #64748b;
  font-size: .8rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   6. Right Sticky Pricing Card (Stayfolio Voucher)
   -------------------------------------------------------------------------- */
.ref-sidebar {
  position: sticky;
  top: calc(80px + 36px);
  margin-top: 40px;
}

.ref-sticky-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px 26px 22px;
  box-shadow: 0 1px 4px rgba(24, 33, 38, 0.02);
}

.ref-spec-table {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-bottom: 22px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 26px;
}

.ref-spec-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: .88rem !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.ref-spec-key {
  color: #71717a;
  font-weight: 500;
}

.ref-spec-val {
  color: #182126;
  font-weight: 700;
}

.ref-booking-action-wrap {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
  gap: 8px;
}

.ref-booking-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: #182126;
  color: #ffffff;
  font-size: .94rem;
  font-weight: 750;
  cursor: pointer;
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ref-booking-btn:hover {
  background: #000000;
}

.ref-booking-btn--payment {
  border: 1px solid #df6042;
  background: #df6042;
}

.ref-booking-btn--payment:hover {
  border-color: #cb4f32;
  background: #cb4f32;
}

.ref-booking-btn--payment:disabled {
  border-color: #d9dfdf;
  background: #eef1f1;
  color: #98a3a6;
  cursor: not-allowed;
}

.ref-booking-hint {
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: .68rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.ref-booking-hint span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ref-booking-hint span::before {
  content: '✓';
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 50%;
  background: #e8f4f4;
  color: #087e8b;
  font-size: .58rem;
  font-weight: 900;
}

.ref-booking-hint span + span {
  padding-left: 12px;
  border-left: 1px solid #dfe5e8;
}

/* --------------------------------------------------------------------------
   7. Concierge Booking Modal & Course Detail Modal
   -------------------------------------------------------------------------- */
.ref-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.ref-modal-box {
  background: #ffffff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  max-height: 90dvh;
  overflow-y: auto;
}

/* Course Detail Popup Modal (.ref-course-modal-box) */
.ref-course-modal-box {
  background: #ffffff;
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
  position: relative;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn .2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ref-course-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.ref-course-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  color: #182126;
  letter-spacing: -.02em;
}

.ref-course-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ref-course-modal-img {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
}

.ref-course-modal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ref-course-modal-img-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(24, 33, 38, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ref-img-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
}

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

.ref-modal-section-title {
  margin: 0;
  font-size: .95rem;
  font-weight: 750;
  color: #182126;
  letter-spacing: -.01em;
}

.ref-course-modal-desc-wrap {
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
}

.ref-modal-desc-text {
  margin: 0;
  font-size: .86rem;
  color: #52525b;
  line-height: 1.55;
  word-break: keep-all;
}

.ref-course-modal-specs-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-course-modal-specs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-modal-spec-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.ref-spec-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .76rem;
  font-weight: 750;
  color: #087e8b;
}

.ref-spec-text {
  font-size: .84rem;
  color: #182126;
  font-weight: 550;
}

.ref-spec-included-badge {
  font-size: .7rem;
  font-weight: 750;
  color: #087e8b;
  background: #e6f6f5;
  padding: 2px 7px;
  border-radius: 4px;
}

.ref-modal-meta-bar {
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: .8rem;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.ref-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ref-meta-key {
  color: #64748b;
}

.ref-meta-val {
  color: #0f172a;
  font-weight: 700;
}

.ref-meta-divider {
  width: 1px;
  height: 12px;
  background: #cbd5e1;
}

.ref-course-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
  background: #ffffff;
}

.ref-course-modal-confirm-btn {
  width: 100%;
  padding: 13px;
  background: #182126;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: .92rem;
  font-weight: 750;
  cursor: pointer;
  transition: background .16s ease;
}

.ref-course-modal-confirm-btn:hover {
  background: #000000;
}

.ref-booking-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.ref-booking-eyebrow {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: #087e8b;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.ref-booking-modal-header h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #182126;
}

.ref-booking-sub {
  margin: 0;
  font-size: .8rem;
  color: #71717a;
  line-height: 1.4;
}

.ref-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}

.ref-modal-close:hover {
  color: #182126;
}

.ref-booking-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 20px;
}

.ref-booking-product-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.ref-booking-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-booking-product-info {
  min-width: 0;
}

.ref-booking-product-badge {
  font-size: .68rem;
  color: #087e8b;
  font-weight: 700;
  display: block;
}

.ref-booking-product-title {
  margin: 0 0 2px;
  font-size: .88rem;
  font-weight: 750;
  color: #182126;
}

.ref-booking-product-meta {
  font-size: .78rem;
  color: #64748b;
}

.ref-booking-product-price {
  color: #df6042;
  font-weight: 750;
}

.ref-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ref-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ref-form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: #182126;
  margin-bottom: 5px;
}

.ref-req-dot {
  color: #df6042;
}

.ref-input,
.ref-select,
.ref-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  font-size: .86rem;
  color: #182126;
  box-sizing: border-box;
}

.ref-input:focus,
.ref-select:focus,
.ref-textarea:focus {
  outline: none;
  border-color: #182126;
}

.ref-booking-trust-strip {
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin: 4px 0;
}

.ref-trust-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .74rem;
  color: #64748b;
}

.ref-modal-submit-btn {
  width: 100%;
  padding: 13px;
  background: #182126;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: .92rem;
  font-weight: 750;
  cursor: pointer;
  transition: all .16s ease;
}

.ref-modal-submit-btn:hover {
  background: #000000;
}

/* --------------------------------------------------------------------------
   8. Responsive Media Queries
   -------------------------------------------------------------------------- */
/* Stack the booking column before the main content becomes compressed. */
@media (max-width: 1199px) {
  .ref-product-overview {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .ref-product-gallery {
    min-height: 420px;
    height: 420px;
  }
  .ref-product-summary {
    height: auto;
  }
  .ref-config-bar {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .ref-config-divider {
    display: none;
  }
  .ref-config-action {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
  .ref-detail-container {
    grid-template-columns: 1fr;
  }
  .ref-sidebar {
    position: static;
    margin-top: 28px;
  }
}

@media (max-width: 767px) {
  .ref-product-overview {
    margin-top: 20px;
    padding: 12px;
    gap: 24px;
    border-radius: 0;
  }
  .ref-product-gallery {
    min-height: 360px;
    height: 360px;
  }
  .ref-product-summary {
    padding: 24px 22px 22px;
  }
  .ref-section {
    padding: 40px 20px 30px;
  }
  .ref-section + .ref-section {
    padding-top: 58px;
  }
  .ref-intro-summary {
    padding: 2px 0 0;
  }
  .ref-package-basics-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .ref-package-basic-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 2px 12px;
    align-items: start;
    padding: 0;
    border-left: 0;
    text-align: left;
  }
  .ref-package-basics {
    margin-top: 0;
  }
  .ref-package-basic-icon {
    grid-row: 1 / 3;
    width: 30px;
    height: 30px;
  }
  .ref-package-basic-icon img {
    width: 27px;
    height: 27px;
  }
  .ref-package-basic-heading,
  .ref-package-basic-detail {
    grid-column: 2;
  }
  .ref-package-basic-detail > strong {
    max-width: none;
  }
  .ref-package-basic-heading {
    padding-top: 1px;
  }
  .ref-terms-grid {
    grid-template-columns: 1fr;
  }
  .ref-day-card {
    grid-template-columns: 68px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
  }
  .ref-day-img {
    width: 68px;
    height: 52px;
  }
  .ref-timeline-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .ref-day-timeline {
    padding-right: 0;
    padding-left: 30px;
  }
  .ref-day-timeline::before {
    left: 11px;
  }
  .ref-timeline-item::before {
    left: -23px;
  }
  .ref-timeline-action-col {
    margin-top: 2px;
  }
  .ref-form-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 639px) {
  .ref-product-overview {
    width: calc(100% - 32px);
    padding: 10px;
    gap: 22px;
  }
  .ref-product-gallery {
    display: block;
    min-height: 0;
    height: auto;
    padding: 0;
  }
  .ref-product-gallery__main {
    aspect-ratio: 4 / 3;
  }
  .ref-product-gallery__side {
    margin-top: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 8px;
  }
  .ref-product-gallery__side figure {
    aspect-ratio: 16 / 10;
  }
  .ref-product-summary h1 {
    font-size: 1.65rem;
  }
  .ref-product-summary__desc {
    margin: 14px 0 18px;
    font-size: .9rem;
  }
  .ref-product-summary__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ref-product-summary__meta div:last-child {
    grid-column: 1 / -1;
  }
  .ref-tour-editorial {
    gap: 28px;
  }
  .ref-tour-editorial__overview {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .ref-tour-editorial__overview h3 {
    grid-column: auto;
    margin-bottom: 0;
  }
  .ref-tour-editorial__overview dl {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 0 0;
    border-top: 1px solid #e3e9eb;
    border-left: 0;
  }
  .ref-tour-editorial__points li {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 16px 0;
  }
}

/* Final compact-itinerary overrides stay last to avoid legacy card rules. */
.ref-day-card.ref-day-card--compact {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ref-day-card.ref-day-card--compact:hover,
.ref-day-card.ref-day-card--compact.is-open {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

@media (max-width: 639px) {
  .ref-day-date-head {
    grid-template-columns: 64px minmax(0, 1fr) 28px;
    padding-inline: 14px 10px;
  }

  .ref-day-date-head time {
    font-size: .82rem;
  }

  .ref-day-card--compact .ref-day-timeline {
    padding: 22px 14px 24px 34px;
  }

  .ref-day-card--compact .ref-day-timeline::before {
    left: 17px;
  }

  .ref-day-card--compact .ref-timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ref-product-gallery img {
    transition: none;
  }
  .ref-product-summary__cta {
    transition: none;
  }
  .ref-product-summary__cta:hover {
    transform: none;
  }
}

/* Desktop visual baseline: clean white canvas and lighter editorial typography. */
@media (min-width: 1024px) {
  html:has(.package-detail-body),
  body.package-detail-body,
  .package-detail-body .package-detail-page {
    background: #fff !important;
  }

  .ref-product-overview {
    margin-top: 44px;
    padding: 0;
    gap: 42px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .ref-product-summary { padding: 10px 0 8px; }
  .ref-product-summary__breadcrumb { font-weight: 500; }
  .ref-product-summary h1 { font-weight: 600; letter-spacing: -.035em; }
  .ref-product-summary__desc { color: #5f6b72; font-weight: 400; line-height: 1.72; }
  .ref-product-summary__meta dt { font-weight: 400; }
  .ref-product-summary__meta dd { font-weight: 600; }
  .ref-product-summary__features li { color: #4f5d65; font-weight: 400; }
  .ref-product-summary__features strong { font-weight: 600; }
  .ref-product-summary__cta { font-weight: 600; }

  .ref-detail-container { margin-top: 40px; }
  .ref-main-content,
  .ref-section,
  .ref-sticky-card { background: #fff; box-shadow: none; }
  .ref-section-nav a { font-weight: 500; }
  .ref-section-title { font-weight: 600; }
  .ref-section-desc,
  .ref-intro-copy { font-weight: 400; }
  .ref-day-title,
  .ref-terms-head,
  .ref-notice-title { font-weight: 600; }
  .ref-day-desc,
  .ref-terms-list li,
  .ref-notice-list,
  .ref-cancellation-list div { font-weight: 400; }
  .ref-spec-key { font-weight: 400; }
  .ref-spec-val,
  .ref-sidebar-total-row strong { font-weight: 600; }
  .ref-booking-btn { font-weight: 600; }
}

@media (max-width: 639px) {
  .ref-main-content {
    gap: 0;
  }
  .ref-section-nav {
    grid-template-columns: repeat(5, max-content);
    border-radius: 0;
  }
  .ref-section-nav a {
    min-height: 52px;
    padding: 0 16px;
    font-size: .84rem;
  }
  .ref-section-nav a::after {
    right: 14px;
    left: 14px;
  }
  .ref-intro-overview {
    margin-bottom: 34px;
  }
  .ref-cancellation-list div {
    flex-direction: column;
    gap: 4px;
  }
  .ref-config-bar {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }
}

/* Primary mobile viewport: 390px */
@media (max-width: 430px) {
  .ref-modal-backdrop { padding: 0; align-items: flex-end; overflow: hidden; }
  .ref-modal-box,
  .ref-course-modal-box {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: 0;
    border-radius: 22px 22px 0 0;
  }
  .ref-modal-box { padding: 22px 18px; }
  .ref-course-modal-header { padding: 16px 18px; }
  .ref-course-modal-body { padding: 16px 18px; gap: 14px; }
  .ref-course-modal-img { height: 170px; }
  .ref-course-modal-desc-wrap { padding: 12px; }
  .ref-modal-spec-row { grid-template-columns: 24px minmax(0,1fr); gap: 8px; padding: 10px; }
  .ref-spec-included-badge { grid-column: 2; width: max-content; }
  .ref-course-modal-footer { padding: 14px 18px max(14px, env(safe-area-inset-bottom)); }
  .ref-booking-product-card { align-items: flex-start; padding: 10px; }
  .ref-booking-product-price { display: block; margin-top: 4px; white-space: normal; overflow-wrap: anywhere; }
  .ref-form-grid-2 { grid-template-columns: 1fr; }
  .ref-hotel-modal {
    width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
  .ref-hotel-modal__body { padding: 18px; }
  .ref-hotel-modal__gallery { grid-template-columns: 1fr; }
  .ref-hotel-modal__gallery img { min-height: 180px; }
}
