/* PSD artwork supplies every element outside the editable content areas. */
#music {
  left: 85.8667%;
  top: 1.6492%;
  width: 10.9333%;
  height: 6.1469%;
}
#music img {
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: none;
  transform-origin: 50% 50%;
  border-radius: 50%;
}
#music[aria-pressed="false"]::after {
  left: 49%;
  top: 12%;
  height: 76%;
}
.screen {
  animation: page-fade 0.4s ease-out both;
}
.modal:not([hidden]) {
  animation: page-fade 0.25s ease-out both;
}
.modal:not([hidden]) .modal-card {
  animation: page-fade 0.35s ease-out both;
}
@keyframes page-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.rules-copy {
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  font-size: 2.65cqw;
  line-height: 1.75;
}
.rules-copy h3 {
  display: none;
}
.rules-copy > p,
.rules-copy .category {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  left: 14.2%;
  width: 71.6%;
}
.rules-copy > p:first-of-type {
  top: 28.5%;
  height: 5.3%;
}
.rules-copy .category:nth-of-type(1) {
  top: 39.3%;
  height: 7.2%;
}
.rules-copy .category:nth-of-type(2) {
  top: 51.9%;
  height: 7.6%;
}
.rules-copy .category:nth-of-type(3) {
  top: 65.2%;
  height: 5%;
}
.rules-copy .category:nth-of-type(2) h4,
.rules-copy .category:nth-of-type(3) h4 {
  display: none;
}
.rules-copy .category p {
  margin: 0;
  text-indent: 2em;
}
.rules-copy .award {
  top: 77.6%;
  height: 8.4%;
  margin: 0;
}
.tabs {
  background: none;
  padding: 0;
  box-shadow: none;
}
.tabs button,
.tabs button[aria-selected="true"] {
  background: none;
  color: transparent;
  box-shadow: none;
  font-size: 0;
}
.tabs:has([data-mode="video"][aria-selected="true"]) {
  background: #f2f3f5;
  border-radius: 2cqw;
}
.tabs:has([data-mode="video"][aria-selected="true"]) button {
  font-size: 2.8cqw;
  color: #727985;
}
.tabs:has([data-mode="video"][aria-selected="true"]) [data-mode="video"] {
  background: white;
  color: #ff6b28;
  font-family: SourceHanHeavy;
}
.upload-zone {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.upload-zone .upload-icon {
  visibility: hidden;
}
.upload-zone small {
  font-size: 2cqw;
}
.upload-zone:has(.file-item) {
  background: #fafbfc;
  border-radius: 2cqw;
}
.profile-label {
  visibility: hidden;
}
.submit-work {
  background: none;
  color: transparent !important;
  font-size: 0;
}
.consent {
  color: transparent;
}
.consent button {
  color: transparent !important;
}
.consent input {
  opacity: 0;
}
.consent:has(input:not(:checked)) input {
  opacity: 1;
  background: white;
  outline: 2px solid white;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::after {
    animation: none !important;
  }
}
.tabs:has([data-mode="video"][aria-selected="true"]) {
  background: none;
}
.tabs:has([data-mode="video"][aria-selected="true"]) button,
.tabs:has([data-mode="video"][aria-selected="true"]) [data-mode="video"] {
  background: none;
  color: transparent;
  font-size: 0;
  box-shadow: none;
}
.consent input {
  opacity: 1;
  accent-color: #ff753a;
  background: white;
  outline: 2px solid white;
}
/* Mobile interaction and the five-photo strip from the updated PSD. */
* {
  -webkit-tap-highlight-color: transparent;
}
button,
[role="button"],
.tabs,
.consent {
  -webkit-user-select: none;
  user-select: none;
}
button:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible) {
  outline: none;
}
.file-previews {
  position: absolute;
  left: 12.4%;
  top: 48%;
  width: 75.2%;
  height: 8.4%;
  display: flex;
  gap: 0.5cqw;
  overflow: hidden;
}
.file-item,
.empty-slot {
  position: relative;
  flex: 1;
  min-width: 0;
  width: auto;
  height: 100%;
  border-radius: 0;
  background: #fce2d5;
}
.file-item img,
.file-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.file-item span {
  display: none;
}
.file-item button {
  right: 0.4cqw;
  top: 0.4cqw;
  width: 2.5cqw;
  height: 2.5cqw;
  background: #fff9;
  color: #a5a5a5;
  font: 2.5cqw/1 system-ui;
}
.empty-slot {
  position: relative !important;
  color: #ff7b43 !important;
  font: 4cqw system-ui !important;
}
.upload-zone:has(.file-item) {
  background: none;
}
.file-previews:empty {
  display: none;
}
#upload[data-kind="photo"] .fields {
  top: 61%;
  height: 18.5%;
}
#upload[data-kind="video"] .file-previews {
  top: 44.2%;
  height: 3.8%;
}
#upload[data-kind="video"] .fields {
  top: 52.5%;
  height: 27.2%;
}
.consent {
  left: 11.33%;
  gap: 1.4cqw;
}
.consent input,
.consent:has(input:not(:checked)) input {
  appearance: none;
  -webkit-appearance: none;
  opacity: 1;
  outline: none;
  width: 3.5cqw;
  height: 3.5cqw;
  margin: 0.15cqw 0 0;
  border: 1px solid #c4c4c4;
  border-radius: 0.7cqw;
  background: #fff;
  display: grid;
  place-items: center;
}
.consent input:checked {
  background: #ff753a;
  border-color: #ff753a;
}
.consent input:checked:after {
  content: "";
  width: 1.5cqw;
  height: 0.8cqw;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: translateY(-0.2cqw) rotate(-45deg);
}
.file-previews[hidden] {
  display: none !important;
}
.file-previews .file-item {
  flex: 0 0 19.5%;
  max-width: 19.5%;
}
.file-previews .empty-slot {
  display: none;
}
#upload[data-kind="photo"] .fields {
  top: 63%;
  height: 16.5%;
}
#share-preview {
  position: absolute;
  left: 11.2%;
  top: 23.39%;
  width: 77.33%;
  height: 30.21%;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
}
#save-poster {
  left: 29.2%;
  top: 62.97%;
  width: 41.6%;
  height: 4.2%;
}
#wechat-share {
  left: 29.2%;
  top: 69.11%;
  width: 41.6%;
  height: 4.2%;
}
#share-qr {
  position: absolute;
  left: 28.4%;
  top: 78.93%;
  width: 20%;
  height: 11.4%;
  object-fit: contain;
}
#poster-image {
  height: 94%;
  max-width: 94%;
  object-fit: contain;
}
#poster-modal > .modal-close,
#share-guide-modal > .modal-close {
  right: 3%;
  top: 2%;
  z-index: 2;
}
body:has(#share:not([hidden])) .organizer {
  visibility: hidden;
}
#upload[data-kind="photo"]:not(.has-files) .fields {
  top: 53.7%;
  height: 25.8%;
}
/* Match both empty upload modes to the same profile baseline. */
#upload[data-kind="video"] .fields {
  top: 53.7%;
  height: 25.8%;
}
#upload-placeholder {
  position: absolute;
  inset: 0;
}
#upload-placeholder > br,
#upload-placeholder .upload-icon {
  display: none;
}
#upload-label {
  position: absolute;
  top: 49%;
  left: 4%;
  right: 4%;
  line-height: 1.5;
}
#upload-help {
  position: absolute;
  top: 65%;
  left: 6%;
  right: 6%;
  margin: 0;
  font-size: 2cqw;
  line-height: 1.65;
  white-space: normal;
}
#upload[data-kind="video"] #upload-help {
  top: 65%;
  font-size: 2cqw;
}
/* Full-height layout: retain the initial height while the keyboard is open. */
main {
  width: 100vw;
  height: var(--page-height, 100svh);
  aspect-ratio: auto;
  left: 0;
  top: 0;
  transform: none;
}
.fields {
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: #c3c8ce #f0f1f3;
  padding-right: 2cqw;
}
.fields::-webkit-scrollbar {
  width: 4px;
}
.fields::-webkit-scrollbar-track {
  background: #f0f1f3;
}
.fields::-webkit-scrollbar-thumb {
  background: #b9bfc8;
  border-radius: 4px;
}
.fields input,
.fields textarea {
  font-size: max(16px, 3.2cqw);
}
#file-picker {
  position: absolute;
  display: block;
  opacity: 0;
  left: 16.4%;
  top: 28.1%;
  width: 67.2%;
  height: 15.7%;
  z-index: 6;
  cursor: pointer;
}
.rules-down {
  position: absolute;
  left: 45%;
  bottom: 7.2%;
  width: 10%;
  text-align: center;
  color: #ff912e;
  font: 8cqw/1 system-ui;
  z-index: 1;
  animation: bob 2s infinite;
}
.fields-scroll-cue {
  position: absolute;
  right: 10.5%;
  top: 55%;
  height: 23%;
  width: 3px;
  background: #e1e3e6;
  border-radius: 3px;
  pointer-events: none;
}
.fields-scroll-cue:after {
  content: "";
  display: block;
  height: 35%;
  background: #aeb5bf;
  border-radius: 3px;
}
#upload.has-files[data-kind="photo"] .fields-scroll-cue {
  top: 64%;
  height: 14%;
}
#share-preview {
  -webkit-touch-callout: none;
  user-select: none;
}
#poster-image {
  -webkit-touch-callout: default;
  user-select: auto;
  pointer-events: auto;
}
/* Preserve the design aspect ratio; extend only the background with cover. */
body {
  background: #548ff0 url("../img/static-background.png") center center/cover
    no-repeat;
}
main {
  width: 100vw;
  height: calc(100vw * 1334 / 750);
  top: calc((var(--page-height, 100svh) - 100vw * 1334 / 750) / 2);
  left: 0;
  transform: none;
  aspect-ratio: 750/1334;
}
.rules-down {
  font-size: 0;
}
.rules-down img {
  display: block;
  width: 100%;
  height: auto;
}
.fields-scroll-cue:after {
  display: none;
}
.fields-scroll-cue .scroll-thumb {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background: #aeb5bf;
  border-radius: 3px;
  min-height: 12px;
  touch-action: none;
  cursor: grab;
}
/* One full-screen background, matching the reference's bottom-center cover. */
body {
  background-position: bottom center;
  background-size: cover;
  background-repeat: no-repeat;
}
#stage > img.art:first-child {
  display: none;
}
.fields {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.fields::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.rules-down {
  bottom: 10%;
  width: 13%;
  left: 43.5%;
  animation: rules-arrow-bob 2.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 3px #7974ba99);
}
@keyframes rules-arrow-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rules-down {
    animation: none;
  }
}
body.rules-open .organizer {
  visibility: hidden;
}
/* Portals are siblings of the design canvas, covering the full viewport. */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  z-index: 100;
  container-type: inline-size;
}
.modal-card {
  width: min(52.4vw, 393px);
  max-height: 90vh;
}
#poster-modal,
#share-guide-modal {
  height: 100%;
  overflow: hidden;
}
#form-message {
  position: fixed;
  z-index: 110;
}
/* Native full-page button for reliable taps in iOS Safari and WeChat. */
#rules-enter {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: transparent;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}
#rules .rules-copy,
#rules .rules-down,
#rules .shell {
  pointer-events: none;
}
#rules .return-home {
  z-index: 4;
  touch-action: manipulation;
}
.project-loading #stage * {
  animation-play-state: paused !important;
}
#upload[data-kind="video"].has-files .file-previews {
  top: 48%;
  height: 8.4%;
  overflow: visible;
}
#upload[data-kind="video"] .file-item {
  flex: 0 0 48%;
  max-width: 48%;
  background: #172334;
}
#upload[data-kind="video"] .file-item video {
  object-fit: contain;
  display: block;
  background: #172334;
}
#upload[data-kind="video"] .file-item button {
  z-index: 2;
  width: 4cqw;
  height: 4cqw;
  font-size: 4cqw;
}
#upload[data-kind="video"].has-files .fields {
  top: 63%;
  height: 16.5%;
}
#upload[data-kind="video"].has-files .fields-scroll-cue {
  top: 64%;
  height: 14%;
}
#share-preview {
  pointer-events: none;
  cursor: default;
}
#poster-save-overlay {
  position: absolute;
  left: 11.2%;
  top: 23.39%;
  width: 77.33%;
  height: 30.21%;
  z-index: 2;
  opacity: 0.01;
  pointer-events: auto;
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  touch-action: auto;
}
.poster-save-tip {
  position: absolute;
  left: 29.2%;
  top: 62.97%;
  width: 41.6%;
  height: 4.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../img/poster-save-label.png") center/100% 100% no-repeat;
  color: white;
  font: 4cqw/1 system-ui;
  pointer-events: none;
}
/* Every selected file remains in the same strip on both tabs. */
#upload .file-previews .file-item,
#upload[data-kind="video"] .file-item {
  flex: 0 0 19.5%;
  max-width: 19.5%;
  height: 100%;
}
#upload .file-previews {
  overflow-x: auto;
  overflow-y: hidden;
}
#upload .file-item video {
  object-fit: cover;
}
#upload[data-kind="video"] .file-item button {
  width: 2.5cqw;
  height: 2.5cqw;
  font-size: 2.5cqw;
}
#poster-save-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  opacity: 0.001;
}
.share-guide-card {
  display: block;
  width: min(58.67vw, 440px);
  height: auto;
  pointer-events: none;
}
/* Geometry is determined by whether files exist, never by the selected tab. */
#upload.has-files[data-kind] .fields {
  top: 63%;
  height: 16.5%;
}
#upload:not(.has-files)[data-kind] .fields {
  top: 53.7%;
  height: 25.8%;
}
#upload.has-files[data-kind] .file-previews {
  top: 48%;
  height: 8.4%;
  overflow-x: auto;
  overflow-y: hidden;
}
#upload.has-files[data-kind] .fields-scroll-cue {
  top: 64%;
  height: 14%;
}
#upload:not(.has-files)[data-kind] .fields-scroll-cue {
  top: 55%;
  height: 23%;
}
/* One shared title image, independent of the photo/video shell artwork. */
#profile-heading {
  position: absolute;
  left: 8.6667%;
  top: 49.10045%;
  width: 82.6667%;
  height: 3.14843%;
  pointer-events: none;
}
#upload.has-files #profile-heading {
  top: 58.09595%;
}
