:root {
  color-scheme: light;
  /* 主题 brand（品牌红）——默认值，同时是其他主题未覆盖变量的兜底 */
  --brand: #c9004c;
  --brand-strong: #aa003f;
  --brand-soft: #fff1f6;
  --brand-border: #f0c7d7;
  --page-bg: #f8f6f7;
  --surface: #fff;
  --text: #211c1f;
  --muted: #756b70;
  --border: #e8e1e4;
  --radius-card: 14px;
  --radius-control: 10px;
  --radius-button: 10px;
  --shadow-card: 0 10px 30px rgba(94, 31, 56, .06);
  --shadow-card-small: 0 8px 24px rgba(94, 31, 56, .05);
  --card-hover-bg: #fffafd;
  --focus-tint: rgba(201, 0, 76, .12);
  --heading-weight: 700;
  --heading-spacing: -.03em;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  font-synthesis: none;
}

/* 主题 fresh_green（清新商超绿）：圆润胶囊按钮，轻盈的绿调阴影 */
body[data-theme="fresh_green"] {
  --brand: #16a34a;
  --brand-strong: #15803d;
  --brand-soft: #eefdf3;
  --brand-border: #bbf0cf;
  --page-bg: #f6faf7;
  --radius-card: 18px;
  --radius-control: 12px;
  --radius-button: 999px;
  --shadow-card: 0 10px 26px rgba(22, 163, 74, .09);
  --shadow-card-small: 0 8px 20px rgba(22, 163, 74, .07);
  --card-hover-bg: #f4fcf6;
  --focus-tint: rgba(22, 163, 74, .14);
}

/* 主题 warm_peach（暖阳关怀橙）：大圆角、暖色柔和阴影，亲和感 */
body[data-theme="warm_peach"] {
  --brand: #e0692a;
  --brand-strong: #c2551e;
  --brand-soft: #fff3ea;
  --brand-border: #f5d0b0;
  --page-bg: #fdf8f5;
  --radius-card: 20px;
  --radius-control: 13px;
  --radius-button: 13px;
  --shadow-card: 0 14px 34px rgba(224, 105, 42, .11);
  --shadow-card-small: 0 10px 26px rgba(224, 105, 42, .09);
  --card-hover-bg: #fff8f2;
  --focus-tint: rgba(224, 105, 42, .14);
}

/* 主题 minimal_gray（简约灰白）：小圆角、去阴影的扁平风格 */
body[data-theme="minimal_gray"] {
  --brand: #45454b;
  --brand-strong: #27272a;
  --brand-soft: #f4f4f5;
  --brand-border: #d4d4d8;
  --page-bg: #fafafa;
  --border: #e0e0e3;
  --radius-card: 8px;
  --radius-control: 6px;
  --radius-button: 6px;
  --shadow-card: none;
  --shadow-card-small: none;
  --card-hover-bg: #f6f6f7;
  --focus-tint: rgba(69, 69, 75, .12);
  --heading-weight: 650;
  --heading-spacing: -.02em;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
}

a {
  color: inherit;
}

.container {
  width: min(100% - 32px, 520px);
  margin: 0 auto;
  padding: 40px 0 max(28px, env(safe-area-inset-bottom));
}

.hero {
  margin-bottom: 24px;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.brand-logo {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 6px;
}

.brand-logo img {
  display: block;
  width: 180px;
  max-width: 48vw;
  height: auto;
}

.eyebrow {
  display: block;
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: var(--heading-weight);
  line-height: 1.2;
  letter-spacing: var(--heading-spacing);
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero .hero-meta {
  margin-top: 6px;
  font-size: 12px;
}

.module-list {
  display: grid;
  gap: 10px;
}

.wechat-scan-hint {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.module-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card-small);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}

.module-card > span:nth-child(2) {
  min-width: 0;
}

.module-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-control);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
}

.service-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-card strong,
.content-card h2 {
  display: block;
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.module-card small,
.content-card p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.arrow {
  display: grid;
  place-items: center;
  color: var(--brand);
  text-align: right;
}

.arrow svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-card {
  margin-top: 8px;
  padding: 18px 2px 8px;
  border-top: 1px solid var(--border);
}

.content-image {
  display: block;
  width: 100%;
  max-height: 320px;
  margin: 4px 0 10px;
  border-radius: var(--radius-control);
  object-fit: cover;
}

.content-label {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}

.empty-state,
.detail-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.empty-state h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.empty-state p,
.detail-card > p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.primary-link {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 16px;
  border-radius: var(--radius-button);
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.parking-coupon-not-eligible {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: #fff;
}

.parking-coupon-not-eligible p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.parking-qr-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 20px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: #fff;
  text-align: center;
}

.parking-qr-panel img {
  display: block;
  width: min(240px, 100%);
  height: auto;
  image-rendering: pixelated;
}

.parking-guide-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 12px 16px;
}

.parking-guide-steps {
  display: grid;
  gap: 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.parking-guide-steps h2 {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.5;
}

.parking-guide-steps img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.context-list {
  display: grid;
  margin: 24px 0 0;
}

.context-list div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.context-list dt {
  color: var(--muted);
  font-size: 13px;
}

.context-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
}

.notice {
  margin-top: 20px !important;
  padding: 13px 14px;
  border-radius: var(--radius-control);
  background: var(--brand-soft);
  color: var(--brand-strong) !important;
  font-size: 13px;
  line-height: 1.6 !important;
}

.form-card {
  padding: 24px;
}

.receipt-store {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin-top: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.receipt-store-control {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
}

.receipt-store-control:focus-within {
  outline: 2px solid var(--focus-tint);
  outline-offset: 1px;
}

.receipt-store > span {
  color: var(--brand-strong);
  font-size: 12px;
}

.receipt-store strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 16px;
}

.receipt-store-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.complaint-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  font-size: 14px;
  font-weight: 600;
}

.form-field-label {
  font-size: 14px;
  font-weight: 600;
}

.form-field-label small {
  margin-left: 4px;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 500;
}

.required-mark {
  margin-right: 3px;
  color: #b42318;
}

.optional-mark {
  margin-left: 4px;
  color: #9a8e94;
  font-size: 12px;
  font-weight: 500;
}

.message-type-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.message-type-field legend {
  margin-bottom: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}

.message-type-field > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.message-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.message-type-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.message-type-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.message-type-option span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: #544a4f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.message-type-option input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.message-type-option input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d9d0d4;
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
}

.form-field textarea {
  min-height: 128px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand);
  outline: 2px solid var(--focus-tint);
  outline-offset: 1px;
}

.form-field > small,
.form-alternative {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.image-picker-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.image-picker-button {
  display: grid;
  place-items: center;
  align-content: center;
  width: 92px;
  height: 92px;
  padding: 8px;
  border: 1px dashed #aaa1a5;
  border-radius: var(--radius-control);
  background: #fafafa;
  color: #544a4f;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.image-picker-button span {
  margin-bottom: 3px;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.image-picker-button strong {
  font-size: 13px;
  font-weight: 600;
}

.image-field input[type="file"]:focus-visible + .image-picker-button {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.image-preview {
  display: contents;
}

.image-preview-item {
  position: relative;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: #f4f4f5;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-remove-button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(24, 24, 27, .78);
  color: #fff;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.image-remove-button:focus-visible {
  outline: 2px solid #18181b;
  outline-offset: 2px;
}

.image-picker-status {
  min-height: 0;
  color: var(--brand-strong);
  font-size: 12px;
  line-height: 1.5;
}

.image-picker-status:empty {
  display: none;
}

.errorlist {
  margin: 0;
  padding: 0;
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
  list-style: none;
}

.form-field:has(.errorlist) input,
.form-field:has(.errorlist) textarea {
  border-color: #b42318;
}

.form-alert {
  padding: 12px 14px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-control);
  background: var(--brand-soft);
  color: #4d3e45;
  font-size: 13px;
}

.form-error-summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
}

.form-error-summary p {
  margin: 0;
  line-height: 1.6;
}

.form-error-summary ul {
  margin: 7px 0 0;
  padding-left: 18px;
  color: #b42318;
  line-height: 1.65;
}

.form-error-summary:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.form-toast {
  position: fixed;
  z-index: 20;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 13px 14px;
  border-radius: var(--radius-control);
  background: var(--text);
  box-shadow: 0 12px 32px rgba(33, 28, 31, .2);
  color: #fff;
  font-size: 14px;
  line-height: 1.55;
}

.form-toast p {
  margin: 0;
}

.form-toast button {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: -3px -4px -3px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.form-toast button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.submit-button {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.submit-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.submit-button:disabled {
  background: var(--muted);
  cursor: wait;
}

.form-alternative {
  margin: 18px 0 0 !important;
  text-align: center;
}

.form-alternative a {
  color: var(--brand-strong);
  font-weight: 600;
  text-underline-offset: 3px;
}

.success-card {
  text-align: left;
}

.ticket-no-box strong {
  font-size: 18px;
  letter-spacing: .08em;
}

.ticket-no-box a {
  color: var(--brand-strong);
  font-weight: 600;
  text-underline-offset: 3px;
}

.ticket-result {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-control);
  background: var(--brand-soft);
}

.ticket-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-result-head strong {
  font-size: 16px;
  letter-spacing: .05em;
}

.ticket-result .context-list div {
  border-top-color: var(--brand-border);
}

.ticket-result .notice {
  background: var(--surface);
}

.ticket-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
}

.ticket-status-resolved {
  background: var(--brand);
  color: #fff;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.success-meta {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 600;
}

.error-card {
  border-color: var(--brand-border);
}

.error-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid var(--brand-border);
  border-radius: 50%;
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
}

.error-hint {
  margin-top: 14px !important;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--brand-soft);
  color: #5f4c55 !important;
  font-size: 13px;
  line-height: 1.6 !important;
}

.preview-banner {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 9px 14px;
  background: #78350f;
  color: #fef3c7;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.rating-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card-small);
  text-align: center;
}

.rating-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.rating-thanks {
  margin: 0;
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 600;
}

.rating-form {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.rating-form button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}

.rating-form button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .rating-form button:hover {
    border-color: var(--brand);
    transform: scale(1.08);
  }
}

footer {
  padding: 26px 8px 0;
  color: #71717a;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.store-footer p {
  margin: 0 0 4px;
  color: var(--muted);
}

.store-phone {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}

.store-phone svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-card:focus-visible,
.back-link:focus-visible,
.primary-link:focus-visible,
.brand-logo:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .module-card:hover {
    border-color: var(--brand-border);
    background: var(--card-hover-bg);
  }

  .back-link:hover {
    color: var(--brand-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .primary-link:hover {
    background: var(--brand-strong);
  }

  .message-type-option:hover span {
    border-color: var(--brand-border);
    background: var(--card-hover-bg);
    color: var(--brand-strong);
  }

  .message-type-option:hover input:checked + span {
    border-color: var(--brand-strong);
    background: var(--brand-strong);
    color: #fff;
  }

  .image-picker-button:hover {
    border-color: #756b70;
    background: #f4f4f4;
    color: var(--text);
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 24px, 520px);
    padding-top: 28px;
  }

  .hero {
    margin-bottom: 20px;
  }

  .module-card {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    gap: 12px;
    padding: 14px;
  }

  .module-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .empty-state,
  .detail-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
