/* Gujarati fallback for the Royale display fonts. */
@font-face {
  font-family: "Royale Gujarati";
  src: local("Nirmala UI"), local("Shruti");
  unicode-range: U+0A80-0AFF;
}
html[lang="gu"] #ryNoteText { white-space: pre-line; }

.ryc-day {
  grid-column: 1 / -1;
  margin: 0;
  padding: .5rem clamp(1rem, 4vw, 2rem);
  border-block: 1px solid currentColor;
  color: var(--royale-gold);
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 3vw, 1.65rem);
  line-height: 1.45;
  text-align: center;
}

.ryc-row {
  display: contents;
}

@media (min-width: 900px) {
  .ryc-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: inherit;
    justify-self: stretch;
    justify-items: center;
    align-items: start;
  }

  .ryc-row > * {
    grid-column: span 2;
    min-width: 0;
  }

  .ryc-row > :only-child {
    grid-column: 3 / span 2;
  }

  .ryc-row > :first-child:nth-last-child(2) {
    grid-column: 2 / span 2;
  }
}

/* Day headings carry the Vikram Samvat date and the day's one-line note. */
.ryc-day {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.ryc-day__vs {
  font-size: .62em;
  opacity: .85;
}
.ryc-day__note {
  font-size: .5em;
  line-height: 1.5;
  opacity: .75;
}

/* Sub-headings inside the compliments scroll. */
.royale-scroll__line--head {
  margin-top: 1.1em;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .3em;
  text-decoration-thickness: 1px;
}
.royale-scroll__line--head:first-child { margin-top: 0; }

/* The names scroll reads two to a row, as on the printed card. Headings and
   single-name lines span both columns; a phone gets one column. */
#ryComplimentLines,
.ryc-names {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(.75rem, 3vw, 2.5rem);
  row-gap: .9em;
  align-items: start;
  justify-items: center;
  width: 100%;
  text-align: center;
}
#ryComplimentLines .royale-scroll__line--head,
#ryComplimentLines .royale-scroll__line--full,
.ryc-names .royale-scroll__line--full {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  #ryComplimentLines,
  .ryc-names { grid-template-columns: 1fr; }
}

/* A day's names: a scroll under that day's cards, spanning the whole grid. */
.ryc-scrolls {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  padding-block: calc(clamp(24px, 4vw, 48px) + var(--roll-h) / 2);
  padding-inline: 0;
}
.ryc-scrolls .royale-scroll__sheet { min-height: 0; padding-block: 12% 10%; }
.ryc-scrolls {
  --scroll-w: min(66vw, 980px);
  --roll-h: calc(var(--scroll-w) * 31 / 329);
  --scroll-border-w: clamp(12px, var(--scroll-w) * 0.026, 20px);
}
@media (max-width: 1024px) {
  .ryc-scrolls {
    --scroll-w: 88vw;
    --roll-h: calc(var(--scroll-w) * 31 / 329);
    --scroll-border-w: clamp(12px, var(--scroll-w) * 0.026, 20px);
  }
}

/* The family scrolls read as the printed card does: running lines of text,
   the name set large between them. */
.ry-para {
  margin: 0;
  max-width: 100%;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.7;
  text-align: center;
}
.ry-para:empty { display: none; }
.ry-weds {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.ry-weds:empty { display: none; }
#ryGroomCard .royale-scroll__sheet,
#ryBrideCard .royale-scroll__sheet { gap: 1em; }
@media (max-width: 900px) {
  .ry-para { font-size: 18px; }
  .ry-weds { font-size: 16px; }
}
@media (max-width: 560px) {
  .ry-para { font-size: 16px; line-height: 1.6; }
}

/* Ceremony cards: the name must always sit clear of the artwork above it.
   The writing stack grows upward from the foot of the card, so a long venue
   used to push the name up into the illustration. The venue is capped at
   three lines and the name gets the line-height Gujarati's tall marks need. */
.ryc-card__inner { gap: 6cqw; }
.ryc-card__name {
  line-height: 1.35;
  padding-top: .1em;
  text-wrap: balance;
}
.ryc-card__venue {
  font-size: 4.6cqw;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
