/* Neko reference: large cards use 64px superellipse(2) corners.
   Rounded fallback keeps the same perceived softness in older browsers.
   App-device geometry and full-bleed section backgrounds retain their shapes. */
:root {
  --site-card-radius: 40px;
  --site-small-radius: 20px;
  --site-corner-shape: round;
  --site-hero-radius-factor: 1.25;
}
@supports (corner-shape: superellipse(2)) {
  :root {
    --site-card-radius: 64px;
    --site-small-radius: 32px;
    --site-corner-shape: superellipse(2);
    --site-hero-radius-factor: 2;
  }
}

/* Large cards and contained section surfaces share one silhouette. */
html #quiet-story.da.da-direct :is(.qx-path, .qx-offer),
#care.cf .cf-tile,
#programs.pg .pg-card,
#myhealth.mh-pastel .mh-card,
#about.yl-about article,
.yl-detail-page .dd-pathway,
.yl-detail-page .dd-addon,
.yl-detail-page #stations .dd-station-image,
.yl-detail-page .dd-next {
  border-radius: var(--site-card-radius);
  corner-shape: var(--site-corner-shape);
}

/* Smaller information tiles use a proportional version of the same curve. */
html #quiet-story.da #beyond .bh-item,
.yl-detail-page #stations .dd-covered-grid > div,
.yl-detail-page #stations .dd-station-supplement,
.yl-detail-page .dd-facts {
  border-radius: var(--site-small-radius);
  corner-shape: var(--site-corner-shape);
}

/* Image and tint layers follow their card's clipping edge without an old rim. */
#care.cf .cf-tile::after {
  border-radius: inherit;
  corner-shape: inherit;
}
html[data-s2] #quiet-story.da.da-direct .qx-path::after {
  border-radius: 0;
}
html #quiet-story.da.da-direct .qx-path .qx-fig {
  border-radius: 0;
}

/* Preserve the hero's existing scroll progress; only its final curve changes. */
.yl-detail-page .dd-hero-scroll .dd-hero {
  border-radius: calc(var(--hero-round, 0px) * var(--site-hero-radius-factor));
  corner-shape: var(--site-corner-shape);
}
@media (prefers-reduced-motion: reduce) {
  .yl-detail-page .dd-hero-scroll .dd-hero { border-radius: var(--site-card-radius); }
}
