:root {
  color-scheme: light;
  --red: #ff2d55;
  --red-dark: #d91a40;
  --red-light: #ff6b8a;
  --gold: #ffcf55;
  --gold-dark: #ffab18;
  --gold-light: #ffe78a;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #ffe4e9;
  --cream: #fff0f3;
  --paper: #ffffff;
  --mint: #dbf7ee;
  --blue: #e8f1ff;
  --green: #d4f7e9;
  --green-dark: #1a5e4a;
  --shadow-soft: 0 12px 32px rgba(217, 26, 64, 0.12);
  --shadow-card: 0 16px 40px rgba(217, 26, 64, 0.16);
  --shadow-button: 0 10px 24px rgba(217, 26, 64, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #ff2d55;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 231, 138, 0.55), transparent 28rem),
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.35), transparent 22rem),
    linear-gradient(180deg, #ff2d55 0%, #ff5478 30%, #ff8da8 65%, #ffd1dc 100%);
  background-attachment: fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 14px 80px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 80px;
  align-items: center;
  min-height: 110px;
  padding: 14px 14px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 231, 138, 0.28), transparent 42%),
    linear-gradient(145deg, #ff5478 0%, #ff2d55 48%, #d91a40 100%);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(255, 207, 85, 0.2) 0%, transparent 30%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -55px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 18px solid rgba(255, 255, 255, 0.1);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-bottom: 6px;
  padding: 2px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(138, 12, 36, 0.22);
}

.badge-left,
.badge-right {
  display: grid;
  place-items: center;
  min-height: 20px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.badge-left {
  color: #fff;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border-radius: 999px;
}

.badge-divider {
  width: 1px;
  height: 12px;
  margin: 0 2px;
  background: #ffd4dc;
}

.badge-right {
  color: var(--red);
  background: transparent;
  border-radius: 999px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 22px;
  line-height: 1.08;
  text-shadow: 0 2px 8px rgba(138, 12, 36, 0.22);
}

h2 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.25;
}

.subline {
  max-width: 260px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  line-height: 1.35;
}

.subline strong {
  color: var(--gold-light);
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(138, 12, 36, 0.3);
}

.hero-group-link {
  display: inline-grid;
  place-items: center;
  min-width: 76px;
  min-height: 26px;
  margin-top: 6px;
  padding: 0 12px;
  color: #8a2b00;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff0a3, #ffcc33);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(138, 12, 36, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-group-link:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(138, 12, 36, 0.22);
}

.bag-visual {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 80px;
  filter: drop-shadow(0 12px 18px rgba(117, 10, 30, 0.3));
}

.bag-knot {
  position: absolute;
  left: 16px;
  top: 0;
  width: 40px;
  height: 24px;
  background: linear-gradient(180deg, #fff0a3, #ffcc33);
  border: 3px solid rgba(138, 60, 0, 0.12);
  border-radius: 50% 50% 36% 36%;
  transform: rotate(-4deg);
}

.bag-body {
  position: absolute;
  left: 3px;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  color: #c21800;
  font-size: 28px;
  font-weight: 900;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.22) 32%, transparent 52%),
    linear-gradient(180deg, #ffe566 0%, #ffcc33 55%, #ffb800 100%);
  border: 4px solid rgba(138, 60, 0, 0.12);
  border-radius: 28% 28% 34% 34%;
  box-shadow: inset 0 -10px 0 rgba(204, 108, 0, 0.12);
}

.coin {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff0a3, #ffcc33);
  border: 2px solid #ffb800;
  box-shadow: 0 4px 12px rgba(74, 31, 0, 0.2);
}

.coin-a {
  right: 2px;
  top: 18px;
}

.coin-b {
  left: 0;
  top: 28px;
}

.submit-panel,
.list-section {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin-bottom: 8px;
}

.heading-actions {
  display: flex;
  gap: 8px;
}

.tag {
  min-width: 72px;
  padding: 5px 8px;
  color: #17604d;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  background: var(--mint);
  border-radius: 999px;
}

.submit-form {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.label-tip {
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input,
select {
  height: 38px;
  padding: 0 12px;
}

textarea {
  min-height: 90px;
  padding: 14px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #bbb;
}

.collector-form {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
  margin-top: 16px;
}

.collector-text {
  grid-column: 1 / -1;
}

.collector-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.collector-actions button {
  min-height: 48px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border-radius: 999px;
  box-shadow: var(--shadow-button);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.collector-actions button:first-child {
  color: #7a2500;
  background: linear-gradient(135deg, #ffe78a, #ffbd2e);
  box-shadow: 0 10px 24px rgba(255, 178, 44, 0.32);
}

.collector-actions button:active {
  transform: translateY(1px);
}

.collector-status {
  min-height: 16px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #ff8e48;
  box-shadow: 0 0 0 4px rgba(255, 142, 72, 0.15);
}

.submit-form button,
.report-box > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border-radius: 999px;
  box-shadow: var(--shadow-button);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.submit-form button:active,
.report-box > button:active {
  transform: translateY(1px);
  box-shadow: 0 6px 16px rgba(217, 26, 64, 0.22);
}

.submit-form .smart-help-button {
  color: #7a2500;
  background: linear-gradient(135deg, #ffe78a, #ffbd2e);
  box-shadow: 0 10px 24px rgba(255, 178, 44, 0.32);
}

.submit-form .image-upload-button {
  color: var(--green-dark);
  background: linear-gradient(135deg, #d4f7e9, #7ce8c3);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(86, 201, 154, 0.28);
}

/* 提示按钮 */
.button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 15px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
}

.hint-icon:hover {
  background: rgba(255,255,255,0.7);
}

.hint-icon:active {
  background: rgba(255,255,255,0.9);
}

.smart-help-button .hint-icon {
  color: #7a2500;
  background: rgba(255,255,255,0.35);
}

.image-upload-button .hint-icon {
  color: var(--green-dark);
  background: rgba(255,255,255,0.35);
}

/* 提示弹窗 */
.hint-dialog {
  width: min(calc(100vw - 28px), 430px);
  padding: 0;
  border: 0;
  background: transparent;
}

.hint-dialog::backdrop {
  background: rgba(39, 17, 13, 0.45);
}

.hint-body {
  display: grid;
  gap: 10px;
}

.hint-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #fff8f9, #fff0f3);
  border: 1px solid #ffe4e9;
  border-radius: 14px;
}

.hint-feature-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.hint-feature-text strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 3px;
}

.hint-feature-text span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.form-message {
  min-height: 14px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.form-message.is-error {
  color: var(--red-dark);
  font-weight: 700;
}

.jump-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(320px, calc(100vw - 32px));
  min-height: 46px;
  padding: 10px 16px 11px;
  overflow: hidden;
  color: #3b3f47;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(219, 225, 235, 0.95);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(42, 48, 60, 0.16);
  transform: translateX(-50%);
}

.jump-toast[hidden] {
  display: none;
}

.jump-toast.is-showing {
  animation: toast-pop 180ms ease-out;
}

.jump-toast::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: #5b9dff;
  transform-origin: left center;
}

.jump-toast.is-showing::after {
  animation: toast-progress 2400ms linear forwards;
}

.jump-toast.is-error::after {
  background: #ff4d6d;
}

.jump-toast-icon {
  display: inline-grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #70c95f;
  font-size: 18px;
  font-weight: 900;
  border: 4px solid rgba(112, 201, 95, 0.22);
  border-radius: 999px;
}

.jump-toast.is-error .jump-toast-icon {
  color: #ff4d6d;
  border-color: rgba(255, 77, 109, 0.2);
}

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

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* ===== 优惠券横条 ===== */

.coupon-strip {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
}

.coupon-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.coupon-header-left {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.coupon-close {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: #bbb;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.coupon-close:hover {
  color: #888;
  background: #f5f5f5;
}

.coupon-close:active {
  color: #666;
  background: #eee;
}

.coupon-title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.coupon-sub {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.coupon-scroll {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.coupon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  background: linear-gradient(180deg, #fff8f9 0%, #fff 100%);
  border: 1px solid #ffe4e9;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.coupon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(217, 26, 64, 0.12);
  border-color: #ffccd5;
}

.coupon-card:active {
  transform: scale(0.97);
}

.coupon-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  display: grid;
  place-items: center;
}

.coupon-icon-text {
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.coupon-name {
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.coupon-amount {
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.coupon-btn {
  min-width: 36px;
  min-height: 18px;
  padding: 0 6px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.coupon-btn:hover {
  opacity: 0.9;
}

.coupon-btn:active {
  transform: scale(0.96);
}

/* 手机端改用横向滚动 */
@media (max-width: 480px) {
  .coupon-strip {
    padding: 6px 8px;
  }

  .coupon-header {
    margin-bottom: 4px;
  }

  .coupon-title {
    font-size: 10px;
  }

  .coupon-sub {
    font-size: 8px;
  }

  .coupon-scroll {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;
  }

  .coupon-scroll::-webkit-scrollbar {
    display: none;
  }

  .coupon-card {
    flex: 0 0 auto;
    min-width: 62px;
    padding: 5px 4px;
    gap: 1px;
    border-radius: 8px;
  }

  .coupon-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #ffe4e9;
  }

  .coupon-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
  }

  .coupon-icon-text {
    font-size: 8px;
  }

  .coupon-name {
    font-size: 8px;
  }

  .coupon-amount {
    font-size: 8px;
  }

  .coupon-btn {
    min-width: 32px;
    min-height: 16px;
    padding: 0 5px;
    font-size: 8px;
  }
}

.section-heading .eyebrow {
  color: var(--red);
  opacity: 1;
}

.ghost-button {
  display: grid;
  place-items: center;
  min-width: 78px;
  height: 36px;
  padding: 0 12px;
  color: var(--red-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  background: #fff0f3;
  border: 1px solid #ffd4dc;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.ghost-button:active {
  transform: translateY(1px);
}

.countdown-timer {
  min-height: 16px;
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.countdown-num {
  display: inline-block;
  min-width: 16px;
  padding: 0 4px;
  color: #fff;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border-radius: 999px;
}

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

.aid-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(51, 35, 30, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.aid-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--red);
  border-radius: 16px 0 0 16px;
}

.aid-card:active {
  transform: translateY(1px);
}

.aid-card.is-hidden {
  opacity: 0.56;
}

.aid-card.is-hidden::before {
  background: #8a8f98;
}

.aid-card.is-helped::before {
  background: #ffb22c;
}

.aid-card.is-helped {
  background: #fff8f3;
}

.aid-card.is-helped .aid-main {
  opacity: 0.48;
}

.aid-card.is-expired {
  background: #f7f8fa;
}

.aid-card.is-expired::before {
  background: #a1a8b3;
}

.aid-card.is-expired .aid-main {
  opacity: 0.56;
}

.aid-card.is-reserved {
  background: #fffaf0;
}

.aid-card.is-reserved::before {
  background: #ffb22c;
}

.aid-card.is-reserved:not(:focus-within) .aid-main {
  opacity: 0.76;
}

.aid-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.aid-title strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-text {
  color: #171212;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 17px;
  letter-spacing: 0.5px;
}

.status {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: #8a3500;
  font-size: 10px;
  font-weight: 900;
  background: #fff0c8;
  border-radius: 999px;
}

.status.clean {
  color: #12664f;
  background: var(--mint);
}

.status.warn {
  color: #8a3500;
  background: #fff0c8;
}

.status.blocked {
  color: #5a626d;
  background: #eef0f2;
}

.status.helped {
  color: #7b4100;
  background: #ffe1a8;
}

.status.expired {
  color: #5a626d;
  background: #eef0f2;
}

.status.reserved {
  color: #7a4a00;
  background: #ffebaf;
}

.aid-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.card-action {
  width: 52px;
  height: 38px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(230, 36, 36, 0.18);
  transition: transform 0.15s ease;
}

.card-action.is-report {
  color: var(--red-dark);
  background: #fff0f3;
  border: 1px solid #ffd4dc;
  box-shadow: none;
}

.card-action[hidden] {
  display: none;
}

.card-action:disabled {
  color: #8a8f98;
  cursor: default;
  background: #eef0f2;
  box-shadow: none;
}

.card-action:active:not(:disabled) {
  transform: translateY(1px);
}

.report-dialog {
  width: min(calc(100vw - 28px), 430px);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.report-dialog::backdrop {
  background: rgba(39, 17, 13, 0.45);
}

.report-box {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(42, 19, 13, 0.28);
}

.report-target {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.help-code-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff8f1;
  border: 1px solid #ffe2c5;
  border-radius: 8px;
}

.help-code-row span {
  color: var(--muted);
  font-size: 12px;
}

.help-code-row strong {
  min-width: 0;
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  text-align: center;
  text-overflow: ellipsis;
}

.help-recovery-actions,
.help-result-actions {
  display: grid;
  gap: 8px;
}

.help-recovery-actions {
  grid-template-columns: 1fr 1fr;
}

.help-result-actions {
  grid-template-columns: 1fr 1fr;
}

#confirmHelpSuccess {
  grid-column: 1 / -1;
}

.help-result-dialog button:not(.icon-button) {
  min-height: 40px;
  padding: 0 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--red);
  border-radius: 8px;
}

.help-result-dialog button.secondary-button {
  color: #7a3600;
  background: #fff1d7;
  border: 1px solid #ffd998;
}

.help-result-dialog button.danger-button {
  color: #b11838;
  background: #fff0f3;
  border: 1px solid #ffd0da;
}

.help-result-dialog button:disabled {
  color: #8a8f98;
  background: #eef0f2;
  border-color: #e1e3e6;
  cursor: default;
}

.icon-button {
  width: 36px;
  height: 36px;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  background: #fff0f3;
  border-radius: 12px;
}

@media (max-width: 390px) {
  .app-shell {
    padding-inline: 8px;
  }

  .hero {
    grid-template-columns: 1fr 68px;
    min-height: 100px;
    padding: 10px 12px;
    border-radius: 14px;
  }

  h1 {
    font-size: 20px;
  }

  .subline {
    max-width: 180px;
    font-size: 11px;
  }

  .bag-visual {
    width: 60px;
    height: 68px;
  }

  .bag-knot {
    left: 12px;
    width: 36px;
    height: 20px;
  }

  .bag-body {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .submit-panel,
  .list-section {
    border-radius: 14px;
    padding: 10px 10px;
  }
}

body.admin-page .app-shell {
  width: min(100%, 1180px);
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 164px;
  padding: 26px 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 231, 138, 0.28), transparent 42%),
    linear-gradient(145deg, #ff5478 0%, #ff2d55 48%, #d91a40 100%);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.admin-hero h1 {
  margin-bottom: 10px;
  font-size: 32px;
  text-shadow: 0 2px 8px rgba(138, 12, 36, 0.22);
}

.admin-front-link {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 40px;
  padding: 0 16px;
  color: #a31c00;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffe78a, #ffbd2e);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(138, 12, 36, 0.25);
}

.admin-warning {
  margin-top: 16px;
  padding: 14px 16px;
  color: #7b4100;
  font-size: 13px;
  line-height: 1.55;
  background: #fff2ce;
  border: 1px solid #ffd783;
  border-radius: 18px;
}

.admin-login-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.admin-login-panel[hidden],
.admin-content[hidden] {
  display: none;
}

.admin-login-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.admin-login-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 38px;
  padding: 0 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border-radius: 999px;
  box-shadow: var(--shadow-button);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat-card {
  display: grid;
  gap: 7px;
  padding: 16px;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat-card strong {
  font-size: 26px;
  color: var(--red);
}

.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-list-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px;
  gap: 12px;
  margin-top: 12px;
  align-items: end;
}

.admin-list-tools input,
.admin-list-tools select {
  height: 36px;
  border-radius: 10px;
}

.admin-list {
  display: block;
  margin-top: 12px;
}

.admin-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.admin-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #f2dce2;
}

.admin-table th {
  color: #7a3b48;
  font-size: 11px;
  font-weight: 900;
  background: #fff7f9;
  white-space: nowrap;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table-row.is-blocked {
  background: #f7f8fa;
}

.cell-code,
.cell-ip {
  color: #171212;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 900;
  white-space: nowrap;
}

.cell-muted,
.cell-source {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-time,
.cell-small {
  white-space: nowrap;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 230px;
}

.table-actions button {
  min-height: 26px;
  padding: 0 8px;
  color: var(--red-dark);
  font-size: 11px;
  font-weight: 900;
  background: #fff0f3;
  border: 1px solid #ffd4dc;
  border-radius: 7px;
}

.table-actions button[data-action^="block-ip"] {
  color: #7b4100;
  background: #fff2ce;
  border-color: #ffd783;
}

.table-actions button[data-action="block-ip-forever"] {
  color: #fff;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border-color: transparent;
}

.table-actions button[data-action="unblock-ip"] {
  color: #17604d;
  background: var(--mint);
  border-color: #b9efd9;
}

.table-actions button[data-action="delete-code"] {
  color: #fff;
  background: #5a626d;
  border-color: transparent;
}

.admin-detail-row td {
  padding: 0;
  background: #fffaf6;
}

.admin-detail-box {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  border-top: 1px solid #ffe0d2;
}

.admin-detail-box p {
  margin: 0;
  word-break: break-all;
}

.report-log {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.source-line {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.block-line {
  margin: 6px 0 0;
  color: #7b4100;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

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

.report-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  background: #fff8f3;
  border: 1px solid #ffe0d2;
  border-radius: 14px;
}

.report-item strong {
  color: var(--red-dark);
  font-size: 12px;
}

.report-item span,
.report-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-empty {
  padding: 20px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.admin-insights {
  margin-top: 16px;
}

.ip-summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ip-summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 8px;
  padding: 11px 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ip-summary-row strong {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.ip-summary-row.is-high {
  border-color: #ffb5c3;
  background: #fff6f8;
}

.ip-summary-row.is-watch {
  border-color: #ffe0a0;
  background: #fffdf6;
}

.ip-summary-state {
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 900;
}

.ip-summary-meta {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.ip-detail-panel {
  margin-top: 12px;
  padding: 14px;
  background: #fff8f3;
  border: 1px solid #ffe0d2;
  border-radius: 8px;
}

.ip-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ip-detail-heading strong {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.ip-detail-heading button {
  min-height: 28px;
  padding: 0 10px;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 800;
  background: #fff0f3;
  border: 1px solid #ffd4dc;
  border-radius: 7px;
}

.ip-detail-body {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ip-detail-body p {
  margin: 0;
}

.ip-related-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ip-related-codes span {
  padding: 4px 7px;
  color: #7a3b48;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  background: #fff;
  border: 1px solid #f3dce3;
  border-radius: 5px;
}

.audit-list {
  display: grid;
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.audit-row {
  display: grid;
  grid-template-columns: 150px 1fr 140px;
  gap: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  background: #fff;
}

.audit-row strong {
  color: #302126;
}

.audit-row time {
  color: #9b7e86;
  text-align: right;
}

@media (max-width: 760px) {
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    display: grid;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .collector-form,
  .collector-actions,
  .admin-login-form,
  .admin-list-tools {
    grid-template-columns: 1fr;
  }

  .admin-table {
    min-width: 960px;
  }

  .audit-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .audit-row time {
    text-align: left;
  }
}

/* ===== 参考图风格增强：步骤引导与邀请码展示 ===== */

.steps {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #fff8f9, #fff0f3);
  border: 1px solid #ffe4e9;
  border-radius: 12px;
}

.step-number {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff5478, var(--red));
  border-radius: 50%;
}

.step-body {
  display: grid;
  gap: 1px;
}

.step-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.step-desc {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.code-showcase {
  display: grid;
  place-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 22px 18px;
  background:
    linear-gradient(135deg, rgba(255, 84, 120, 0.08), rgba(255, 207, 85, 0.08)),
    linear-gradient(180deg, #fff8f9, #fff0f3);
  border: 2px dashed #ffb8c7;
  border-radius: 20px;
}

.code-showcase-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.code-showcase-value {
  color: var(--red);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 4px;
  text-shadow: 0 2px 0 rgba(255, 207, 85, 0.4);
}
