/* Shared only by the public homepage and competition details. Stored HTML is unchanged. */
.public-competition-page .competition-summary {
  min-width: 0;
  padding: 26px;
  background: #fffdf9;
  border: 1px solid var(--line);
}
.public-competition-page .competition-summary-compact {
  padding: 0;
  background: transparent;
  border: 0;
}
.public-competition-page .competition-state { margin: 0 0 12px; }
.public-competition-page .competition-state-description { margin-bottom: 18px; }
.public-competition-page .competition-summary-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 26px;
  margin: 0;
}
.public-competition-page .competition-summary-facts > div { min-width: 0; }
.public-competition-page .competition-summary-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.public-competition-page .competition-summary-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}
.public-competition-page .competition-timezone-note {
  margin: 14px 0 0;
  font-size: 12px;
}
.public-competition-page .competition-registration-status { margin: 18px 0 0; }
.public-competition-page .competition-summary-actions { margin-top: 22px; }
.public-competition-page .competition-summary-actions .button {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  text-align: center;
}
.competition-page .competition-heading {
  max-width: 956px;
  margin-inline: auto;
  padding-bottom: 28px;
}
.competition-page .competition-heading h1 { overflow-wrap: anywhere; }
.competition-page .competition-heading > .notice { margin-top: 20px; }
.competition-page .competition-detail-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: calc(100% - 96px);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 56px;
  min-width: 0;
}
.competition-page .competition-detail-content > .panel { margin: 0; }
.competition-page .competition-detail-content .rich-content > :last-child { margin-bottom: 0; }
.competition-page .competition-source { margin: 0; }
.public-competition-page .public-rich-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.public-competition-page .public-rich-text :is(a, h2, h3, h4, li, p) {
  overflow-wrap: anywhere;
}
/* Image size, aspect ratio and float margins retain the shared rich-content rules. */
.public-competition-page :is(.competition-summary, .competition-detail-content) a:focus-visible {
  outline: 3px solid #9b713d;
  outline-offset: 4px;
}
/* The final action stays in normal flow and uses the same action as the summary. */
.competition-page .competition-end-action {
  justify-content: center;
  margin-top: 8px;
  padding: 24px 0;
}
.competition-page .competition-end-action .button {
  max-width: 100%;
  min-height: 48px;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}
@media (min-width: 701px) {
  /* Only public detail images in their own flow: saved smaller widths still apply.
     Genuine left/right wrapping keeps the existing width and margin rules.
     The shared 100% wrap rule already turns those full-width images into blocks. */
  .competition-page .competition-detail-content .public-rich-text img:not(.tf-image-wrap-left):not(.tf-image-wrap-right),
  .competition-page .competition-detail-content .public-rich-text img.tf-image-width-100:is(.tf-image-wrap-left, .tf-image-wrap-right) {
    display: block;
    max-width: min(100%, 700px);
    height: auto;
    margin-inline: auto;
  }
}
@media (max-width: 1000px) {
  .competition-page .competition-detail-content { width: calc(100% - 56px); }
}
@media (max-width: 700px) {
  .public-competition-page .competition-summary { padding: 20px; }
  .public-competition-page .competition-summary-compact { padding: 0; }
  .public-competition-page .competition-summary-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .competition-page .competition-detail-content {
    width: calc(100% - 40px);
    gap: 18px;
    padding-bottom: 38px;
  }
  .competition-page .competition-detail-content > .panel { padding: 22px; }
  /* Only justified flowing paragraphs lose justification; intentional centering stays. */
  .public-competition-page .public-rich-text p.ql-align-justify { text-align: left; }
  .public-competition-page footer .footer-links {
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 10px;
  }
  .public-competition-page footer .footer-links a {
    max-width: 100%;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
