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

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

:root {
  --bg: #f7f8fa;
  --card: #fff;
  --text: #333333;
  --text-muted: #666666;
  --text-placeholder: #bfbfbf;
  --border: #e9e9e9;
  --primary: #528aff;
  --primary-disabled: #a8c4fb;
  --danger: #ff4d4f;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.5;
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: 0.28rem;
  padding: env(safe-area-inset-top) 0
    calc(1.28rem + env(safe-area-inset-bottom));
  background: var(--bg);
}

input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.28rem;
  line-height: inherit;
  text-align: right;
  flex: 1;
  min-width: 0;
  color: var(--text);
  background: transparent;
}

input::placeholder {
  color: var(--text-placeholder);
}

.main {
  width: 100%;
  max-width: 7.5rem;
  margin: 0 auto;
  padding: 0.32rem;
  box-sizing: border-box;
}

.card {
  background: var(--card);
  border-radius: 0.16rem;
  overflow: hidden;
  margin-bottom: 0.24rem;
  padding: 0.08rem 0.24rem;
}

.field {
  padding: 0.24rem 0;
  border-bottom: 0.01rem solid var(--border);
}

.field:last-child {
  border-bottom: none;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.24rem;
  min-height: 0.4rem;
}

.label {
  flex-shrink: 0;
  font-size: 0.28rem;
  font-weight: 600;
  color: var(--text);
}

.req {
  color: var(--danger);
  margin-right: 0.04rem;
}

.field-hint {
  flex: 1;
  text-align: right;
  color: var(--text-placeholder);
  font-size: 0.28rem;
}

.upload-area {
  margin-top: 0.28rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  width: 100%;
  justify-content: flex-start;
}

.upload-tile {
  position: relative;
  width: 1.98rem;
  height: 1.98rem;
  flex-shrink: 0;
}

.upload-tile-w {
  width: 6.38rem;
  height: 1.98rem;
}

.upload-tile.trigger {
  background: #f5f6f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.24rem;
  margin-top: 0.08rem;
  border-radius: 0.16rem;
}

.upload-tile.preview > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.16rem;
}

.upload-remove {
  position: absolute;
  top: -0.16rem;
  right: -0.16rem;
  width: 0.32rem;
  height: 0.32rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.upload-remove .icon-close {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.upload-tile .icon-camera {
  width: 0.8rem;
  height: 0.8rem;
  object-fit: contain;
  display: block;
}

.info-card .info-title {
  font-weight: 600;
  font-size: 0.28rem;
  padding: 0.16rem 0;
  color: var(--text);
}

.info-body {
  font-size: 0.24rem;
  color: var(--text);
  line-height: 1.65;
  padding-bottom: 0.16rem;
}

.info-link {
  display: inline-block;
  margin-top: 0.08rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.24rem;
  word-break: break-all;
  padding-bottom: 0.16rem;
}

.info-link:active {
  opacity: 0.85;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 7.5rem;
  margin: 0 auto;
  padding: 0.2rem 0.32rem calc(0.4rem + env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: var(--card);
  z-index: 90;
}

.btn-submit {
  width: 100%;
  height: 0.8rem;
  border: none;
  border-radius: 0.08rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.32rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0.08rem 0.2rem rgba(82, 138, 255, 0.35);
}

.btn-submit:disabled {
  background: var(--primary-disabled);
  cursor: not-allowed;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 0.24rem 0.36rem;
  border-radius: 0.12rem;
  font-size: 0.26rem;
  z-index: 200;
  max-width: 80%;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.toast.show {
  opacity: 1;
}

.success-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem;
  box-sizing: border-box;
}

.success-modal {
  width: 100%;
  max-width: 5.8rem;
  background: var(--card);
  border-radius: 0.16rem;
  padding: 0.4rem 0.36rem 0.36rem;
  box-sizing: border-box;
  box-shadow: 0 0.08rem 0.48rem rgba(0, 0, 0, 0.12);
  text-align: center;
}

.success-modal__msg {
  margin: 0 0 0.4rem;
  font-size: 0.34rem;
  font-weight: 600;
  color: var(--text);
  line-height: 0.4rem;
  word-break: break-word;
}

.success-modal__close {
  width: 100%;
  height: 0.8rem;
  border: none;
  border-radius: 0.08rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.3rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0.08rem 0.2rem rgba(82, 138, 255, 0.35);
}

.success-modal__close:active {
  opacity: 0.92;
}

.good_items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  width: 100%;
  justify-content: flex-start;
  padding-top: 0.02rem;
}

.good_items .item {
  width: calc(1.98rem - 2px);
  height: 0.8rem;
  line-height: 0.8rem;
  text-align: center;
  border-radius: 0.08rem;
  border: 1px solid #e9e9e9;
  background: #fafafa;
  margin-top: 0.22rem;
  font-size: 0.28rem;
  box-sizing: border-box;
}

.good_items .active {
  background: #528aff;
  color: #fff;
}
