/* PeanutStay v19 — responsive finishing for phones and tablets.
   Additive only: leaves search, booking, login and MySQL logic untouched. */
:root { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
#hd, #hd *, .page, .wrap, .dwrap, .dcols, .dcols > *, .grid, .grid > *,
.ps-home-intro, .ps-home-intro > *, .bgrid > *, .tiles > *, .ps-booking-card { min-width:0; }
#hd .hin { width:100%; }
.page img, .page video { max-width:100%; }
.ps-booking-card, .bk { max-width:100%; }
/* Consistent touch targets without distorting desktop layout. */
@media (hover:none), (pointer:coarse) {
  #hd .menu, #hd .nav a, .chip, .ps-date-choice, .ps-slide-arrow,
  .ps-booking-card select, .ps-booking-card #rsv { touch-action:manipulation; }
  .card .nb { opacity:1; }
}
/* Tablet: readable listing widths; side booking box flows below property details. */
@media (max-width:1100px) {
  #hd .right { min-width:0; }
  #hd .nav { z-index:100; }
  #hd .nav.open { max-height:min(75dvh,650px);overflow-y:auto;overscroll-behavior:contain; }
  .ps-home-intro { grid-template-columns:minmax(0,1fr); gap:12px; }
  .dcols { grid-template-columns:minmax(0,1fr); gap:26px; }
  .dcols > .bk, .dcols .ps-booking-card { position:static; width:100%; max-width:680px; }
  .cgrid2,.bgr2 { grid-template-columns:minmax(0,1fr); }
  .bgrid { gap:15px; }
  .inbox { max-width:100%; }
  .pban .pbt { max-width:100%; }
}
/* iPad / small tablet (portrait and landscape). */
@media (min-width:601px) and (max-width:1024px) {
  .wrap,.hin,.chipsrow { padding-left:clamp(20px,3vw,32px);padding-right:clamp(20px,3vw,32px); }
  .hero { padding-left:clamp(20px,3vw,32px);padding-right:clamp(20px,3vw,32px); }
  .grid { grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px;row-gap:25px; }
  .tiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ps-slideshow .heroin { height:clamp(430px,57vw,540px); min-height:430px; }
  .ps-slideshow .ps-hero-copy { padding-inline:clamp(28px,5vw,48px); }
  .ps-host-gallery { height:clamp(300px,48vw,440px); }
  .hero .pill { width:min(100%,880px); }
  .dcols .ps-booking-card { margin-inline:auto; }
  .fgrid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .wrap,.hin,.chipsrow { padding-left:16px;padding-right:16px; }
  .hero { padding:0 16px; }
  #hd .hin { grid-template-columns:minmax(0,1fr) auto; min-height:64px; gap:9px; }
  #hd .logo { max-width:60vw;white-space:nowrap; }
  #hd .logo > span:last-child { min-width:0; }
  #hd .menu { min-width:44px;min-height:44px;padding:8px 12px;border-radius:12px; }
  #hd .nav { left:0;right:0;top:100%;padding-left:16px;padding-right:16px; }
  #hd .nav.open { max-height:min(76dvh,650px);overflow-y:auto; padding:10px 16px 14px; box-shadow:0 20px 35px #0007; }
  #hd .nav a { display:flex;align-items:center;min-height:44px;width:100%;padding:10px 14px; }
  #hd .ps-login-cta { min-height:42px; }
  .ps-slideshow .heroin { height:clamp(390px,103vw,490px);min-height:390px; }
  .ps-slideshow .ps-hero-copy { max-width:100%;padding:22px 23px 88px; }
  .ps-slideshow .ps-hero-copy h1 { font-size:clamp(30px,7.6vw,44px); }
  .ps-slideshow .ps-hero-copy p { font-size:14px;line-height:1.52; }
  .ps-slider-controls { left:22px;right:22px;bottom:30px; }
  .hero .pill { display:grid;grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px;padding:10px;border-radius:18px;margin:12px auto 0;width:100%; }
  .hero .pill > div { width:100%;min-width:0;margin:0;border-radius:10px;padding:8px 11px; }
  .hero .pill label { margin:0 0 3px; }
  .hero .pill :is(input,select) { display:block;width:100%;min-width:0;max-width:100%;font-size:16px!important; }
  .hero .pill input[type=date] { min-width:0;min-height:44px; }
  .hero .pill button { grid-column:1/-1;width:100%;margin:0;min-height:44px;border-radius:11px; }
  .ps-home-intro { padding-top:26px;gap:10px; }
  .ps-home-intro h2 { font-size:clamp(23px,5vw,32px); }
  .grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:23px 14px; }
  .card,.card .r1 { min-width:0; }
  .card .r1 { align-items:flex-start;gap:5px;flex-wrap:wrap; }
  .card .r1 b { overflow-wrap:anywhere; }
  .card .r1 span { white-space:normal; }
  .tiles { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
  .gal:not(.ps-host-gallery) { height:290px;min-height:0; }
  .gal.ps-host-gallery { width:100%;height:330px; }
  .ps-host-gallery > .all { right:10px;bottom:10px;max-width:calc(100% - 20px);white-space:normal;text-align:center; }
  .dcols { margin-top:24px;gap:22px; }
  .bk,.ps-booking-card { padding:18px; }
  .ps-booking-card .ps-date-choice { min-height:57px!important; }
  .ps-booking-card .ps-booking-guests select { min-height:49px;font-size:16px; }
  .ps-booking-card .ps-calendar-popup { max-width:100%; }
  .ps-booking-card .ps-cal-days { grid-template-columns:repeat(7,minmax(0,1fr)); }
  .ps-booking-card .ps-cal-days button.ps-cal-day { min-width:0;max-width:100%; }
  .bgrid,.fgrid { grid-template-columns:1fr;gap:14px; }
  .band { padding:30px 0;margin-top:36px; }
  .cgrid2,.bgr2,.trow.two,.cform .two { grid-template-columns:1fr; }
  .pban { min-height:175px;height:240px; }
  .pbt h1 { font-size:clamp(1.6rem,6vw,2.4rem); }
  .cform { padding:18px; }
  .fcta { padding:20px; }
  .inbox { grid-template-columns:1fr;grid-template-rows:150px minmax(0,1fr);height:auto; }
  .mt2 { height:min(66dvh,550px);min-height:340px; }
  .mwrap,.narrow2 { padding-left:16px;padding-right:16px; }
  .bwrap { padding-top:16px; }
  .bkc,.bgr2 { gap:14px; }
}
@media (max-width:520px) {
  .hero { padding-inline:12px; }
  .wrap,.hin,.chipsrow { padding-left:14px;padding-right:14px; }
  #hd .hin { min-height:58px; }
  #hd .logo { font-size:clamp(18px,5vw,22px);letter-spacing:-.045em; }
  #hd .logo .mk { width:31px;height:31px;flex:0 0 31px; }
  #hd .ps-login-cta { font-size:12px;padding:8px 10px; }
  .ps-slideshow .heroin { height:425px;min-height:425px;border-radius:18px; }
  .ps-slideshow .ps-hero-copy { padding:22px 19px 78px; }
  .ps-slideshow .ps-hero-copy h1 { font-size:clamp(29px,8vw,38px); }
  .ps-slideshow .ps-hero-copy p { font-size:13px;margin:10px 0 14px; }
  .ps-slider-controls { left:18px;right:18px;bottom:18px; }
  .ps-slider-counter { display:none; }
  .hero .pill { gap:7px;padding:9px; }
  .hero .pill > div { padding:7px 9px; }
  .hero .pill :is(input,select) { font-size:16px!important; }
  .grid { grid-template-columns:1fr;gap:21px; }
  .ph { aspect-ratio:4/3; }
  .tiles { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
  .tile { min-width:0; }
  .tile .tp { aspect-ratio:4/3; }
  .gal.ps-host-gallery { height:265px; }
  .gal:not(.ps-host-gallery) { height:265px; }
  .gal.ps-single-photo { height:265px; }
  .dwrap { padding-top:14px; }
  .dcols { margin-top:18px; }
  .ps-booking-card { padding:16px; }
  .ps-booking-card .ps-date-choice { padding:10px!important; }
  .ps-booking-card .ps-date-choice .ps-date-value { font-size:12px; }
  .ps-booking-card .ps-calendar-popup { padding:12px 9px; }
  .ps-booking-card .ps-cal-days button.ps-cal-day { height:36px;font-size:11px; }
  .ps-booking-card .ps-cal-days>span { font-size:10px; }
  .pban { height:210px;min-height:0; }
  .narrow,.narrow2 { padding-left:14px;padding-right:14px; }
  .fcta .wb { display:inline-flex; }
  .mb { padding:25px 17px 18px; }
}
@media (max-width:365px) {
  #hd .hin { gap:5px; }
  #hd .logo { font-size:18px;gap:5px; }
  #hd .ps-login-cta { font-size:11px;padding:7px 8px; }
  #hd .menu { padding:7px 10px; }
  .hero .pill { grid-template-columns:1fr; }
  .hero .pill button { grid-column:1; }
  .ps-booking-card .ps-cal-days { gap:2px; }
  .ps-booking-card .ps-cal-days button.ps-cal-day { height:33px;font-size:10.5px; }
  .ps-booking-card .ps-date-choice .ps-date-value { font-size:11px; }
}
@media (prefers-reduced-motion:reduce) {
  .ps-host-gallery>.gi img,.ps-booking-card .ps-date-choice { transition:none!important; }
}
