:root {
  color-scheme: light;
  --ink: #252333;
  --muted: #69667a;
  --pink: #ff5f91;
  --pink-dark: #c93669;
  --violet: #7258e8;
  --cyan: #35b7cf;
  --gold: #f2a23b;
  --white: #fff;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --line: rgba(255, 255, 255, 0.52);
  --shadow: 0 24px 80px rgba(72, 38, 92, 0.16);
  --radius: 8px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #ffd5e2;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label[for],
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(53, 183, 207, 0.55);
  outline-offset: 3px;
}

#liquid-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.participant-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(37, 35, 51, 0.12));
  pointer-events: none;
}

.glass-card {
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(920px, calc(100% - 32px));
  min-height: 66px;
  margin: 12px auto 0;
  padding: 10px 12px 10px 16px;
  border-radius: var(--radius);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, var(--pink), var(--violet));
  box-shadow: 0 8px 24px rgba(201, 54, 105, 0.28);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.admin-link {
  padding: 10px 15px;
  border: 1px solid rgba(37, 35, 51, 0.12);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.page-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 72px;
}

.intro {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(37, 35, 51, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(42px, 8vw, 82px);
  font-weight: 700;
  line-height: 0.98;
  text-shadow: 0 8px 35px rgba(255, 255, 255, 0.36);
}

.description {
  margin: 18px auto 0;
  color: rgba(37, 35, 51, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

.image-section,
.response-section,
.background-section,
.submit-section {
  margin-top: 18px;
  padding: 28px;
  border-radius: var(--radius);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2,
.submit-section h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.25;
}

.section-heading p,
.submit-section p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-index {
  color: var(--pink-dark);
  font-size: 11px;
  font-weight: 900;
}

.status-chip {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(37, 35, 51, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 800;
}

.image-stage {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.image-stage.dragging {
  border-color: var(--pink);
  box-shadow: inset 0 0 0 3px rgba(255, 95, 145, 0.2);
}

#image-preview {
  display: none;
  width: 100%;
  height: 390px;
  object-fit: cover;
}

#image-preview.visible {
  display: block;
}

.image-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.image-empty.hidden {
  display: none;
}

.upload-symbol {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  color: white;
  background: rgba(37, 35, 51, 0.28);
  font-size: 25px;
  backdrop-filter: blur(12px);
}

.image-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-button,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: white;
  background: linear-gradient(135deg, var(--pink-dark), var(--violet));
  box-shadow: 0 12px 28px rgba(115, 54, 126, 0.28);
  font-weight: 800;
}

.primary-button {
  padding: 0 22px;
}

.text-button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(37, 35, 51, 0.12);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.subsection {
  margin-top: 24px;
}

.subsection-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.subsection-title h3 {
  margin: 0;
  font-size: 15px;
}

.subsection-title span {
  color: var(--muted);
  font-size: 12px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.preset-button {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.38);
}

.preset-button.selected {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 95, 145, 0.18);
}

.preset-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preset-button span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 5px;
  color: white;
  background: rgba(25, 22, 38, 0.52);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fields-container {
  display: grid;
  gap: 18px;
}

.field-block {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.28);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.field-label-row label,
.field-label-row .field-label {
  font-size: 15px;
  font-weight: 900;
}

.required-mark {
  margin-left: 4px;
  color: var(--pink-dark);
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
}

.text-input {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(37, 35, 51, 0.13);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  line-height: 1.7;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice-option {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(37, 35, 51, 0.13);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 800;
}

.choice-option.selected {
  border-color: var(--pink);
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--violet));
}

.background-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.background-option {
  min-height: 76px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  text-align: left;
}

.background-option.selected {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 95, 145, 0.16);
}

.background-swatch {
  display: block;
  width: 100%;
  height: 28px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 4px;
}

.background-option strong,
.background-option small {
  display: block;
}

.background-option strong {
  font-size: 12px;
}

.background-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.submit-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(255, 255, 255, 0.72);
}

.submit-button {
  flex: 0 0 auto;
  min-width: 190px;
  padding: 0 22px;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 7px;
  color: white;
  background: rgba(37, 35, 51, 0.88);
  box-shadow: 0 16px 50px rgba(25, 22, 38, 0.28);
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .topbar {
    top: 8px;
    width: calc(100% - 20px);
  }

  .brand small {
    display: none;
  }

  .page-shell {
    width: calc(100% - 20px);
    padding: 52px 0 44px;
  }

  .intro {
    margin-bottom: 24px;
  }

  .intro h1 {
    font-size: clamp(42px, 18vw, 68px);
  }

  .description {
    font-size: 16px;
  }

  .image-section,
  .response-section,
  .background-section,
  .submit-section {
    padding: 18px;
  }

  .section-heading {
    display: block;
  }

  .status-chip {
    display: inline-block;
    margin-top: 12px;
  }

  .image-stage,
  #image-preview {
    min-height: 310px;
    height: 310px;
  }

  .preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .background-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .submit-section {
    display: block;
  }

  .submit-button {
    width: 100%;
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


.display-image-frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  height: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.14)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

#display-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 32px rgba(58, 38, 72, 0.18));
}

.display-image-frame.empty #display-image {
  display: none;
}


.image-caption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  color: white;
  background: rgba(25, 22, 38, 0.52);
  backdrop-filter: blur(14px);
  font-size: 11px;
  font-weight: 800;
}

.image-caption span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .display-image-frame {
    height: auto;
    min-height: 280px;
    padding: 10px;
  }

  .image-caption {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #display-image {
    filter: none;
  }
}




