/* PeanutStay v19 — responsive Customer / Host / Admin portals.
   Presentation-only, no database, permissions, booking or session changes. */
:root { -webkit-text-size-adjust:100%;text-size-adjust:100%; }
.shell,.main-content,.panel,.cards,.cards>*,.ps-stat-grid,.ps-stat-grid>*,
.ps-property-grid,.ps-property-grid>*,.ps-form,.ps-form>*,
.psv17-layout,.psv17-layout>*,.psg-form-shell { min-width:0; }
.page-portal .panel,.page-auth .panel { max-width:100%; }
.page-portal :is(input,select,textarea),.page-auth :is(input,select,textarea) { max-width:100%; }
.page-portal img,.page-auth img { max-width:100%; }
/* Tables remain usable: swipe inside the table instead of forcing whole-page overflow. */
.scroll { max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#6e6473 transparent; }
.scroll table { width:max-content;max-width:none; }
/* Tablet layout: less empty space and consistent card proportions. */
@media (max-width:1100px) {
  .shell { width:calc(100% - 40px);max-width:100%; }
  .page-auth .main-content { width:calc(100% - 40px); }
  .nav { gap:12px; }
  .intro { padding:30px 0 14px; }
  .cards { grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
  .panel { padding:clamp(18px,2.6vw,26px); }
  .ps-link-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ps-property-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
  .psv17-layout { grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); }
  .ps-user-editor { flex-wrap:wrap;gap:9px; }
  .ps-user-editor label { min-width:140px; }
  .psg-existing,.psg-new-previews { gap:10px; }
}
@media (max-width:880px) {
  .cards,.ps-property-grid,.psv17-layout { grid-template-columns:minmax(0,1fr); }
  .ps-stat-grid,.ps-link-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .psv17-layout>*,.psv17-layout>.panel { min-width:0; }
  .auth-layout { grid-template-columns:1fr;gap:15px;padding-top:20px;min-height:0; }
  .auth-scene { min-height:250px;max-height:320px; }
  .auth-panel { padding:clamp(20px,4vw,38px); }
  .psg-existing,.psg-new-previews { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:760px) {
  html { scroll-padding-top:75px; }
  .shell,.page-auth .main-content { width:calc(100% - 28px); }
  .top .nav { min-height:65px;gap:9px; }
  .top .brand { gap:8px;font-size:clamp(1rem,4.3vw,1.2rem);letter-spacing:-.05em; }
  .top .brand-mark { width:38px;height:38px;flex:0 0 38px;border-radius:10px; }
  .top .mobile-nav>summary { min-height:44px;padding:8px 13px; }
  .top .mobile-nav>nav { position:fixed;top:calc(70px + env(safe-area-inset-top,0px));left:14px;right:14px;max-width:none;width:auto;max-height:calc(100dvh - 86px);overflow-y:auto;overscroll-behavior:contain;border-radius:16px;padding:13px;z-index:150; }
  .top .mobile-nav>nav .nav-link,.top .mobile-nav>nav .logout-button { min-height:44px;display:flex;align-items:center;padding:10px 13px;justify-content:flex-start;text-align:left; }
  .top .mobile-nav>nav .logout-form { margin:4px 0 0; }
  .intro { padding:27px 0 14px; }
  .intro h1 { font-size:clamp(1.85rem,7vw,2.4rem);line-height:1.16;overflow-wrap:anywhere; }
  .intro-sub { font-size:.88rem; }
  .panel { padding:18px;border-radius:16px;margin:12px 0 18px; }
  .heading,.ps-lead { align-items:stretch;gap:12px; }
  .heading .primary { width:100%; }
  .cards,.ps-stat-grid,.ps-link-grid,.ps-property-grid { grid-template-columns:1fr;gap:13px; }
  .ps-stat { padding:17px 20px; }
  .ps-stat strong { font-size:1.65rem; }
  .ps-link-card { min-height:0;padding:17px; }
  .ps-property-body { padding:17px; }
  .ps-button-row { gap:8px; }
  .ps-button-row .secondary { min-height:44px; }
  .twocol,.ps-form .twocol { grid-template-columns:1fr;gap:0; }
  .ps-grid-4 { grid-template-columns:repeat(2,minmax(0,1fr));gap:9px; }
  .ps-form label { min-width:0; }
  .ps-form :is(input,select,textarea) { width:100%;min-width:0; }
  .ps-form button.primary { min-height:48px;width:100%; }
  .psg-form-shell { padding:18px; }
  .psg-existing,.psg-new-previews { grid-template-columns:repeat(2,minmax(0,1fr));gap:9px; }
  .psg-upload-box { padding:17px 12px; }
  .psg-upload-box input[type=file] { min-height:52px; }
  .psg-photo-head { gap:9px; }
  .psg-form-header h2,.psg-photo-head h2 { font-size:clamp(1.2rem,5vw,1.55rem); }
  .psg-admin-photos { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
  .psv17-layout,.psv17-calendar-split { grid-template-columns:1fr; }
  .psv17-panel,.psv17-calendar-card,.psv17-rules-card,.psv17-block-section { padding:17px; }
  .psv17-month-grid { gap:4px; }
  .psv17-calendar-day,.psv17-calendar-empty { min-height:40px; }
  .psv17-calendar-day { border-radius:8px;font-size:.81rem; }
  .psv17-month-arrows a,.psv17-disabled-arrow { min-height:44px;min-width:44px; }
  .psv17-calendar-key { gap:8px 12px; }
  .psv17-block-form .twocol { grid-template-columns:1fr; }
  .ps-date-control { min-width:0; }
  .ps-date-control input[type=date] { width:100%;min-width:0; font-size:16px; }
  .ps-date-open { min-width:45px;min-height:48px;flex:0 0 45px; }
  .ps-cal-records .ps-block-row { flex-wrap:wrap; }
  .ps-actions { align-items:stretch; }
  .ps-actions label { flex-basis:100%;min-width:0; }
  .ps-actions button { min-height:44px; }
  .scroll table { min-width:740px; }
  .ps-user-table { min-width:950px; }
  .footer { align-items:flex-start;flex-direction:column;gap:9px; }
  .footer>div:last-child { display:flex;gap:18px;flex-wrap:wrap; }
  .page-auth .auth-scene { min-height:225px;max-height:300px; }
  .page-auth .auth-panel { padding:23px 19px; }
  .page-auth .auth-panel h1 { font-size:clamp(1.85rem,7vw,2.35rem); }
  .page-auth :is(input,select,textarea),.page-portal :is(input,select,textarea) { font-size:16px; }
}
@media (max-width:430px) {
  .shell,.page-auth .main-content { width:calc(100% - 24px); }
  .top .mobile-nav>nav { left:10px;right:10px; }
  .panel { padding:15px;border-radius:14px; }
  .psv17-panel,.psv17-calendar-card,.psv17-rules-card,.psv17-block-section { padding:14px; }
  .psv17-month-grid { gap:3px; }
  .psv17-calendar-day,.psv17-calendar-empty { min-height:37px; }
  .psv17-calendar-day { font-size:.75rem;border-radius:6px; }
  .psv17-calendar-head h2 { font-size:1.18rem; }
  .psv17-month-arrows a,.psv17-disabled-arrow { min-height:40px;min-width:40px; }
  .ps-grid-4 { grid-template-columns:repeat(2,minmax(0,1fr));gap:7px; }
  .psg-existing,.psg-new-previews { gap:7px; }
  .psg-photo-tools { padding:7px; }
  .ps-confirm-details { gap:9px; }
  .ps-confirm-details .ps-confirm-total { gap:8px; }
  .ps-confirm-details .ps-confirm-total dd { font-size:1rem; }
  .ps-confirm-actions .ps-confirm-submit { width:100%; }
  .ps-user-editor { align-items:stretch; }
  .ps-user-editor label { flex-basis:100%;min-width:0; }
}
@media (max-width:350px) {
  .psv17-calendar-day,.psv17-calendar-empty { min-height:32px;font-size:.7rem; }
  .psg-existing,.psg-new-previews { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:reduce) {
  .page-auth .auth-scene,.page-portal .panel { transition:none!important; }
}
