/* ============================================================
   HOME TAB
   ============================================================ */
.home-banner {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  cursor: pointer;
}
.home-banner img { width: 100%; height: auto; display: block; }
.home-banner-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(6, 11, 19, 0) 0%, var(--bg) 94%);
  pointer-events: none;
}
.home-banner-actions {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.home-banner-actions .hdr-btn {
  display: flex; align-items: center; gap: 5px;
  border: none; cursor: pointer; font-family: inherit; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; font-size: 11px; font-weight: 600;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.home-banner-actions .hdr-btn-info { background: rgba(6, 11, 19, .55); border: 1px solid rgba(56, 189, 248, .4); color: var(--blue); }
.home-banner-actions .hdr-btn-contact { background: linear-gradient(135deg, var(--blue2), var(--blue)); color: #fff; box-shadow: 0 3px 10px rgba(2, 132, 199, .35); }
.hdr-greet {
  position: absolute;
  left: 50%; bottom: -64px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 440px;
  background: rgba(6, 11, 19, .5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.hdr-greet img {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(56, 189, 248, .5);
  flex-shrink: 0;
}
.hdr-greet h2 { font-size: 13.5px; font-weight: 700; color: #fff; }
.hdr-greet p { font-size: 11px; color: #cbd5e1; margin-top: 2px; }

/* ============================================================
   HOME BOOKING STEPS + GREETING SEARCH
   ============================================================ */
.hdr-greet .home-greet-copy{min-width:0;flex:1;}
.home-greet-search{
  position:relative;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-left:auto;
}
.home-greet-search-btn{
  appearance:none;border:1px solid rgba(56,189,248,.30);outline:0;
  width:42px;height:42px;border-radius:14px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,rgba(12,29,45,.96),rgba(8,18,30,.98));
  color:#7dd3fc;font-size:20px;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 7px 20px rgba(0,0,0,.22);
  transition:transform .16s ease,border-color .18s ease,box-shadow .18s ease;
}
.home-greet-search-btn:active{transform:scale(.92)}
.home-greet-search.open .home-greet-search-btn{
  border-color:rgba(56,189,248,.62);
  box-shadow:0 0 0 3px rgba(56,189,248,.08),0 7px 20px rgba(0,0,0,.22);
}
.home-greet-search-box{
  position:absolute;right:0;top:calc(100% + 9px);z-index:40;
  width:min(285px,calc(100vw - 54px));
  padding:8px;
  display:flex;align-items:center;gap:7px;
  background:rgba(6,14,24,.98);
  border:1px solid rgba(56,189,248,.28);
  border-radius:15px;
  box-shadow:0 16px 38px rgba(0,0,0,.42);
  opacity:0;visibility:hidden;transform:translateY(-7px) scale(.97);
  transform-origin:top right;
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
}
.home-greet-search.open .home-greet-search-box{opacity:1;visibility:visible;transform:none}
.home-greet-search-box .search-ico{font-size:16px;opacity:.75;padding-left:4px}
#homeSearchInput{
  min-width:0;flex:1;border:0;outline:0;background:transparent;
  color:#f8fafc;font:inherit;font-size:12px;
}
#homeSearchInput::placeholder{color:#64748b}
.home-search-clear{
  appearance:none;border:0;background:transparent;color:#64748b;
  width:28px;height:28px;border-radius:9px;font-size:16px;cursor:pointer;
}

/* แถบขั้นตอนการจอง — วางเหนือ 3 กล่องหน้า Home */
.home-booking-steps{
  position:absolute;
  left:auto;
  right:18px;
  bottom:22px;
  transform:none;
  z-index:3;

  /* จำกัดความกว้างให้อยู่เฉพาะพื้นที่ว่างด้านขวาของรูป */
  width:min(230px,54%);
  max-width:230px;

  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:1fr 10px 1fr 10px 1fr 10px 1fr;
  align-items:start;

  /* ลอยทับบนรูป Header โดยตรง — ไม่มีกรอบ/พื้นหลัง */
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
  pointer-events:none;
}
.home-step{min-width:0;text-align:center;position:relative}
.home-step-icon{
  width:30px;height:30px;margin:0 auto 5px;border-radius:50%;
  display:grid;place-items:center;
  border:1px solid rgba(100,116,139,.30);
  background:rgba(5,13,23,.68);
  color:#718096;font-size:13px;
  box-shadow:0 4px 13px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.home-step-label{
  font-size:7.4px;font-weight:800;line-height:1.15;color:#64748b;white-space:nowrap;
}
.home-step-line{
  height:2px;border-radius:99px;margin-top:14px;
  background:rgba(100,116,139,.20);position:relative;overflow:hidden;
}
.home-step .home-step-icon{
  transition:
    color .20s ease,
    border-color .20s ease,
    background .20s ease,
    box-shadow .20s ease,
    transform .20s ease;
}
.home-step .home-step-label{
  transition:color .20s ease,text-shadow .20s ease;
}
.home-step-line{
  transition:background .22s ease,box-shadow .22s ease;
}

/* วงที่ผ่านแล้วจะติดสีฟ้าค้างไว้ */
.home-step.sequence-on .home-step-icon{
  color:#06111c;
  border-color:rgba(125,211,252,.94);
  background:linear-gradient(135deg,#9ce4ff,#38bdf8);
  box-shadow:
    0 0 0 5px rgba(56,189,248,.09),
    0 0 21px rgba(56,189,248,.38),
    0 6px 16px rgba(0,0,0,.24);
}
.home-step.sequence-on .home-step-label{
  color:#dff6ff;
  text-shadow:0 0 9px rgba(56,189,248,.30);
}

/* เฉพาะวงที่เพิ่งติด: ขยายขึ้นแล้วหดกลับเป็นปกติ */
.home-step.sequence-hit .home-step-icon{
  animation:tnhStepArrive .54s cubic-bezier(.18,.9,.22,1);
}
@keyframes tnhStepArrive{
  0%{transform:scale(1)}
  42%{
    transform:scale(1.23);
    box-shadow:
      0 0 0 8px rgba(56,189,248,.13),
      0 0 32px rgba(56,189,248,.60),
      0 8px 20px rgba(0,0,0,.25);
  }
  72%{transform:scale(.97)}
  100%{transform:scale(1)}
}

/* เส้นจะติดสีฟ้าค้างตามวงที่เดินถึง */
.home-step-line.sequence-on{
  background:linear-gradient(90deg,rgba(56,189,248,.28),#7dd3fc,rgba(56,189,248,.32));
  box-shadow:0 0 8px rgba(56,189,248,.28);
}
.home-step-line.sequence-hit{
  animation:tnhStepLineArrive .45s ease;
}
@keyframes tnhStepLineArrive{
  0%{filter:brightness(1)}
  45%{filter:brightness(1.9)}
  100%{filter:brightness(1)}
}

/* ไอคอน "เลือกทริป" — เครื่องหมายถูกขยายเล็ก/ใหญ่ในวงกลม */
.step-check-mark{
  display:inline-block;
  font-size:17px;
  font-weight:1000;
  line-height:1;
  transform-origin:center;
  animation:tnhStepCheckBeat 1.35s ease-in-out infinite;
}
@keyframes tnhStepCheckBeat{
  0%,100%{transform:scale(.78)}
  45%{transform:scale(1.18)}
  62%{transform:scale(1.02)}
}

/* ไอคอน "กรอกข้อมูล" — ดินสอขยับเหมือนกำลังเขียน */
.step-pencil-wrap{
  position:relative;
  width:21px;
  height:19px;
  display:block;
}
.step-pencil{
  position:absolute;
  left:2px;
  top:0;
  display:block;
  font-size:17px;
  line-height:1;
  transform-origin:75% 75%;
  animation:tnhPencilWrite 1.65s ease-in-out infinite;
}
.step-pencil-line{
  position:absolute;
  left:3px;
  bottom:1px;
  width:15px;
  height:2px;
  border-radius:99px;
  background:currentColor;
  opacity:.75;
  overflow:hidden;
}
.step-pencil-line::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.72);
  transform-origin:right center;
  animation:tnhPencilLine 1.65s ease-in-out infinite;
}
@keyframes tnhPencilWrite{
  0%,100%{transform:translate(0,0) rotate(-16deg)}
  22%{transform:translate(3px,1px) rotate(-9deg)}
  44%{transform:translate(6px,0) rotate(-17deg)}
  66%{transform:translate(9px,1px) rotate(-8deg)}
  82%{transform:translate(5px,0) rotate(-14deg)}
}
@keyframes tnhPencilLine{
  0%{transform:scaleX(1)}
  65%{transform:scaleX(.08)}
  82%,100%{transform:scaleX(1)}
}

@media (max-width:380px){
  .step-check-mark{font-size:15px}
  .step-pencil-wrap{transform:scale(.88)}
}
@media (prefers-reduced-motion:reduce){
  .step-check-mark,.step-pencil,.step-pencil-line::after{animation:none}
}

@media (max-width:380px){
  .home-booking-steps{
    right:12px;
    bottom:18px;
    width:min(205px,56%);
    max-width:205px;
    grid-template-columns:1fr 7px 1fr 7px 1fr 7px 1fr;
  }
  .home-step-icon{width:27px;height:27px;font-size:12px}
  .home-step-label{font-size:6.7px}
  .home-step-line{height:2px;margin-top:13px}
}
@media (prefers-reduced-motion:reduce){
  .home-step.sequence-hit .home-step-icon,.home-step-line.sequence-hit{animation:none}
}

.home-quick-actions { display: flex; gap: 10px; margin-bottom: 16px; margin-top: 16px; }
.home-quick-actions .qa-mini { flex: 1; width: auto; height: 62px; }
.qa-mini {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  animation: qaBeat 1.8s ease-in-out infinite;
  transition: transform .15s;
}
.qa-mini:active { transform: scale(.92); }
.qa-mini .qa-mini-ico { font-size: 27px; }
.qa-mini .qa-mini-label { font-size: 9.5px; font-weight: 800; color: rgba(0, 0, 0, .75); line-height: 1; }
.qa-trip-mini { background: linear-gradient(145deg, #ffe066, #ffc400); box-shadow: 0 5px 14px rgba(255, 196, 0, .4); }
.qa-rent-mini { background: linear-gradient(145deg, #34e89e, #0bb96f); box-shadow: 0 5px 14px rgba(11, 185, 111, .4); }
.qa-mytrips-mini { background: linear-gradient(145deg, #7dd3fc, #0284c7); box-shadow: 0 5px 14px rgba(2, 132, 199, .4); }
.qa-mytrips-mini .qa-mini-label { color: rgba(255, 255, 255, .95); }
@keyframes qaBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-hdr h3 { font-size: 16px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }

/* กล่องแยกทริปตามเดือน ในหน้า "ทริปทั้งหมด" — การ์ดรูปสวยๆ เหมือนการ์ดทริป */
.month-group { margin-bottom: 22px; }
.month-photo-card {
  position: relative; border-radius: 20px; overflow: hidden; cursor: pointer;
  min-height: 190px; box-shadow: 0 8px 22px rgba(0,0,0,.3);
}
.month-photo-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.month-photo-card .month-fade-img { opacity: 0; will-change: opacity; }
.month-photo-card .month-fade-img:first-child { opacity: 1; }

.month-photo-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,11,19,.9) 0%, rgba(6,11,19,.6) 45%, rgba(6,11,19,.2) 100%);
}
.month-photo-card-overlay { position: relative; z-index: 1; padding: 16px 18px 14px; display: flex; flex-direction: column; min-height: 190px; justify-content: flex-start; }
.month-photo-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.month-photo-card-title { font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.55); }
.month-group-count { font-size: 11.5px; font-weight: 700; color: #7dd3fc; background: rgba(56,189,248,.2); border: 1px solid rgba(125,211,252,.3); border-radius: 10px; padding: 3px 10px; backdrop-filter: blur(4px); }
.month-group-arrow { display: inline-block; font-size: 16px; color: #fff; font-weight: 900; transition: transform .2s; }
.month-trip-names { display: flex; flex-direction: column; gap: 5px; }
.month-trip-name-item { font-size: 13px; font-weight: 400; color: #f1f5f9; text-shadow: 0 1px 4px rgba(0,0,0,.5); }

#upcomingList::-webkit-scrollbar { display: none; }
#upcomingList { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
#upcomingList .trip-hcard2 { flex: 0 0 100%; min-height: auto; scroll-snap-align: start; scroll-snap-stop: always; }

.stat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, .08), rgba(16, 185, 129, .05));
  border: 1px solid rgba(56, 189, 248, .12);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 20px;
}
.stat-bar .ico { font-size: 24px; }
.stat-bar .txt h4 { font-size: 13px; color: #fff; font-weight: 700; }
.stat-bar .txt p { font-size: 11px; color: var(--sub); margin-top: 2px; }

/* ============================================================
   TRIP CARD — "Expedition Ticket" premium design
   ============================================================ */
.trip-list { display: flex; flex-direction: column; gap: 16px; }

/* การ์ดทริปวนโชว์ทีละใบ (จะเปิดจองเร็วๆนี้ / ทริปที่ผ่านมา) — จางเข้า/จางออกตอนสลับใบ */
.trip-cycle-slide { animation: tripCycleFadeIn .5s ease; background: transparent; }
.trip-cycle-slide.fade-out { animation: tripCycleFadeOut .5s ease forwards; }
@keyframes tripCycleFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tripCycleFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Safari แยกชั้น filter ของการ์ดล็อกออกจาก parent บางจังหวะ
   เฟดผิวการ์ดโดยตรงด้วย เพื่อไม่ให้เหลือกล่องทึบระหว่างเปลี่ยนใบ */
#closedList .trip-cycle-slide.fade-out .trip-hcard2,
#closedList .trip-cycle-slide.fade-out .thc-photo {
  animation: closedTripSurfaceFadeOut .5s ease forwards;
}
@keyframes closedTripSurfaceFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.trip-hcard {
  position: relative;
  display: block;
  background: linear-gradient(165deg, #18140d, #0e0c08);
  border: 1px solid rgba(212, 175, 55, .22);
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.trip-hcard:hover { transform: translateY(-3px); border-color: rgba(212, 175, 55, .55); box-shadow: 0 16px 36px rgba(0, 0, 0, .55); }
.trip-hcard:active { transform: scale(.985); }

.lux-photo { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #0e0c08; }
.lux-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.trip-hcard:hover .lux-photo img { transform: scale(1.05); }
.lux-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 12, 8, 0) 42%, rgba(14, 12, 8, .95) 100%); }

.lux-status {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .2px;
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.lux-status.open { background: rgba(16, 185, 129, .88); color: #04150e; }
.lux-status.almost { background: linear-gradient(135deg, #f4d160, #c9971f); color: #241800; animation: hb .9s infinite; }
.lux-status.full { background: rgba(239, 68, 68, .9); color: #fff; }
.lux-status.soon { background: rgba(255, 255, 255, .14); color: #f1d488; border-color: rgba(241, 212, 136, .5); }
.lux-status.done { background: rgba(255, 255, 255, .12); color: #d8cdae; }

.lux-price {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  background: linear-gradient(135deg, #f6e2a0, #c9971f);
  color: #241800; font-weight: 800; font-size: 14px;
  padding: 6px 13px; border-radius: 13px 13px 13px 4px;
  box-shadow: 0 5px 12px rgba(201, 151, 31, .4);
}

.lux-locked-ov {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(10, 8, 5, .62);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}

/* เบลอทั้งรูปและข้อความของการ์ด "เร็วๆ นี้"
   เพื่อให้เอฟเฟกต์ต่อเนื่องตลอดการเปลี่ยนใบ รวมถึงบน Safari */
.trip-hcard2.is-locked .thc-photo {
  -webkit-filter: blur(2.2px);
  filter: blur(2.2px);
  transform: translateZ(0) scale(1.025);
  will-change: filter, opacity;
}

/* ============================================================
   TRIP CARD V2 — สไตล์รูปเต็มการ์ด + ข้อความซ้อนบนรูป (ตามแบบอ้างอิง)
   ============================================================ */
.trip-hcard2 {
  position: relative;
  display: block;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  background: #0d1420;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
  transition: transform .18s ease;
}

/* การ์ดที่ยังไม่เปิดจองมีรูปเต็มพื้นที่อยู่แล้ว ไม่ต้องมีสีรองพื้นทึบ
   เมื่อรูปและข้อความกำลังเฟดจึงมองทะลุเห็นพื้นหลังป่า ไม่เหลือกล่องสี่เหลี่ยม */
.trip-hcard2.is-locked {
  background: transparent;
}
.trip-hcard2:active { transform: scale(.98); }

.thc-photo { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; }
.thc-photo img { width: 100%; height: 100%; object-fit: cover; }
.thc-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, .82) 100%); }

.thc-status-pill {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  background: rgba(6, 11, 19, .42); color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .1px;
  backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
.thc-status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #34e89e; box-shadow: 0 0 6px #34e89e; }
.thc-status-pill.full::before { background: #ef6a6a; box-shadow: 0 0 6px #ef6a6a; }
.thc-status-pill.almost::before { background: #f4d160; box-shadow: 0 0 6px #f4d160; }
.thc-status-pill.soon::before { background: #94a3b8; box-shadow: none; }
.thc-status-pill.done::before { background: #94a3b8; box-shadow: none; }

.thc-pickup-pill {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: rgba(6, 11, 19, .42); color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 6px 13px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1px;
  backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
  max-width: 62%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* การ์ดรวมหลายรอบ (สถานที่เดียวกัน ออกหลายวันที่) — กดได้ทั้งการ์ดเหมือนทริปทั่วไป เปิดป็อบอัพเลือกรอบแทนปุ่มเรียงยาว */
.thc-arrow-hint { font-size: 12.5px; font-weight: 700; color: #7dd3fc; }

.thc-overlay { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; }
.thc-title { font-size: 21px; font-weight: 800; color: #fff; line-height: 1.28; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.thc-meta-row { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #e5e7eb; margin-bottom: 16px; }
.thc-meta-row span { display: flex; align-items: center; gap: 5px; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }

.thc-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.thc-price strong { font-size: 26px; font-weight: 900; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.thc-price span { font-size: 12.5px; color: #cbd5e1; margin-left: 4px; }
.thc-seats-pill {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: rgba(16, 185, 129, .16); border: 1px solid rgba(16, 185, 129, .45); color: #7fe3b4;
  backdrop-filter: blur(6px);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.thc-seats-pill.low { background: rgba(245, 158, 11, .16); border-color: rgba(245, 158, 11, .45); color: #f6cd6e; }
.thc-seats-pill.full { background: rgba(239, 68, 68, .16); border-color: rgba(239, 68, 68, .45); color: #f3a0a0; }

.trip-hcard2.compact .thc-photo { aspect-ratio: 16 / 9; }
.trip-hcard2.compact .thc-title { font-size: 16px; margin-bottom: 6px; }
.trip-hcard2.compact .thc-meta-row { font-size: 11px; gap: 12px; margin-bottom: 10px; }
.trip-hcard2.compact .thc-price strong { font-size: 19px; }
.trip-hcard2.compact .thc-seats-pill { font-size: 11px; padding: 6px 12px; }

/* ============================================================
   ประวัติความบ้า (โปรไฟล์) — การ์ดรูปพื้นหลังเต็ม แทนรายการเล็กเดิม
   ============================================================ */
.hist-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.hist-card img { width: 100%; height: 100%; object-fit: cover; }
.hist-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .88) 100%); }
.hist-card-overlay { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; }
.hist-card-overlay h4 { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 5px; text-shadow: 0 2px 8px rgba(0, 0, 0, .55); }
.hist-card-overlay p { font-size: 11.5px; color: #e2e8f0; margin-bottom: 6px; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
/* ปุ่ม "ชำระส่วนที่เหลือ" เต้นจังหวะหัวใจ ดึงดูดความสนใจให้คนสังเกตเห็นง่ายขึ้น */
@keyframes remainPayPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(217, 119, 6, .4); }
  50% { transform: scale(1.06); box-shadow: 0 4px 18px rgba(217, 119, 6, .7); }
}
.remain-pay-btn { animation: remainPayPulse 1.4s ease-in-out infinite; }

/* ป้ายเรืองแสงสีเขียว โชว์ตอนจ่ายค่าทริปครบ 100% แล้ว */
@keyframes paidGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, .5), 0 0 2px rgba(34, 197, 94, .8) inset; }
  50% { box-shadow: 0 0 18px rgba(34, 197, 94, .85), 0 0 4px rgba(34, 197, 94, 1) inset; }
}
.paid-full-badge {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px;
  padding: 7px 12px; font-size: 11.5px; font-weight: 700;
  animation: paidGlow 1.8s ease-in-out infinite;
}
.paid-check-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.hist-card-seat {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  min-width: 50px; padding: 5px 10px;
  border-radius: 12px;
  background: linear-gradient(160deg, #1a2233, #0d131f);
  border: 1px solid rgba(212, 175, 55, .45);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}
.hist-card-seat .mini-seat-label { display: block; font-size: 7px; font-weight: 800; letter-spacing: .5px; color: rgba(246, 226, 160, .6); }
.hist-card-seat .mini-seat-num { display: block; font-size: 14px; font-weight: 900; color: #f6e2a0; line-height: 1.2; }

/* เส้นปรุตั๋ว — องค์ประกอบซิกเนเจอร์ของการ์ด ให้ความรู้สึกเหมือนตั๋วเดินทางใบพรีเมียม */
.lux-stub { position: relative; border-top: 1.5px dashed rgba(212, 175, 55, .35); }
.lux-stub::before, .lux-stub::after {
  content: ''; position: absolute; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg);
}
.lux-stub::before { left: -8px; }
.lux-stub::after { right: -8px; }

.lux-body { padding: 16px 16px 14px; }
.lux-title { font-size: 17.5px; font-weight: 800; color: #f6efe0; line-height: 1.35; letter-spacing: .2px; margin-bottom: 6px; }
.lux-loc { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: #b8ab8c; margin-bottom: 12px; }
.lux-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(212, 175, 55, .14); flex-wrap: wrap; }
.lux-meta-row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.lux-date { font-size: 11px; color: #cbbf9e; display: flex; align-items: center; gap: 5px; }
.lux-days { font-size: 10.5px; color: #8d8168; display: flex; align-items: center; gap: 5px; }
.lux-seats { font-size: 13px; font-weight: 800; }
.lux-seats.ok { color: #5fd1a0; }
.lux-seats.low { color: #f1c14a; }
.lux-seats.full { color: #ef6a6a; }
.lux-cta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: #f1d488; }

/* การ์ดขนาดย่อ — ใช้ในหน้า "ทริปทั้งหมด"/ผลค้นหา ที่มีรายการเยอะ ให้ไล่ดูได้ไวขึ้น */
.trip-hcard.compact .lux-photo { aspect-ratio: 16 / 7; }
.trip-hcard.compact .lux-status { font-size: 10px; padding: 4px 10px; top: 10px; left: 10px; }
.trip-hcard.compact .lux-price { font-size: 12px; padding: 5px 10px; right: 10px; bottom: 10px; }
.trip-hcard.compact .lux-body { padding: 12px 14px 11px; }
.trip-hcard.compact .lux-title { font-size: 15px; margin-bottom: 4px; }
.trip-hcard.compact .lux-loc { font-size: 11px; margin-bottom: 8px; }
.trip-hcard.compact .lux-meta-row { padding-top: 8px; }
.trip-hcard.compact .lux-meta-row2 { margin-top: 5px; }
.trip-hcard.compact .lux-days { font-size: 10px; }
.trip-hcard.compact .lux-seats { font-size: 12px; }
.trip-hcard.compact .lux-cta { font-size: 11px; }

/* ============================================================
   PAST TRIPS GRID
   ============================================================ */
.past-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ============================================================
   TOP TRAVELERS PODIUM — "สายลุยตัวจริง" 3 อันดับที่เดินทางบ่อยสุด
   ============================================================ */
.podium-row { position: relative; isolation: isolate; display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 24px 4px 0; overflow: hidden; border-radius: 22px; }
/* พลุด้านหลังแท่น — CSS ล้วน ไม่เพิ่มโหลดรูป/ไลบรารี */
.podium-row::before,
.podium-row::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 5px; height: 5px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: #fff4b0;
  box-shadow:
    0 -42px 0 #ffe17a, 18px -36px 0 #67e8f9, 34px -22px 0 #f9a8d4,
    42px 0 0 #fde68a, 34px 22px 0 #7dd3fc, 18px 36px 0 #f0abfc,
    0 42px 0 #fde047, -18px 36px 0 #67e8f9, -34px 22px 0 #f9a8d4,
    -42px 0 0 #fde68a, -34px -22px 0 #7dd3fc, -18px -36px 0 #f0abfc;
  animation: podiumFirework 3.4s ease-out infinite;
}
.podium-row::before { left: 24%; top: 38%; }
.podium-row::after { right: 22%; top: 27%; animation-delay: 1.65s; transform: scale(.82); }
@keyframes podiumFirework {
  0%, 30% { opacity: 0; transform: scale(.12); filter: blur(1px); }
  38% { opacity: .95; }
  58% { opacity: .72; transform: scale(1); filter: blur(0); }
  78%, 100% { opacity: 0; transform: scale(1.35); filter: blur(1px); }
}

.podium-slot { flex: 1; max-width: 130px; display: flex; flex-direction: column; align-items: center; }
.podium-avatar {
  position: relative;
  border-radius: 50%;
  overflow: visible;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue2), var(--blue));
  color: #fff; font-weight: 800;
  margin-bottom: 8px;
}
.podium-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transform-origin: 50% 92%; animation: podiumAvatarSway 3.1s ease-in-out infinite; will-change: transform; }
.podium-2nd .podium-avatar img { animation-delay: -.65s; }
.podium-3rd .podium-avatar img { animation-delay: -1.25s; }
@keyframes podiumAvatarSway {
  0%, 100% { transform: rotate(-3deg) translateX(-1px); }
  50% { transform: rotate(3deg) translateX(1px); }
}
@media (prefers-reduced-motion: reduce) {
  .podium-avatar img, .podium-row::before, .podium-row::after { animation: none !important; }
}
.podium-avatar span { font-size: 20px; }
.podium-medal { position: absolute; bottom: -4px; right: -4px; font-size: 20px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.podium-name { font-size: 12.5px; font-weight: 700; color: #fff; text-align: center; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-count { font-size: 10.5px; color: var(--sub); margin-top: 2px; margin-bottom: 10px; }
.podium-stand {
  width: 100%;
  border-radius: 12px 12px 0 0;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 8px;
  font-weight: 900;
  color: rgba(0, 0, 0, .55);
}

.podium-1st .podium-avatar { width: 84px; height: 84px; border: 3px solid #f6e2a0; box-shadow: 0 0 22px rgba(246, 226, 160, .45); }
.podium-1st .podium-stand { height: 84px; background: linear-gradient(180deg, #f6e2a0, #c9971f); font-size: 26px; }
.podium-1st .podium-name { font-size: 14px; }

.podium-2nd .podium-avatar { width: 66px; height: 66px; border: 3px solid #cbd5e1; box-shadow: 0 0 16px rgba(203, 213, 225, .35); }
.podium-2nd .podium-stand { height: 58px; background: linear-gradient(180deg, #cbd5e1, #94a3b8); font-size: 22px; }

.podium-3rd .podium-avatar { width: 66px; height: 66px; border: 3px solid #d9a066; box-shadow: 0 0 16px rgba(217, 160, 102, .35); }
.podium-3rd .podium-stand { height: 42px; background: linear-gradient(180deg, #e3a86b, #b9793f); font-size: 22px; }
.past-card { border-radius: 14px; overflow: hidden; position: relative; cursor: pointer; aspect-ratio: 3 / 4; }
.past-card img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.65); }
.past-card-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px; background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent); }
.past-card-info h5 { font-size: 10px; font-weight: 700; color: #fff; line-height: 1.3; }
.past-card-info p { font-size: 9px; color: var(--sub); }
.past-card-rating { position: absolute; top: 6px; right: 6px; font-size: 9px; background: rgba(0, 0, 0, .6); color: #fbbf24; padding: 2px 5px; border-radius: 5px; font-weight: 700; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-wrap { position: relative; margin-bottom: 18px; }
.search-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 44px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: .2s;
}
.search-wrap input:focus { border-color: var(--blue); }
.s-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--muted); }

/* ================================================================
   CONTACT POPUP — BACKGROUND ONLY
   เปลี่ยนเฉพาะพื้นหลังเท่านั้น ห้ามกระทบ layout/position/size/function
   ================================================================ */
#adminPopup > div {
  background:
    linear-gradient(180deg, rgba(3,10,17,.76), rgba(3,10,17,.88)),
    url('https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1200&q=82') center/cover no-repeat !important;
}

/* ================================================================
   หน้าหลัก: ปฏิทินทริป + ตำแหน่งรถตู้ เป็น 2 กล่องแถวเดียวกัน (2026-09-28)
   ================================================================ */
.home-duo{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.home-duo .home-duo-card{margin-top:0;min-height:0;aspect-ratio:1/1;border-radius:20px}
.home-duo .home-duo-card::after{background:linear-gradient(180deg,rgba(6,11,19,.15) 0%,rgba(6,11,19,.55) 45%,rgba(6,11,19,.92) 100%)}
.home-duo-body{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;justify-content:flex-end;padding:13px 13px 14px}
.home-duo-icon{position:absolute;top:12px;left:12px;width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:rgba(6,11,19,.55);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);font-size:21px;border:1px solid rgba(255,255,255,.12)}
.home-duo-title{font-size:16px;font-weight:800;color:#fff;line-height:1.25;text-shadow:0 2px 8px rgba(0,0,0,.6)}
.home-duo-sub{margin-top:2px;font-size:11.5px;color:#cbd5e1;line-height:1.35;text-shadow:0 1px 4px rgba(0,0,0,.6)}
.home-duo-card::before{content:'›';position:absolute;z-index:2;top:12px;right:14px;font-size:22px;font-weight:900;color:rgba(255,255,255,.85)}
.home-learning:empty{display:none}
.home-learning .ann-learning{margin:14px 0 4px}

/* การ์ดศูนย์การเรียนรู้นักเดินป่า — พื้นหลังป่าแบบเดียวกับป๊อบอัพ (ไม่ทึบ เห็นภาพป่า) */
.home-learning .ann-learning{
  border-color:rgba(105,170,151,.28);
  background:
    radial-gradient(circle at 88% 0%,rgba(52,211,153,.18),transparent 45%),
    linear-gradient(180deg,rgba(3,12,18,.50) 0%,rgba(3,12,18,.72) 55%,rgba(2,10,15,.90) 100%),
    var(--tnh-forest-photo,url('https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=900&q=72')) center/cover no-repeat;
  box-shadow:0 16px 40px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.06);
}
.home-learning .ann-learning:before{background:rgba(52,211,153,.10)}
.home-learning .ann-learning h3{text-shadow:0 2px 8px rgba(0,0,0,.6)}
.home-learning .ann-learning p{color:#c3d6cf}
