:root {
  color-scheme: dark;
  --bg-0: #060816;
  --bg-1: #0b1020;
  --bg-2: #121a36;
  --card: rgba(13, 19, 38, 0.8);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.72);
  --accent: #7cf0c1;
  --accent-2: #67a6ff;
  --daily: #eef2ff;
  --super-0: #ffe08a;
  --super-1: #ff8b3d;
  --import-0: #ffb347;
  --import-1: #ff5f45;
  --copy-0: #7cf0c1;
  --copy-1: #20d68a;
  --meituan: #ffd100;
  --douyin-cyan: #25f4ee;
  --douyin-red: #fe2c55;
  --danger: #ff6f91;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --space: 14px;
  --card-radius: 22px;
  --button-radius: 999px;
  --top-stack-height: 216px;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  touch-action: manipulation;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(103, 166, 255, 0.28), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(124, 240, 193, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 42%, var(--bg-2));
  color: var(--text);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.shell {
  min-height: 100vh;
  padding: calc(max(12px, env(safe-area-inset-top)) + var(--top-stack-height) + var(--space)) var(--space) 118px;
}

.app {
  width: min(100%, 760px);
  margin: 0 auto;
  display: grid;
  gap: var(--space);
}

.quick-actions {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  width: min(calc(100vw - var(--space) - var(--space)), 760px);
  transform: translateX(-50%);
  z-index: 20;
  display: grid;
  gap: var(--space);
  pointer-events: none;
}

.action-module {
  pointer-events: auto;
}

.action-module--refresh {
  display: flex;
  justify-content: flex-end;
}

.quick-actions > .btn {
  pointer-events: auto;
}

.mode-switch {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space);
  padding: var(--space);
  border-radius: var(--button-radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.mode-switch__button {
  appearance: none;
  border: 0;
  min-height: 44px;
  border-radius: var(--button-radius);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(245, 247, 255, 0.66);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition:
    color 0.16s ease,
    background 0.16s ease;
}

.mode-switch__button[data-mode="daily"].mode-switch__button--active {
  background: #6b7280;
  color: #ffffff;
}

.mode-switch__button[data-mode="super"].mode-switch__button--active {
  background: linear-gradient(135deg, #25f4ee 0%, #7c5cff 34%, #fe2c55 68%, #ffe45c 100%);
  color: #ffffff;
}

.bottom-actions {
  position: fixed;
  left: var(--space);
  right: var(--space);
  bottom: max(var(--space), env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space);
  width: auto;
  max-width: 760px;
  padding: 0;
  margin: 0 auto;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 40;
  max-width: min(calc(100vw - 48px), 320px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(10, 16, 32, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% - 8px));
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.wechat-guide {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--space);
  background: rgba(3, 6, 18, 0.72);
  backdrop-filter: blur(10px);
}

.wechat-guide[hidden] {
  display: none;
}

.wechat-guide__card {
  width: min(100%, 360px);
  padding: calc(var(--space) * 1.2);
  border-radius: var(--card-radius);
  background: rgba(13, 19, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.wechat-guide__title {
  margin: 0 0 var(--space);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.wechat-guide__text {
  margin: 0 0 var(--space);
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}

.fallback-banner {
  margin-top: var(--space);
  padding: var(--space);
  border-radius: var(--card-radius);
  background: rgba(255, 111, 145, 0.12);
  border: 1px solid rgba(255, 111, 145, 0.25);
  color: #ffdbe4;
  font-size: 13px;
  line-height: 1.6;
}

.panel {
  padding: var(--space);
  border-radius: var(--card-radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel--copy {
  animation: rise 520ms ease both;
  animation-delay: 80ms;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  margin-bottom: var(--space);
}

.panel__title {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space);
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 700;
  color: rgba(245, 247, 255, 0.92);
  line-height: 1.35;
}

.panel__hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.panel--copy .panel__title {
  color: rgba(245, 247, 255, 0.92);
  letter-spacing: 0.04em;
}

.copy-card {
  padding: 0;
}

.copy-card__text {
  margin: 0 0 var(--space);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.68;
  color: rgba(245, 247, 255, 0.88);
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space);
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--button-radius);
  min-height: 52px;
  padding: 0 var(--space);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  background: linear-gradient(135deg, var(--copy-0), var(--copy-1));
  color: #0a1020;
}

.btn--import {
  background: linear-gradient(135deg, var(--import-0), var(--import-1));
  color: #fff8ef;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn--launch {
  min-height: 56px;
}

.btn--wide {
  min-height: 58px;
}

.btn--full {
  width: 100%;
}

.btn--icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border-radius: var(--button-radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn--icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--meituan {
  background: var(--meituan);
  color: #221600;
}

.btn--douyin {
  background: #050507;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space);
}

.image-card {
  overflow: hidden;
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.image-card--selected {
  border-color: rgba(124, 240, 193, 0.72);
  box-shadow: 0 16px 44px rgba(124, 240, 193, 0.14);
}

.image-card__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.image-card__img {
  width: 100%;
  aspect-ratio: 0.9 / 1.2;
  display: block;
  object-fit: cover;
}

.note {
  margin: var(--space) 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.empty-state {
  margin: 0;
  padding: var(--space);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 620px) {
  .shell {
    padding: calc(max(8px, env(safe-area-inset-top)) + var(--top-stack-height) + var(--space)) var(--space) 118px;
  }

  .quick-actions {
    top: max(8px, env(safe-area-inset-top));
    width: calc(100vw - var(--space) - var(--space));
  }

  .bottom-actions {
    left: var(--space);
    right: var(--space);
  }

  .hero,
  .panel {
    border-radius: var(--card-radius);
  }

  .panel__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .launch-grid {
    grid-template-columns: 1fr;
  }

  .image-card__img {
    aspect-ratio: 0.92 / 1.12;
  }
}
