:root {
  color-scheme: light;
}

body {
  background:
    linear-gradient(180deg, #eef2ff 0, rgba(244, 246, 252, 0) 340px),
    var(--bg);
}

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px 44px;
}

/* 顶部 */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(36, 87, 245, 0.24);
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.brand-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #7a5a00;
  background: var(--yellow);
  padding: 3px 6px;
  border-radius: 6px;
  transform: translateY(-1px);
}

.top-meta {
  font-size: 12px;
  color: var(--muted-2);
}

/* 头图 */
.hero {
  padding: 22px 2px 16px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-deep);
  letter-spacing: 0.2px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 159, 110, 0.14);
}

.hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(34px, 9.4vw, 44px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.hero .mark {
  display: inline-block;
  padding: 0 3px;
  background: linear-gradient(180deg, transparent 63%, var(--yellow) 63%);
}

.hero-sub {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* 门店 */
.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px 0 11px;
  margin: 2px 0 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
  max-width: 100%;
}

.store-chip .i {
  color: var(--muted);
}

.store-chip strong {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-chip .chip-action {
  color: var(--primary);
  font-weight: 600;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.store-chip.is-empty {
  border-style: dashed;
  border-color: #b9c8e8;
  color: var(--primary-deep);
}

.store-chip.is-empty .i {
  color: var(--primary);
}

/* 卡片与表单 */
.card {
  background: var(--surface);
  border: 1px solid rgba(225, 231, 243, 0.9);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-card);
}

.group + .group {
  margin-top: 24px;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.step {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-label {
  font-size: 14px;
  font-weight: 700;
}

.group-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted-2);
}

/* 类型 */
.cats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.cat {
  grid-column: span 2;
  height: 74px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cat:nth-child(4),
.cat:nth-child(5) {
  grid-column: span 3;
}

.cat .i {
  color: var(--muted);
  transition: color 0.15s ease;
}

.cat:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.cat[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary-tint);
  color: var(--primary-deep);
  font-weight: 700;
  box-shadow: inset 0 0 0 0.5px var(--primary);
}

.cat[aria-pressed="true"] .i {
  color: var(--primary);
}

/* 文本 */
.ta-wrap {
  position: relative;
}

textarea.field {
  min-height: 116px;
  resize: vertical;
  line-height: 1.65;
  padding-bottom: 30px;
}

.counter {
  position: absolute;
  right: 12px;
  bottom: 9px;
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.counter.warn {
  color: var(--amber);
}

.counter.over {
  color: var(--red);
  font-weight: 700;
}

/* 附件 */
.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.media-tile {
  height: 64px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  background: #fbfcff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.media-tile:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.media-tile:disabled {
  opacity: 0.55;
}

.media-tile .tile-icon {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-tile .tile-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.media-tile strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.media-tile small {
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

.rec-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--red-soft);
  border: 1px solid #f6c4c4;
  border-radius: 12px;
}

.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.3;
    transform: scale(0.82);
  }
}

.rec-time {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: #8d1b1b;
  font-variant-numeric: tabular-nums;
}

.rec-text {
  font-size: 12.5px;
  color: #9a3434;
  margin-right: auto;
}

.rec-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface);
  color: #8d1b1b;
  border: 1px solid #f0b9b9;
}

.rec-btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  color: var(--muted);
}

.thumb-add {
  aspect-ratio: 1 / 1;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  background: #fbfcff;
}

.audio-item {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  margin-top: 2px;
}

.audio-play {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-item audio {
  height: 32px;
  flex: 1;
  min-width: 0;
}

.audio-del {
  color: var(--muted-2);
  padding: 6px;
}

.audio-del:hover {
  color: var(--red);
}

/* 着急程度 */
.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #f1f4fb;
  padding: 4px;
  border-radius: 12px;
}

.seg button {
  height: 42px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.seg button .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.seg button[data-urgency="1"] .dot {
  background: var(--green);
}

.seg button[data-urgency="2"] .dot {
  background: #d97706;
}

.seg button[data-urgency="3"] .dot {
  background: var(--red);
}

.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.seg button:hover:not([aria-pressed="true"]) {
  color: var(--ink-2);
}

/* 联系方式 */
.contact-wrap {
  position: relative;
}

.contact-wrap .i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  width: 19px;
  height: 19px;
}

.contact-wrap .field {
  padding-left: 41px;
}

/* 奖励提示 */
.reward-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 2px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--yellow-soft);
  border: 1px solid #f2dfa2;
  font-size: 12.5px;
  line-height: 1.5;
  color: #7a5410;
}

.reward-badge {
  flex: none;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--yellow);
  color: #4a3306;
  font-size: 11px;
  font-weight: 700;
}

/* 提交 */
.actions {
  margin-top: 26px;
}

.submit {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  font-size: 16.5px;
  letter-spacing: 0.3px;
  gap: 10px;
}

.submit .i {
  transition: transform 0.15s ease;
}

.submit:hover:not(:disabled) .i {
  transform: translateX(2px);
}

.fineprint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 11px;
  font-size: 12px;
  color: var(--muted-2);
}

.fineprint .i {
  width: 13px;
  height: 13px;
}

/* 结果 */
.result {
  text-align: center;
  padding-top: 28px;
}

.result-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-icon .i {
  width: 34px;
  height: 34px;
  stroke-width: 2.4;
}

.result h2 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.result .result-sub {
  margin: 8px auto 0;
  max-width: 34em;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

.code-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px auto 0;
  padding: 9px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}

.code-line b {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 1.5px;
  color: var(--ink);
}

.code-line button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  padding: 2px 4px;
}

/* 票券 */
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 88px 1fr;
  margin: 20px 0 18px;
  text-align: left;
  border: 1px solid #efd28c;
  border-radius: 15px;
  background: #fffdf6;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(196, 148, 22, 0.1);
}

.ticket-left {
  background: var(--yellow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 14px 6px;
}

.ticket-label {
  font-size: 18px;
  font-weight: 800;
  color: #4a3800;
  letter-spacing: 1px;
}

.ticket-sub {
  font-size: 10.5px;
  color: #7a5a00;
  letter-spacing: 0.5px;
}

.ticket-right {
  padding: 13px 14px;
  border-left: 1px dashed #e3c778;
  min-width: 0;
}

.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  left: 80px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid #efd28c;
}

.ticket::before {
  top: -9px;
}

.ticket::after {
  bottom: -9px;
}

.ticket-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.ticket-code {
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary-deep);
  margin: 2px 0 1px;
}

.ticket-note {
  font-size: 11px;
  color: #8a7a4f;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.result-actions .btn {
  width: 100%;
  height: 46px;
}

/* 底部 */
.foot {
  margin-top: 26px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.8;
}

.foot strong {
  color: var(--muted);
  font-weight: 600;
}

/* 门店列表 */
.org-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 6px;
}

.org-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 11px;
  text-align: left;
  font-size: 14.5px;
  color: var(--ink-2);
}

.org-item:hover {
  background: var(--surface-2);
}

.org-item .code {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted-2);
}

.org-item .i {
  color: var(--primary);
  opacity: 0;
}

.org-item[aria-checked="true"] {
  background: var(--primary-tint);
  color: var(--primary-deep);
  font-weight: 600;
}

.org-item[aria-checked="true"] .i {
  opacity: 1;
}

.org-item[aria-checked="true"] .code {
  color: #6f86c9;
}

@media (min-width: 720px) {
  .page {
    padding-bottom: 60px;
  }

  .card {
    padding: 26px 24px;
  }

  .hero {
    padding-top: 30px;
  }

  .top {
    padding-top: 24px;
  }
}

@media (max-width: 370px) {
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .card {
    padding: 18px 15px;
  }

  .cat {
    font-size: 12px;
  }

  .media-tile {
    padding: 0 9px;
    gap: 8px;
  }

  .media-tile small {
    display: none;
  }

  .seg button {
    font-size: 12.5px;
    gap: 4px;
  }
}

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