:root{
  --orientation-bg:#FDF9F3;
  --orientation-accent:#C5A059;
  --orientation-text:#4A4238;
}

.orientation-shell{
  position:relative;
  min-height:100vh;
}

.orientation-guard{
  display:none;
}

@media screen and (orientation: landscape) and (max-width: 950px){
  html,
  body{
    width:100%;
    min-height:100%;
    overflow:hidden;
    background:var(--orientation-bg);
  }

  .orientation-guard{
    display:none !important;
  }

  body.is-mobile-landscape .orientation-shell{
    position:fixed;
    top:50%;
    left:50%;
    width:100vh;
    height:100vw;
    overflow-x:hidden;
    overflow-y:auto;
    background:#FFFFFF;
    box-shadow:0 0 0 1px rgba(197, 160, 89, 0.16), 0 18px 42px rgba(74, 66, 56, 0.12);
    transform-origin:center center;
  }

  body.is-mobile-landscape .modal,
  body.is-mobile-landscape .viewing-modal,
  body.is-mobile-landscape .map-nav-sheet{
    position:fixed !important;
    top:50% !important;
    left:50% !important;
    right:auto !important;
    bottom:auto !important;
    width:100vh !important;
    height:100vw !important;
    overflow:hidden;
    transform-origin:center center;
  }

  body.is-mobile-landscape.is-mobile-landscape-right .orientation-shell,
  body.is-mobile-landscape.is-mobile-landscape-right .modal,
  body.is-mobile-landscape.is-mobile-landscape-right .viewing-modal,
  body.is-mobile-landscape.is-mobile-landscape-right .map-nav-sheet{
    transform:translate(-50%, -50%) rotate(-90deg);
  }

  body.is-mobile-landscape.is-mobile-landscape-left .orientation-shell,
  body.is-mobile-landscape.is-mobile-landscape-left .modal,
  body.is-mobile-landscape.is-mobile-landscape-left .viewing-modal,
  body.is-mobile-landscape.is-mobile-landscape-left .map-nav-sheet{
    transform:translate(-50%, -50%) rotate(90deg);
  }

  body.is-mobile-landscape .whatsapp-widget{
    display:none !important;
  }

  .orientation-shell .page{
    min-height:100%;
    padding:20px 16px calc(96px + var(--mobile-safe-bottom, 0px));
  }

  .orientation-shell .top{
    grid-template-columns:1fr !important;
    align-items:center !important;
    gap:18px !important;
  }

  .orientation-shell .year-title,
  .orientation-shell .year-switch,
  .orientation-shell .top-menu{
    justify-self:center !important;
    text-align:center !important;
  }

  .orientation-shell .year-title{
    font-size:clamp(2.2rem, 12vw, 3rem) !important;
    letter-spacing:0.08em !important;
  }

  .orientation-shell .year-switch{
    gap:16px !important;
    row-gap:10px !important;
    justify-content:center !important;
  }

  .orientation-shell .top-menu,
  .orientation-shell .below-calendar-actions{
    display:none !important;
  }

  .orientation-shell .grid{
    grid-template-columns:1fr !important;
  }

  .orientation-shell .month{
    gap:22px;
    padding:24px 18px 20px;
    border-radius:22px;
  }

  .orientation-shell .days-grid{
    gap:8px 6px;
  }

  .orientation-shell .day-btn{
    min-height:46px;
    padding:8px;
    font-size:0.92rem;
  }

  .orientation-shell .calendar-legend{
    gap:18px;
    font-size:0.78rem;
  }

  .orientation-shell .mobile-month-jump{
    display:grid !important;
    gap:10px;
    margin:0 0 18px;
  }

  .orientation-shell .mobile-month-picker{
    display:grid !important;
    gap:12px;
  }

  .orientation-shell .mobile-action-bar{
    position:fixed !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    z-index:6000 !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:12px !important;
    align-items:center !important;
    width:100% !important;
    padding:12px 16px calc(12px + var(--mobile-safe-bottom, 0px)) !important;
    border-top:1px solid rgba(197, 160, 89, 0.62) !important;
    background:rgba(255, 253, 249, 0.95) !important;
    box-shadow:0 -4px 20px rgba(197, 160, 89, 0.15) !important;
    backdrop-filter:blur(18px) !important;
    -webkit-backdrop-filter:blur(18px) !important;
    transform:none !important;
  }

  .orientation-shell .mobile-menu-accordion{
    position:relative;
    display:block;
    min-width:0;
  }

  .orientation-shell .mobile-action-btn{
    display:grid;
    place-items:center;
    width:100%;
    min-height:56px;
    padding:16px 14px;
    border:1px solid transparent;
    border-radius:8px;
    font-family:"Montserrat", "Inter", sans-serif;
    font-size:12px;
    font-weight:700;
    letter-spacing:0.08em;
    text-align:center;
    text-decoration:none;
    text-transform:uppercase;
  }

  .orientation-shell .mobile-action-btn-primary{
    border-color:rgba(197, 160, 89, 0.6);
    background:linear-gradient(135deg, #d6b36a, #c5a059 58%, #b88e46);
    color:var(--orientation-text);
    box-shadow:0 10px 24px rgba(197, 160, 89, 0.18);
    cursor:pointer;
    list-style:none;
  }

  .orientation-shell .mobile-action-btn-secondary{
    border-color:rgba(197, 160, 89, 0.28);
    background:rgba(253, 249, 243, 0.96);
    color:var(--orientation-accent);
    box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  }

  .orientation-shell .mobile-menu-accordion summary{
    list-style:none;
  }

  .orientation-shell .mobile-menu-accordion summary::-webkit-details-marker{
    display:none;
  }

  .orientation-shell .mobile-menu-accordion .mobile-menu-panel{
    display:grid;
    gap:8px;
    position:fixed;
    left:16px;
    right:16px;
    bottom:calc(84px + var(--mobile-safe-bottom, 0px) + 12px);
    z-index:6100;
    max-height:min(54vh, 360px);
    overflow-y:auto;
    padding:16px;
    border:1px solid rgba(197, 160, 89, 0.18);
    border-radius:20px;
    background:rgba(255, 253, 249, 0.98);
    box-shadow:0 -14px 30px rgba(197, 160, 89, 0.16);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    transform:none;
  }

  .modal-panel{
    width:min(calc(100vw - 24px), 480px) !important;
    padding:24px 20px !important;
    border-radius:20px !important;
  }

  .modal-close{
    top:12px !important;
    right:12px !important;
    width:44px !important;
    height:44px !important;
    background:#FFFFFF !important;
    border-color:rgba(197, 160, 89, 0.5) !important;
    box-shadow:0 10px 20px rgba(74, 66, 56, 0.12) !important;
  }

  .modal-actions{
    flex-direction:column-reverse !important;
  }

  .modal-actions #poCancel,
  .modal-actions #poSend{
    width:100% !important;
  }

  .page-shell{
    width:min(100% - 24px, 100%) !important;
    padding:22px 0 34px !important;
  }

  .hero-split{
    min-height:0 !important;
    flex-direction:column !important;
    margin-bottom:0 !important;
  }

  .hero-split::after{
    top:50% !important;
    bottom:auto !important;
    left:30px !important;
    right:30px !important;
    width:auto !important;
    height:1px !important;
    transform:translateY(-50%) !important;
    background:linear-gradient(to right, transparent, rgba(197, 160, 89, 0.45), transparent) !important;
  }

  .panel-inner,
  .panel-inner-form{
    padding:36px 24px !important;
  }

  .panel-inner-about{
    justify-content:flex-start !important;
  }

  .viewing-modal-panel{
    width:min(calc(100vw - 24px), 480px) !important;
    max-height:calc(100vh - 24px) !important;
    padding:24px 18px 20px !important;
    border-radius:20px !important;
  }

  .viewing-modal-close{
    top:12px !important;
    right:12px !important;
    width:44px !important;
    height:44px !important;
    background:#FFFFFF !important;
    border-color:rgba(197, 160, 89, 0.5) !important;
    box-shadow:0 10px 20px rgba(74, 66, 56, 0.12) !important;
  }

  .terms-page{
    width:100% !important;
    padding:28px 20px 48px !important;
  }

  .terms-card{
    padding:24px 20px 24px !important;
    border-radius:22px !important;
  }

  .terms-item{
    padding:20px 0 !important;
  }

  .terms-item h2{
    font-size:1.18rem !important;
  }

  .terms-item p,
  .terms-item li{
    font-size:0.95rem !important;
  }

  .terms-item-emphasis{
    margin:8px -6px !important;
    padding:20px 12px !important;
  }

  .terms-confirm{
    min-height:58px !important;
    padding:16px 20px !important;
    font-size:0.74rem !important;
    letter-spacing:0.1em !important;
  }
}
