.pj-language-nav,
.pj-language-switch,
.pj-language-bar {
  display: none !important;
}

.cottage-allocation-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

.cottage-allocation-layout > form {
  min-width: 0;
  width: 100%;
}

@media (min-width: 1536px) {
  .cottage-allocation-layout > form {
    padding: 1.35rem !important;
  }
}

@media (max-width: 639px) {
  body.pj-cottage-page-active [class*="2xl:grid-cols"],
  body.pj-cottage-page-active [class*="xl:grid-cols"],
  body.pj-cottage-page-active [class*="lg:grid-cols"],
  body.pj-cottage-page-active [class*="sm:grid-cols"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.pj-cottage-page-active .surface.image-glass-card.flex > div:last-child {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.pj-cottage-page-active .cottage-allocation-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.pj-cottage-page-active .cottage-allocation-layout > form {
    order: 1;
  }

  body.pj-cottage-page-active .cottage-allocation-layout > .pj-cottage-history,
  body.pj-cottage-page-active .pj-cottage-history {
    order: 2;
    width: 100%;
  }

  .pj-cottage-page {
    min-width: 0;
    overflow-x: hidden;
  }

  .pj-cottage-page > .grid {
    gap: .75rem !important;
  }

  .pj-cottage-page .surface {
    min-width: 0;
  }

  .pj-cottage-page .pj-cottage-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .55rem !important;
  }

  .pj-cottage-page .dashboard-stat-card {
    min-height: 4.15rem;
    padding: .65rem !important;
    border-radius: .7rem;
  }

  .pj-cottage-page .dashboard-stat-card p.mt-3 {
    margin-top: .3rem !important;
    font-size: 1.15rem !important;
    line-height: 1.05;
  }

  .pj-cottage-page .cottage-allocation-layout {
    gap: .75rem !important;
  }

  .pj-cottage-page .cottage-allocation-layout > form,
  .pj-cottage-page .cottage-allocation-layout > section {
    padding: .85rem !important;
    border-radius: .8rem;
  }

  .pj-cottage-page .cottage-allocation-layout .grid {
    gap: .7rem !important;
  }

  .pj-cottage-page .cottage-allocation-layout input,
  .pj-cottage-page .cottage-allocation-layout select,
  .pj-cottage-page .cottage-allocation-layout textarea {
    min-width: 0;
    max-width: 100%;
  }

  /* Keep the Cottage Rent page stacked on narrow screens even when a wider
     utility breakpoint is active elsewhere in the compiled layout. */
  .pj-cottage-page [class*="2xl:grid-cols"],
  .pj-cottage-page [class*="xl:grid-cols"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pj-cottage-page .surface.image-glass-card.flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .85rem !important;
  }

  .pj-cottage-page .surface.image-glass-card.flex > div,
  .pj-cottage-page .surface.image-glass-card.flex > div:last-child {
    width: 100% !important;
    max-width: 100% !important;
  }

  .pj-cottage-page .surface.image-glass-card.flex h1 {
    max-width: 100%;
    font-size: 1.7rem !important;
  }

  .pj-cottage-page .surface.image-glass-card.flex > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
  }

  .pj-cottage-page .surface.image-glass-card.flex > div:last-child button {
    width: 100%;
    min-height: 2.8rem;
    padding-inline: .55rem;
  }
}

/* Preserve the desktop-style two-panel composition on wider phones/tablets;
   only the spacing and dimensions become compact. */
@media (min-width: 541px) and (max-width: 639px) {
  body.pj-cottage-page-active [class*="2xl:grid-cols"],
  body.pj-cottage-page-active [class*="xl:grid-cols"],
  body.pj-cottage-page-active [class*="lg:grid-cols"],
  body.pj-cottage-page-active [class*="sm:grid-cols"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.pj-cottage-page-active .surface.image-glass-card.flex {
    flex-direction: row !important;
    align-items: center !important;
  }

  body.pj-cottage-page-active .surface.image-glass-card.flex > div:last-child {
    display: flex;
    width: auto !important;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  body.pj-cottage-page-active .cottage-allocation-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.pj-cottage-page-active .cottage-allocation-layout > form,
  body.pj-cottage-page-active .cottage-allocation-layout > .pj-cottage-history {
    order: initial;
  }
}

/* Cottage Rent is intentionally single-panel on all mobile and tablet widths. */
@media (max-width: 1024px) {
  .pj-module-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .55rem !important;
  }

  .pj-module-summary-card,
  .dashboard-stat-card {
    min-width: 0;
    min-height: 4rem;
    padding: .65rem !important;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: .7rem;
    background: linear-gradient(145deg, rgba(30,38,53,.92), rgba(11,19,32,.9));
    box-shadow: inset 0 1px rgba(255,255,255,.08);
  }

  .pj-module-summary-card > p:first-child,
  .dashboard-stat-card > div p:first-child {
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: .62rem;
    line-height: 1.15;
  }

  .pj-module-summary-card > p + p,
  .dashboard-stat-card > p {
    margin-top: .3rem !important;
    color: #fff;
    font-size: 1.2rem !important;
    line-height: 1.05;
  }

  body.pj-picnic-page-active .pj-picnic-content-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .75rem !important;
  }

  body.pj-picnic-page-active .pj-picnic-content-grid > form {
    order: 1;
  }

  body.pj-picnic-page-active .pj-picnic-content-grid > .pj-picnic-history {
    order: 2;
    width: 100%;
  }

  body.pj-picnic-page-active .surface.image-glass-card.flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .75rem !important;
  }

  body.pj-picnic-page-active .surface.image-glass-card.flex > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.pj-picnic-page-active .pj-picnic-content-grid > form,
  body.pj-picnic-page-active .pj-picnic-history {
    padding: .7rem !important;
    border-radius: .75rem;
  }

  body.pj-picnic-page-active .pj-picnic-content-grid .grid {
    gap: .55rem !important;
  }

  body.pj-picnic-page-active .pj-picnic-content-grid input,
  body.pj-picnic-page-active .pj-picnic-content-grid select,
  body.pj-picnic-page-active .pj-picnic-content-grid textarea {
    min-height: 2.55rem !important;
    padding: .45rem .65rem !important;
    font-size: .82rem !important;
  }

  body.pj-picnic-page-active .pj-picnic-content-grid button {
    min-height: 2.65rem !important;
    padding: .45rem .7rem !important;
  }

  body.pj-cottage-page-active .pj-cottage-content-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .75rem !important;
  }

  body.pj-cottage-page-active .pj-cottage-content-grid > form {
    order: 1 !important;
  }

  body.pj-cottage-page-active .pj-cottage-content-grid > .pj-cottage-history {
    order: 2 !important;
    width: 100% !important;
  }

  body.pj-cottage-page-active [class*="2xl:grid-cols"],
  body.pj-cottage-page-active [class*="xl:grid-cols"],
  body.pj-cottage-page-active [class*="lg:grid-cols"],
  body.pj-cottage-page-active [class*="sm:grid-cols"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.pj-cottage-page-active .surface.image-glass-card.flex {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body.pj-cottage-page-active .surface.image-glass-card.flex > div,
  body.pj-cottage-page-active .surface.image-glass-card.flex > div:last-child {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.pj-cottage-page-active .surface.image-glass-card.flex > div:last-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: stretch;
  }

  body.pj-cottage-page-active .cottage-allocation-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.pj-cottage-page-active .cottage-allocation-layout > form,
  body.pj-cottage-page-active .cottage-allocation-layout > .pj-cottage-history {
    order: initial;
    width: 100%;
  }

  /* Compact the single-panel form so more fields remain visible on mobile. */
  body.pj-cottage-page-active .cottage-allocation-layout > form,
  body.pj-cottage-page-active .cottage-allocation-layout > .pj-cottage-history {
    padding: .7rem !important;
    border-radius: .75rem;
  }

  body.pj-cottage-page-active .cottage-allocation-layout .grid {
    gap: .5rem !important;
  }

  body.pj-cottage-page-active .cottage-allocation-layout label {
    gap: .25rem !important;
    font-size: .72rem !important;
    line-height: 1.15;
  }

  body.pj-cottage-page-active .cottage-allocation-layout input,
  body.pj-cottage-page-active .cottage-allocation-layout select,
  body.pj-cottage-page-active .cottage-allocation-layout textarea {
    min-height: 2.55rem !important;
    padding: .45rem .65rem !important;
    font-size: .82rem !important;
    border-radius: .55rem;
  }

  body.pj-cottage-page-active .cottage-allocation-layout h2 {
    font-size: 1.05rem !important;
  }

  body.pj-cottage-page-active .cottage-allocation-layout button {
    min-height: 2.65rem !important;
    padding: .45rem .7rem !important;
    font-size: .82rem !important;
  }
}
