/* COUPLES LOUNGE CLUB – V502 mobile & inner-border spacing repair
   DROP-IN for the already enabled V501 layout hook.
   Affects layout only. No changes to images, data, colors, visibility, or event logic.
   Does not weaken Content-Security-Policy. */
:root {
  --clc-uniform-frame-inset: 24px;
  --clc-uniform-card-gap: 16px;
}
@media (max-width: 1024px) {
  :root { --clc-uniform-frame-inset: 18px; --clc-uniform-card-gap: 14px; }
}
@media (max-width: 680px) {
  :root { --clc-uniform-frame-inset: 12px; --clc-uniform-card-gap: 12px; }
}
/* The gap belongs to the BORDERED PARENT, not every nested card.
   JS adds this class only to verified, large, flush bordered containers. */
body.clc-v445-member main.qa-auth-main .qa-global-main .clc-v502-frame {
  box-sizing: border-box !important;
  padding-inline: var(--clc-uniform-frame-inset) !important;
  padding-block: var(--clc-uniform-frame-inset) !important;
  min-width: 0 !important;
}
body.clc-v445-member main.qa-auth-main .qa-global-main .clc-v502-frame > :is(div,section,article,main,aside,form) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
/* Existing main/content layouts must permit grid children to shrink. */
body.clc-v445-member main.qa-auth-main :is(.qa-global-shell,.qa-global-main,.qap-workspace-main,.ef-page,.ef-head,.clc-dash) {
  min-width: 0;
  box-sizing: border-box;
}
/* Cards keep natural gaps; never globally modify .panel padding, which
   previously pushed contents against other frames on small screens. */
body.clc-v445-member main.qa-auth-main .qa-global-main :is(
  .clc-dash-detail-grid, .clc-v407-cards, .qap-member-grid,
  .clc-v282-list, .qa-gallery-catalog-grid
) { gap: var(--clc-uniform-card-gap); }
/* Events: the count badge was forced to white-space:nowrap at every width.
   It is the direct cause of overflow in the user's iPhone screenshot. */
body.clc-v445-member main.qa-auth-main .ef-page .ef-count {
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.5;
}
body.clc-v445-member main.qa-auth-main .ef-page .ef-head > div {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 800px) {
  body.clc-v445-member main.qa-auth-main .qa-global-shell,
  body.clc-v445-member main.qa-auth-main .qap-workspace {
    grid-template-columns: minmax(0,1fr) !important;
  }
}
@media (max-width: 680px) {
  body.clc-v445-member main.qa-auth-main {
    width: 100%;
    max-width: 100%;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box;
    min-width: 0;
  }
  body.clc-v445-member main.qa-auth-main :is(.qa-global-shell,.qa-global-main,.clc-dash,.ef-page) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  body.clc-v445-member main.qa-auth-main .ef-page .ef-head {
    display: block !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  body.clc-v445-member main.qa-auth-main .ef-page .ef-count {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 9px;
    text-align: left;
  }
  body.clc-v445-member main.qa-auth-main .ef-page .ef-v271-kind-tabs,
  body.clc-v445-member main.qa-auth-main .ef-page .ef356-options {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
  }
  body.clc-v445-member main.qa-auth-main .ef-page :is(
    .ef356-settings, .ef356-option, .ef356-save, .ef-v271-kind-tabs,
    .ef-create, .ef-create-fields, .ef-create-footer,
    .ef-items, .ef-card, .ef-main, .ef-v241-side
  ) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  body.clc-v445-member main.qa-auth-main .ef-page .ef-card {
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.clc-v445-member main.qa-auth-main .ef-page :is(input,select,textarea) {
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Text may wrap, but no action/button is hidden to conceal overflow. */
  body.clc-v445-member main.qa-auth-main .ef-page :is(
    .ef-count,.ef-head,.ef356-settings,.ef356-save,.ef-main
  ) { overflow-wrap: anywhere; }
  /* Main overview's small tiles are kept in the content area of the frame. */
  body.clc-v445-dashboard-page main.qa-auth-main .qa-global-main .clc-v502-frame > :is(div,section) {
    max-width: 100%;
  }
}
