* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  --content-width: 100vw;
  margin: 0;
  background: #008fd4;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: calc(0.0373333333 * var(--content-width));
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.campaign-content {
  display: contents;
}

@media (min-width: 768px) {
  body {
    --content-width: 375px;
  }
  main {
    display: flow-root;
    background: #008fd4 url("../images/pc_bg.webp") center center/cover no-repeat fixed;
  }
  .campaign-content, body > .footer {
    width: 375px;
    margin-inline: auto;
  }
  .campaign-content {
    display: flow-root;
    background: #008fd4;
  }
}
h1, h2, h3, h4, p {
  margin: 0;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid #fff000;
  outline-offset: 4px;
}

strong {
  color: #fff000;
  font-weight: 700;
}

main {
  width: 100%;
}

.hero img {
  width: 100%;
}

.invitation {
  margin: 16px 10px 7px;
  text-align: center;
  font-size: calc(0.048 * var(--content-width));
  font-weight: 900;
  line-height: 1.5;
}
.invitation span {
  position: relative;
  padding: 0 1em;
}
.invitation span::before, .invitation span::after {
  position: absolute;
  display: block;
  content: "";
  width: 2px;
  height: 1.25em;
  background-color: #fff;
  inset: 0;
  margin: auto auto auto 0;
  transform: rotate(-30deg);
}
.invitation span::after {
  margin: auto 0 auto auto;
  transform: rotate(30deg);
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: calc(100% - 50px);
  min-height: 60px;
  margin-inline: auto;
  border: 0;
  border-radius: 99px;
  background: #fff000;
  color: #000;
  text-decoration: none;
  font-size: calc(0.0426666667 * var(--content-width));
  font-weight: 900;
}

.button span {
  position: absolute;
  right: 28px;
  font-size: calc(0.032 * var(--content-width));
}

.intro {
  margin: 25px 10px 0;
  line-height: 2;
}

.section-heading {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 26px;
  padding: 0 9px 9px;
  border-bottom: 2px solid #fff;
  font-size: calc(0.064 * var(--content-width));
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.races {
  margin: 46px 10px 0;
}

.races .section-heading {
  margin-bottom: 21px;
}

.race-tabs {
  display: grid;
  grid-template-columns: 56fr 145fr 145fr;
  gap: 5px;
  align-items: start;
}

.race-tabs button {
  min-width: 0;
  min-height: 41px;
  padding: 3px 2px;
  border: 2px solid #d5f2ff;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  font-size: calc(0.0293333333 * var(--content-width));
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 0 3px #fff;
}

.race-tabs span {
  display: block;
}

.race-tabs [aria-selected=true] {
  position: relative;
  min-height: 45px;
  border-color: #0d28a5;
  border-radius: 7px 7px 0 0;
  background: #0d28a5;
  box-shadow: none;
}

.race-panel {
  padding: 18px 15px 30px;
  background: #0d28a5;
  border-radius: 0 6px 6px 6px;
}

#panel-junior {
  border-top-left-radius: 6px;
}

#panel-gold {
  border-top-left-radius: 6px;
  border-top-right-radius: 0;
}

.race-name {
  min-height: 25px;
  font-size: calc(0.048 * var(--content-width));
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
}

.first-race-break {
  display: none;
}

.period {
  position: relative;
  margin-top: 17px;
  padding-top: 14px;
  text-align: center;
}

.period span {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 9px;
  border-radius: 30px;
  background: #fff;
  color: #0d28a5;
  line-height: calc(0.0613333333 * var(--content-width));
  white-space: nowrap;
}

.period strong {
  display: block;
  padding: 10px 1px;
  background: #ff221b;
  color: #fff;
  font-size: calc(0.0346666667 * var(--content-width));
  line-height: calc(0.0533333333 * var(--content-width));
  white-space: nowrap;
}

.prize-lead {
  margin: 24px 0 15px;
  color: #fff000;
  text-align: center;
  font-size: calc(0.0426666667 * var(--content-width));
  font-weight: 900;
  line-height: 1.5;
}

.prizes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.prize {
  position: relative;
  padding: 10px 8px 8px;
  border-radius: 12px;
  background: #d5f0fc;
  color: #111;
  text-align: center;
  font-weight: 700;
  font-size: calc(0.032 * var(--content-width));
  line-height: 1.5;
}

.prize h4 {
  margin-bottom: 4px;
  color: #ff251d;
  font-size: calc(0.04 * var(--content-width));
  line-height: calc(0.056 * var(--content-width));
}

.prize h4 span {
  display: block;
  width: 61px;
  margin: -20px auto 0;
  background: #ff251d;
  color: #fff;
  border-radius: 30px;
  font-size: calc(0.048 * var(--content-width));
  line-height: calc(0.0613333333 * var(--content-width));
}

.prize img {
  width: 100%;
}

.prize .winners {
  width: -moz-fit-content;
  width: fit-content;
  margin: 6px auto 3px;
  padding: 0 7px;
  border-radius: 20px;
  background: #009cde;
  color: #fff;
  font-size: calc(0.0346666667 * var(--content-width));
  line-height: calc(0.0506666667 * var(--content-width));
}

.prize small {
  color: #81979e;
  font-size: calc(0.0266666667 * var(--content-width));
  font-weight: 400;
}

.prize-wide {
  grid-column: 1/-1;
  padding: 10px 9px 12px;
  margin-top: 0;
  font-size: calc(0.0293333333 * var(--content-width));
}

.prize-wide h4 {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.prize-wide h4 span {
  margin: 0;
}

.prize-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.race-subheading {
  margin: 35px 0 12px;
  color: #fff000;
  text-align: center;
  font-size: calc(0.048 * var(--content-width));
}

.pending {
  background: #666;
}

.race-card {
  aspect-ratio: 325/123;
}

.race-result {
  aspect-ratio: 325/83;
}

.result-heading {
  margin-top: 20px;
}

.race-logo {
  margin: 20px auto 0;
}

.instructions {
  margin: 42px 10px 0;
}

.instructions p {
  margin-top: 26px;
  line-height: calc(0.064 * var(--content-width));
}

.entry {
  margin: 37px 10px 0;
  scroll-margin-top: 20px;
}

.terms {
  height: 358px;
  overflow-y: auto;
  padding: 14px 15px;
  border-radius: 6px;
  background: #e7f2fa;
  color: #163b8b;
  font-size: calc(0.032 * var(--content-width));
  line-height: 1.5;
  scrollbar-color: #666 #ddd;
  scrollbar-width: auto;
}

.terms h3 {
  margin: 16px 0 2px;
  font-size: calc(0.0373333333 * var(--content-width));
}

.terms p + p {
  margin-top: 15px;
}

.consent {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 13px 15px 14px;
  min-height: 36px;
  background: #85cff6;
  border-radius: 6px;
  color: #111;
  font-weight: 700;
}

.consent input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #0d28a5;
}

.entry-button {
  width: calc(100% - 30px);
}

.entry-button[aria-disabled=true] {
  cursor: not-allowed;
}

.preview-note {
  font-size: calc(0.0293333333 * var(--content-width));
  text-align: center;
  margin-top: 6px;
}

.social {
  margin: 42px 10px 0;
}

.social::before {
  content: "";
  display: block;
  width: 205px;
  max-width: 70%;
  height: 2px;
  margin: 0 auto 35px;
  background: #fff;
}

.social h2 {
  font-size: calc(0.0586666667 * var(--content-width));
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
}

.social-note {
  font-size: calc(0.0266666667 * var(--content-width));
  text-align: center;
  margin: 7px 0;
}

.social-step {
  padding: 20px 15px 13px;
  margin-top: 15px;
  background: #006a9e;
  border-radius: 6px;
}

.social-step h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: calc(0.04 * var(--content-width));
  line-height: 1.5;
}

.social-step h3 span {
  flex-shrink: 0;
  padding: 5px 10px;
  background: #fff;
  border-radius: 20px;
  color: #0093cd;
  font-size: calc(0.0373333333 * var(--content-width));
}

.social-step p {
  margin-top: 14px;
  font-size: calc(0.0373333333 * var(--content-width));
  line-height: 1.8;
}

.follow-button {
  display: block;
  margin-top: 7px;
  padding: 4px 10px;
  border-radius: 40px;
  background: #000;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: calc(0.0533333333 * var(--content-width));
  font-weight: 700;
}

.follow-button span {
  position: relative;
  top: -0.17em;
  font-size: calc(0.0746666667 * var(--content-width));
  vertical-align: middle;
  line-height: 1;
}

.post-label {
  display: block;
  margin-top: 15px;
  font-size: calc(0.0373333333 * var(--content-width));
}

.post-text {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #fff;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: calc(0.0373333333 * var(--content-width));
  line-height: 1.8;
  resize: vertical;
}

.copy-button {
  width: 100%;
  margin-top: 12px;
}

.social-step .copy-status {
  margin-top: 8px;
  font-size: calc(0.032 * var(--content-width));
}

.bottom-logo {
  margin: 27px auto 26px;
}

.race-announcement {
  padding: 30px 10px;
  text-wrap: balance;
  text-align: center;
  font-size: calc(0.0373333333 * var(--content-width));
}

.footer {
  padding: 12px 10px;
  background: #e51e18;
  text-align: center;
  font-size: calc(0.0373333333 * var(--content-width));
  line-height: calc(0.0613333333 * var(--content-width));
}

.footer small {
  display: block;
  font-size: calc(0.0293333333 * var(--content-width));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 374px) {
  .social-step h3 {
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}