:root {
  --brand: #07c160;
  --text: #191919;
  --muted: #888888;
  --line: #ededed;
  --bg: #f7f7f7;
  --danger: #fa5151;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.04);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 16px 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.topbar__brand {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.topbar__step {
  font-size: 12px;
  color: var(--muted);
}

.topbar__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  padding: 0 0 40px;
}

.steps {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 16px 20px 14px;
  list-style: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.steps__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.steps__index {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e5e5e5;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.steps__item.is-active {
  color: var(--text);
  font-weight: 600;
}

.steps__item.is-active .steps__index {
  background: var(--brand);
}

.steps__item.is-done {
  color: var(--brand);
}

.steps__item.is-done .steps__index {
  background: var(--brand);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 0;
}

.breadcrumb__path {
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb__back {
  font-size: 15px;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: #576b95;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.link-btn:active {
  opacity: 0.6;
}

.weui-cells__title {
  color: var(--muted);
}

.reason-cell {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.reason-cell:active {
  background: #f2f2f2;
}

.reason-cell .weui-cell__bd {
  min-width: 0;
}

.reason-text {
  display: block;
  line-height: 1.45;
}

.chosen-cell {
  margin-top: 12px;
}

.chosen__label {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--muted);
}

.chosen__value {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.weui-label {
  width: 5.2em;
}

.field-error {
  margin: 6px 16px 0;
  font-size: 13px;
  color: var(--danger);
}

.weui-input_invalid {
  color: var(--danger);
}

.upload-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #b2b2b2;
}

.weui-uploader__file {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.weui-uploader__input-box.is-full {
  display: none;
}

.weui-uploader.is-dragover .weui-uploader__input-box {
  border-color: var(--brand);
  background: #f0fff6;
}

.shot__remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0 0 0 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 15px;
  line-height: 22px;
  cursor: pointer;
}

.shot__badge {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 3px 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  text-align: center;
}

.shot__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--brand);
  transition: width 0.2s ease;
}

.shot__retry {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.weui-textarea-counter {
  color: #b2b2b2;
}

.privacy-note {
  display: flex;
  gap: 6px;
  margin: 20px 16px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f8fa;
  color: #7a7a7a;
  font-size: 12px;
  line-height: 1.6;
}

.submit-bar {
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
}

.submit-bar .weui-btn {
  margin: 0;
}

.submit-bar .weui-btn[disabled] {
  opacity: 0.7;
}

.submit-note {
  margin: 10px 0 0;
  color: #b2b2b2;
  font-size: 12px;
  text-align: center;
}

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 32px;
  text-align: center;
}

.state__title {
  margin: 16px 0 8px;
  font-size: 19px;
  font-weight: 600;
}

.state__text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.state__btn {
  margin-top: 28px;
  width: 100%;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e8e8e8;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ticket-card {
  margin: 8px 24px 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f7f8fa;
  text-align: left;
}

.ticket-card__label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.ticket-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-card__row strong {
  font-size: 18px;
  letter-spacing: 0.5px;
}

.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  z-index: 100;
  max-width: 80vw;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in 0.18s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

@media (min-width: 561px) {
  body {
    padding: 24px 0;
  }

  #app {
    min-height: calc(100vh - 48px);
    border-radius: 16px;
    overflow: hidden;
  }

  .topbar {
    border-radius: 16px 16px 0 0;
  }
}
