/* CENC Royale v000052 — Public Mobile Overflow + Meta Layout Hardening
   Scope: public event/profile surfaces. Loaded after previous public experience packs.
   Goal: eliminate horizontal viewport growth and make event metadata denser/readable on mobile. */

html,
body.public-shell{
  max-width:100%;
  overflow-x:clip;
}

body.public-shell,
.public-shell main,
.royale-public,
.event-identity,
.event-identity-picture,
.public-breadcrumbs,
.profile-page,
.profile-grid,
.profile-photo,
.profile-copy,
.royale-overview,
.royale-overview>* ,
.royale-overview-meta,
.royale-overview-meta>span,
.catalog-section,
.catalog-grid,
.entry-grid,
.royale-participant-share{
  min-width:0;
  max-width:100%;
}

.public-shell img,
.public-shell picture,
.event-identity-picture img,
.profile-photo>img:not(.royale-participant-frame){
  max-width:100%;
}

.public-breadcrumbs{
  overflow:hidden;
}

.public-breadcrumbs a,
.public-breadcrumbs strong{
  min-width:0;
}

/* Event metadata: icon left, label/value right. Clean SVG icon shell replaces the
   overly detailed raster artwork specifically in this compact information block. */
.royale-overview-meta>span{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:12px;
  row-gap:2px;
  align-items:center;
  padding:14px 15px;
  overflow:hidden;
}

.royale-overview-meta .royale-meta-icon{
  grid-column:1;
  grid-row:1 / span 2;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  align-self:center;
  border:1px solid color-mix(in srgb,var(--theme-primary) 38%,var(--theme-border));
  border-radius:12px;
  color:var(--theme-accent);
  background:linear-gradient(145deg,color-mix(in srgb,var(--theme-primary) 10%,var(--theme-surface-elevated)),color-mix(in srgb,var(--theme-bg) 84%,transparent));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--theme-accent) 7%,transparent),0 8px 22px rgba(0,0,0,.16);
}

.royale-overview-meta .royale-meta-icon svg{
  width:20px;
  height:20px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.royale-overview-meta small{
  grid-column:2;
  grid-row:1;
  align-self:end;
  min-width:0;
  margin:0;
  line-height:1.2;
}

.royale-overview-meta strong{
  grid-column:2;
  grid-row:2;
  align-self:start;
  min-width:0;
  margin:1px 0 0;
  line-height:1.28;
  overflow-wrap:anywhere;
}

/* Profile media containment. The old mobile full-bleed implementation used
   calc(100% + 32px) plus negative margins. Keeping the page itself full width
   removes that fragile arithmetic and prevents authored 2:3 media from widening
   the document on narrow browsers. */
@media(max-width:760px){
  .profile-page.royale-public{
    width:100%;
    max-width:100%;
    margin-inline:0;
  }

  .profile-grid{
    width:100%;
    max-width:100%;
    margin:0;
    overflow-x:clip;
  }

  .profile-photo,
  .profile-photo.is-authored-2x3{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
  }

  .profile-photo>img:not(.royale-participant-frame),
  .profile-photo.is-authored-2x3>img:not(.royale-participant-frame){
    width:100%!important;
    max-width:100%!important;
  }

  .profile-copy{
    width:100%;
    max-width:100%;
    padding-left:16px;
    padding-right:16px;
    overflow-x:clip;
  }

  .profile-copy h1,
  .profile-tagline,
  .profile-bio,
  .profile-scope,
  .profile-voting-cta,
  .royale-profile-voting-state,
  .royale-participant-share{
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
  }

  .event-identity,
  .event-identity.royale-context-hero,
  .event-identity.royale-context-hero.is-compact{
    width:100%;
    max-width:100%;
    margin-left:0;
    margin-right:0;
  }

  .event-identity-picture,
  .event-identity-picture img{
    width:100%;
    max-width:100%;
  }

  .royale-overview{
    width:100%;
    max-width:100%;
  }

  .royale-overview-meta{
    width:100%;
    max-width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .royale-overview-meta>span{
    grid-template-columns:34px minmax(0,1fr);
    min-height:82px;
    padding:12px 12px;
    column-gap:10px;
    border-radius:16px;
  }

  .royale-overview-meta .royale-meta-icon{
    width:34px;
    height:34px;
    border-radius:10px;
  }

  .royale-overview-meta .royale-meta-icon svg{
    width:18px;
    height:18px;
  }

  .royale-overview-meta small{
    font-size:8px;
    letter-spacing:.12em;
  }

  .royale-overview-meta strong{
    font-size:12px;
  }

  .royale-participant-share,
  .royale-participant-share__intro,
  .royale-participant-share__actions,
  .royale-participant-share__url{
    width:100%;
    max-width:100%;
    min-width:0;
  }
}

@media(max-width:339px){
  .royale-overview-meta{
    grid-template-columns:1fr;
  }
}

@supports not (overflow:clip){
  html,
  body.public-shell,
  .profile-grid,
  .profile-copy{
    overflow-x:hidden;
  }
}
