/* 投稿与审核：编辑器下方流程区、投稿步骤、审核结果、官方审核页、比赛规则版本页 */
#workshop-container {
  display: flex;
  flex-direction: column;
}
#workshop-frame {
  flex: 1;
  min-height: 0;
  height: auto;
}
.flow-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 24px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.flow-state,
.flow-actions {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.flow-where,
.flow-note {
  margin: 0;
  color: #646e85;
  font-size: 14px;
}
.flow-warn {
  color: #9a5b00;
  font-size: 14px;
}
.flow-bar button,
.flow-bar a.button {
  padding: 8px 14px;
  font-size: 14px;
}
.flow-actions .primary {
  order: 1;
}
/* The mock dev panel's button sits in the bottom-left corner. */
body:has(.mock-panel) .flow-bar {
  padding-left: 104px;
}
a.button.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
a.button.primary:hover {
  background: #4454db;
}
.flow-bar .error {
  flex-basis: 100%;
  margin: 0;
}
.flow-bar .error:empty {
  display: none;
}
.state-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  color: #4b556e;
  background: #eef0f6;
}
.state-badge[data-state='review'] {
  color: #8a5300;
  background: #fff1d6;
}
.state-badge[data-state='revise'] {
  color: #8a3d00;
  background: #ffe8d6;
}
.state-badge[data-state='approved'] {
  color: #1f7a5c;
  background: #e3f6ee;
}
.state-badge[data-state='removed'] {
  color: #a42b40;
  background: #fde7eb;
}
/* 审核中：徽章里的小转圈 */
.review-spinner {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin: 0 6px 0 0;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: review-spin 0.9s linear infinite;
}
@keyframes review-spin {
  to {
    transform: rotate(360deg);
  }
}
.state-badge[data-state='locked'],
.state-badge[data-state='voting'],
.state-badge[data-state='judging'] {
  color: #2b3fc7;
  background: #e7eaff;
}
.state-badge[data-state='winner'] {
  color: #fff;
  background: #c98a12;
}
.work-card .state-badge {
  margin: 0 0 12px 8px;
}
.lock-note {
  align-self: center;
  color: #646e85;
  font-size: 13px;
}

/* 投稿步骤：切换步骤时只让表单淡入 */
.submit-flow > form {
  animation: fv-fade-in var(--motion-base) var(--motion-ease);
}
.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.stepper li {
  counter-increment: step;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #646e85;
  font-size: 13px;
}
.stepper li::before {
  content: counter(step) '. ';
}
.stepper li[data-done] {
  color: #2b3fc7;
  border-color: #c9cffa;
}
.stepper li[aria-current] {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
.submit-step h2 {
  margin-bottom: 12px;
}
.submit-step h2:focus {
  outline: none;
}
.step-lead {
  color: #47516d;
}
.step-note {
  font-size: 14px;
}
.step-note a,
.choice small a {
  color: #4758d9;
  text-decoration: underline;
}
.step-note.warn {
  color: #a42b40;
}
.choices {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.choice:has(input:checked) {
  border-color: var(--blue);
  background: #f5f6ff;
}
.choice:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}
.choice input {
  margin: 4px 0 0;
  flex: none;
  accent-color: var(--blue);
}
.choice span {
  min-width: 0;
  line-height: 1.6;
}
.choice small {
  display: block;
  color: #646e85;
  font-size: 13px;
}
.checks {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}
.checks li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.check-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  color: #fff;
  background: #2f9e5b;
}
.checks li[data-ok='false'] .check-mark {
  background: #c23a4f;
}
.submit-step .actions {
  justify-content: flex-end;
  margin-top: 8px;
}
.submit-preview {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.submit-preview img,
.submission-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 16px;
  background: #e9edf4;
}
.submit-photos ul,
.submission-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.submit-photos {
  margin-top: 20px;
}
.submit-photos li,
.submission-photos li {
  position: relative;
}
.submit-photos img,
.submission-photos img {
  display: block;
  width: 120px;
  aspect-ratio: 9 / 7;
  object-fit: cover;
  border-radius: 10px;
  background: #e9edf4;
}
.submit-photos li[data-main] img,
.submission-photos li[data-main] img {
  outline: 2px solid #e0a81a;
  outline-offset: 1px;
}
.submit-photos li span,
.submission-photos li span {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #ffd36e;
  color: #3a2a00;
  font-size: 12px;
}
.submit-scenes {
  border: 0;
  padding: 0;
  margin: 20px 0 0;
}
.submit-scenes legend {
  font-weight: 650;
  margin-bottom: 10px;
}
.scene-choices img {
  width: 56px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 10px;
}
.submit-preview dl,
.submission-facts {
  margin: 0;
  display: grid;
  gap: 10px;
}
.submit-preview dl div,
.submission-facts div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}
.submit-preview dt,
.submission-facts dt {
  color: #646e85;
  font-size: 14px;
}
.submit-preview dd,
.submission-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.submission-facts a {
  color: #4758d9;
}

/* 审核结果 */
.submission {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
}
.submission-info {
  display: grid;
  gap: 16px;
  align-content: start;
}
.submission-info > p {
  margin: 0;
}
.submission .actions {
  flex-wrap: wrap;
}
.review-reason {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fdf1f3;
  color: #6d2232;
}
.review-reason strong {
  display: block;
  font-size: 14px;
}
.review-reason p {
  margin: 4px 0;
  color: inherit;
  white-space: pre-wrap;
}
.review-reason small {
  color: #8a5560;
}

/* 审核中的等待画面 */
.review-wait {
  max-width: 640px;
  margin: 0 auto;
  padding: 44px 32px 28px;
  text-align: center;
}
.review-wait h2 {
  margin: 22px 0 10px;
  font-size: 24px;
}
.review-wait > p {
  margin: 6px auto;
  max-width: 460px;
  color: #646e85;
  line-height: 1.8;
}
.review-wait .actions {
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}
.review-loader {
  display: block;
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto;
}
.review-loader span {
  position: absolute;
  inset: 0;
  border: 4px solid transparent;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: review-spin 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}
.review-loader span:nth-child(2) {
  inset: 10px;
  border-top-color: #9aa8ff;
  animation-delay: -0.3s;
}
.review-loader span:nth-child(3) {
  inset: 20px;
  border-top-color: #c9cffa;
  animation-delay: -0.6s;
}
.review-wait-facts {
  margin-top: 28px;
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.review-wait-facts summary {
  cursor: pointer;
  color: #646e85;
  font-size: 14px;
}
.review-wait-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
}
.review-reason[data-result='revise'] {
  background: #fff3e8;
  color: #6b3300;
}
.review-reason[data-result='revise'] small {
  color: #8a6040;
}
.submission-gone,
.review-gone {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: #c9a0a8;
  font-size: 40px;
  background: #f6eef0;
}
.review-gone {
  aspect-ratio: auto;
  min-height: 200px;
}
.danger-outline {
  color: #a42b40;
  border-color: #e7b5bf;
}
.danger-outline:hover {
  color: #fff;
  background: #c23a4f;
  border-color: #c23a4f;
}
/* 工坊作品卡：审核中的作品盖一层等待画面 */
.work-cover {
  position: relative;
  display: block;
}
.work-waiting {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #2b3fc7;
  font-size: 14px;
  font-weight: 650;
  background: rgb(255 255 255 / 0.78);
  backdrop-filter: blur(2px);
}
.work-waiting .review-loader {
  width: 40px;
  height: 40px;
}
.work-waiting .review-loader span {
  border-width: 3px;
}
.work-waiting .review-loader span:nth-child(2) {
  inset: 6px;
}
.work-waiting .review-loader span:nth-child(3) {
  inset: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .review-spinner,
  .review-loader span {
    animation-duration: 3s;
  }
}

/* 官方审核 */
.review-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 20px;
  overflow: visible;
}
.review-filters label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #646e85;
}
.review-list {
  display: grid;
  gap: 16px;
}
.review-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
}
.review-card img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: contain;
  background: #e9edf4;
}
.review-body {
  padding: 18px 22px;
}
.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.review-meta {
  margin: 4px 0;
  font-size: 13px;
}
.review-card .review-reason {
  margin: 8px 0;
}
.review-card .actions {
  flex-wrap: wrap;
  margin-top: 12px;
}
.review-card .actions button,
.review-card .actions a.button {
  padding: 8px 14px;
  font-size: 14px;
}

/* 比赛规则版本 */
.rules {
  max-width: 900px;
  padding: 28px 32px 8px;
}
.rules .step-note {
  margin: 0 0 24px;
}
.rules .contest-section .body {
  white-space: pre-wrap;
  color: #47516d;
  line-height: 1.9;
}

@media (max-width: 720px) {
  .flow-bar {
    padding: 8px 12px;
  }
  .flow-where {
    display: none;
  }
  .flow-actions {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .flow-actions > * {
    flex: none;
  }
  .flow-actions .primary {
    order: -1;
  }
  .submit-preview,
  .submission,
  .review-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .submission,
  .rules {
    padding: 20px;
  }
  .submit-preview img,
  .submission-image {
    max-width: 280px;
  }
  .review-card img {
    min-height: 0;
    max-height: 240px;
  }
  .review-wait {
    padding: 32px 20px 20px;
  }
  .review-wait-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
.state-badge[data-state='shared'] {
  color: #1f6b4f;
  background: #e2f5ec;
}
