:root {
  --blue: #1710d1;
  --blue-deep: #0b00ad;
  --ink: #17152a;
  --muted: #6f6b86;
  --paper: #ffffff;
  --wash: #f5f3ff;
  --row: #eeecff;
  --danger: #c93443;
  --font-cn: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --font-en: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-cn);
  background-color: var(--wash);
  background-image:
    radial-gradient(980px 620px at 50% -12%, #fff 0%, rgba(255, 255, 255, 0) 68%),
    radial-gradient(900px 700px at -10% 46%, rgba(96, 78, 255, 0.12) 0%, rgba(96, 78, 255, 0) 64%),
    linear-gradient(150deg, #fbfaff 0%, #f0edff 55%, #faf9ff 100%);
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .skip-link {
  display: none !important;
}

button,
input {
  font: inherit;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app {
  width: 100%;
  padding: clamp(12px, 2.8vw, 34px) 16px clamp(26px, 5vw, 58px);
}

.view {
  display: block;
  width: min(100%, 430px);
  margin: 0 auto;
  animation: view-in 0.35s ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.art-card,
.register-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 30px 80px -42px rgba(36, 23, 138, 0.42);
}

.art-picture {
  display: block;
  width: 100%;
  line-height: 0;
}

.art-picture img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px 16px;
  background: #fff;
}

.landing-start {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}

.landing-start:hover {
  background: #2418e9;
}

.landing-start:active {
  transform: scale(0.99);
}

.landing-start:focus-visible,
.overlay-start:focus-visible,
.action:focus-visible,
.modal__confirm:focus-visible,
.modal__cancel:focus-visible,
.modal__close:focus-visible,
.score-row:focus-visible {
  outline: 3px solid rgba(23, 16, 209, 0.28);
  outline-offset: 3px;
}

/* 专家登记：真实表单叠在设计图上 */
.register-card {
  container-type: inline-size;
  aspect-ratio: 390 / 769;
}

.register-picture {
  position: absolute;
  inset: 0;
}

.register-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.register-form {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
}

.overlay-field {
  position: absolute;
  left: 6.1538%;
  width: 87.6923%;
  height: 6.2419%;
  margin: 0;
  padding: 0 3.6cqw;
  border: 1px solid #dedbe9;
  border-radius: 0;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: clamp(14px, 3.7cqw, 18px);
  -webkit-appearance: none;
  appearance: none;
}

.overlay-field::placeholder {
  color: #9b98ae;
}

.overlay-field:hover {
  border-color: #c5c0e1;
}

.overlay-field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 16, 209, 0.1);
}

.overlay-field.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(201, 52, 67, 0.12);
}

.reg-name { top: 51.885%; }
.reg-organization { top: 62.939%; }
.reg-title { top: 73.992%; }

.overlay-start {
  position: absolute;
  left: 6.1538%;
  top: 91.157%;
  width: 87.6923%;
  height: 6.2419%;
  border: 0;
  border-radius: 0;
  background: var(--blue);
  color: #fff;
  font-size: clamp(15px, 4cqw, 19px);
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.18s ease;
}

.overlay-start:hover {
  background: #2418e9;
}

.overlay-start:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* 作品评分 */
.review-page {
  position: relative;
  width: 100%;
  min-height: 100svh;
  padding: 24px 24px 28px;
  overflow: hidden;
  container-type: inline-size;
  background-color: #fff;
  background-image: url("/assets/bg-tall.webp");
  background-size: 100% auto;
  background-position: top center;
  background-repeat: no-repeat;
  border-radius: 22px;
  box-shadow: 0 30px 80px -42px rgba(36, 23, 138, 0.36);
}

.review-header {
  position: relative;
}

.review-brand {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.progress-caption {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  color: #8a879b;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.progress-caption strong {
  color: #8a879b;
  font-size: 17px;
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 2px;
  margin-top: 8px;
  background: #e2e0ea;
}

.progress-track span {
  display: block;
  width: 33.333%;
  height: 100%;
  background: var(--blue);
  transition: width 0.25s ease;
}

.work-code {
  margin: 30px 0 5px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.work-title {
  margin: 0;
  color: var(--blue);
  font-size: clamp(21px, 5.7cqw, 25px);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.35;
  word-break: break-word;
}

.work-figure {
  margin: 24px 0 0;
  overflow: hidden;
  background: #f1efff;
}

.work-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.section-divider {
  height: 1px;
  margin: 24px 0;
  background: #e5e3eb;
}

.scoring-section h2 {
  margin: 0;
  color: var(--blue);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.score-hint {
  margin: 6px 0 18px;
  color: #8a879b;
  font-size: 10.5px;
  line-height: 1.5;
}

.score-list {
  display: grid;
  gap: 8px;
}

.score-row {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 1px;
  background: var(--row);
  color: var(--blue);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.score-row:hover {
  background: #e6e2ff;
}

.score-row:active {
  background: #ded9ff;
}

.score-row__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.score-row__value {
  flex: 0 0 auto;
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.score-row.is-unscored .score-row__value {
  color: #7773a0;
}

.total-row {
  position: relative;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 0 12px 13px;
  overflow: hidden;
  background: #f5f5f8;
}

.total-label {
  color: #8b889c;
  font-size: 14px;
  font-weight: 600;
}

.total-score {
  margin-left: auto;
  color: #8b889c;
  font-family: var(--font-en);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.total-score.has-score {
  color: var(--blue);
}

.total-meter {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 13px;
  background: #dedde7;
}

.total-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
  transition: width 0.25s ease;
}

.review-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.action {
  height: 46px;
  border-radius: 1px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.action--back {
  flex: 0 0 27.5%;
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
}

.action--back:hover {
  background: #f3f1ff;
}

.action--next {
  flex: 1;
  border: 0;
  background: var(--blue);
  color: #fff;
}

.action--next:hover {
  background: #2418e9;
}

.action:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 评分弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 9, 49, 0.64);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal__panel {
  position: relative;
  width: min(100%, 380px);
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 28px 24px 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(6, 2, 45, 0.4);
  animation: modal-in 0.28s cubic-bezier(0.2, 0.9, 0.25, 1.1) both;
}

.modal__panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #1710d1, #5549ff 60%, #c1bbff);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #716d88;
  cursor: pointer;
}

.modal__close:hover {
  background: #f2f0fa;
}

.modal__close svg {
  width: 18px;
  height: 18px;
}

.modal__eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal__panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal__hint {
  margin: 8px 0 22px;
  color: #77738f;
  font-size: 12px;
  line-height: 1.65;
}

.score-input-wrap {
  height: 72px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  border: 1px solid #e2dff0;
  border-radius: 12px;
  background: #fbfaff;
}

.score-input-wrap input {
  width: 105px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--blue);
  font-family: var(--font-en);
  font-size: 44px;
  font-weight: 700;
  text-align: right;
  letter-spacing: -0.05em;
  -moz-appearance: textfield;
}

.score-input-wrap input::-webkit-outer-spin-button,
.score-input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-input-wrap span {
  color: #8a86a0;
  font-family: var(--font-en);
  font-size: 15px;
}

.score-range {
  width: 100%;
  margin: 20px 0 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

.converted-preview {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 9px;
  background: #f2f0ff;
  color: #767292;
  font-size: 12px;
}

.converted-preview strong {
  color: var(--blue);
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 700;
}

.modal__actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
  margin-top: 22px;
}

.modal__cancel,
.modal__confirm {
  height: 46px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.modal__cancel {
  border: 1px solid #dedbea;
  background: #fff;
  color: #5e5975;
}

.modal__cancel:hover {
  background: #f7f6fb;
}

.modal__confirm {
  border: 0;
  background: var(--blue);
  color: #fff;
}

.modal__confirm:hover {
  background: #2418e9;
}

.success-panel {
  text-align: center;
  padding-top: 34px;
}

.confirm-panel {
  text-align: center;
  padding-top: 32px;
}

.warning-badge {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff4e3;
  color: #b36a00;
}

.warning-badge svg {
  width: 30px;
  height: 30px;
}

.confirm-panel h2 {
  font-size: 22px;
}

.confirm-panel p {
  max-width: 300px;
  margin: 10px auto 22px;
  color: #6f6b86;
  font-size: 13px;
  line-height: 1.8;
}

.confirm-panel .modal__actions {
  margin-top: 0;
}

.success-badge {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3023f0, #1209b5);
  color: #fff;
  box-shadow: 0 10px 28px rgba(23, 16, 209, 0.3);
}

.success-badge svg {
  width: 30px;
  height: 30px;
}

.success-panel p {
  margin: 0 auto;
  max-width: 300px;
  color: #6f6b86;
  font-size: 13px;
  line-height: 1.8;
}

.success-receipt {
  margin: 20px 0 18px !important;
  padding: 10px;
  border-radius: 8px;
  background: #f6f5fb;
  color: #8a869b !important;
  font-size: 11px !important;
}

.success-receipt strong {
  color: var(--blue);
  font-family: var(--font-en);
  letter-spacing: 0.03em;
}

.success-panel .modal__confirm {
  width: 100%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 200;
  max-width: min(88vw, 420px);
  padding: 11px 16px;
  border-radius: 9px;
  background: rgba(22, 17, 54, 0.95);
  color: #fff;
  box-shadow: 0 10px 34px rgba(11, 7, 40, 0.28);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: rgba(105, 24, 32, 0.96);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 300;
  padding: 14px 18px;
  border-radius: 10px;
  background: #211a4b;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 560px) {
  body {
    background: #fff;
  }

  .app {
    padding: 0 0 env(safe-area-inset-bottom);
  }

  .view {
    width: 100%;
  }

  .art-card,
  .register-card {
    border-radius: 0;
    box-shadow: none;
  }

  .review-page {
    min-height: 100svh;
    border-radius: 0;
    box-shadow: none;
  }

  .review-page,
  .landing-footer {
    padding-right: 24px;
    padding-left: 24px;
  }

  .register-form .overlay-field,
  .register-form .overlay-start {
    left: 6.1538%;
    width: 87.6923%;
  }
}

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