:root {
  --brand: #6f5be7;
  --brand-dark: #5847c8;
  --brand-soft: #ede9ff;
  --pink: #ff8fa3;
  --orange: #ffbe62;
  --green: #70c8b2;
  --ink: #242331;
  --muted: #747283;
  --line: #ececf2;
  --page: #eef0f6;
  --surface: #ffffff;
  --app-bg: #f7f7fa;
  --danger: #c64057;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(111, 91, 231, 0.28);
  outline-offset: 2px;
}

.showcase {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 280px 390px;
  justify-content: center;
  align-items: center;
  gap: 56px;
  padding: 20px;
  background:
    radial-gradient(circle at 22% 18%, rgba(111, 91, 231, 0.1), transparent 28%),
    radial-gradient(circle at 82% 80%, rgba(112, 200, 178, 0.1), transparent 28%),
    var(--page);
}

.showcase-note {
  align-self: center;
}

.showcase-back {
  display: flex;
  width: fit-content;
  margin-bottom: 18px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.showcase-back:hover,
.showcase-back:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.showcase-note__eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(111, 91, 231, 0.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.showcase-note h1 {
  margin: 20px 0 10px;
  font-size: 40px;
  letter-spacing: -0.04em;
}

.showcase-note h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.showcase-note p,
.showcase-note li {
  color: #626071;
  font-size: 14px;
  line-height: 1.75;
}

.showcase-note ol {
  margin: 0;
  padding-left: 20px;
}

.showcase-note code {
  padding: 2px 5px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 5px;
}

.showcase-note__divider {
  width: 44px;
  height: 3px;
  margin: 24px 0;
  background: var(--brand);
  border-radius: 999px;
}

.showcase-note__plan-title {
  margin-top: 24px;
}

.showcase-note .showcase-note__footnote {
  margin-top: 22px;
  font-size: 12px;
  color: #8a8896;
}

.phone-frame {
  width: 390px;
  height: min(844px, calc(100svh - 40px));
  padding: 9px;
  overflow: hidden;
  background: #202024;
  border-radius: 42px;
  box-shadow: 0 30px 80px rgba(30, 30, 45, 0.22), 0 7px 20px rgba(30, 30, 45, 0.12);
}

.mini-program {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--app-bg);
  border-radius: 34px;
}

.mini-header {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: 92px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(236, 236, 242, 0.9);
  backdrop-filter: blur(14px);
}

.status-bar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 0;
  font-size: 11px;
  font-weight: 700;
}

.status-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.signal {
  width: 13px;
  height: 9px;
  background: linear-gradient(to top, var(--ink) 0 100%);
  clip-path: polygon(0 100%, 0 72%, 18% 72%, 18% 52%, 42% 52%, 42% 30%, 66% 30%, 66% 8%, 100% 8%, 100% 100%);
}

.wifi {
  width: 13px;
  height: 9px;
  border-top: 2px solid var(--ink);
  border-radius: 50%;
  transform: translateY(2px);
}

.battery {
  width: 18px;
  height: 9px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  box-shadow: inset -3px 0 0 var(--ink);
}

.nav-bar {
  height: 58px;
  display: grid;
  grid-template-columns: 82px 1fr 82px;
  align-items: center;
  padding: 0 10px;
}

.nav-bar strong {
  justify-self: center;
  font-size: 16px;
}

.project-back {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  justify-self: start;
  color: var(--ink);
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
  text-decoration: none;
}

.project-back:hover,
.project-back:focus-visible {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.wx-capsule {
  position: relative;
  justify-self: end;
  width: 76px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  border: 1px solid #dad9df;
  border-radius: 999px;
}

.wx-capsule::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 17px;
  background: #e1e0e5;
}

.wx-capsule i {
  width: 18px;
  height: 4px;
  margin-right: 6px;
  background: radial-gradient(circle, var(--ink) 1.5px, transparent 1.7px) 0 0 / 6px 4px;
}

.wx-capsule b {
  width: 12px;
  height: 12px;
  margin-left: 6px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.mini-content {
  position: absolute;
  inset: 92px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 18px calc(94px + var(--safe-bottom));
  scroll-behavior: smooth;
}

.mini-content::-webkit-scrollbar {
  width: 0;
}

.intro {
  padding: 4px 2px 18px;
}

.demo-badge {
  display: inline-flex;
  padding: 5px 9px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.intro h2 {
  margin: 12px 0 6px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.search-box {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 14px;
  box-shadow: 0 5px 16px rgba(40, 38, 58, 0.05);
}

.search-box:focus-within {
  border-color: rgba(111, 91, 231, 0.35);
}

.search-box svg {
  width: 20px;
  fill: none;
  stroke: #8f8d99;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #aaa8b2;
}

.search-clear {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  color: #777582;
  background: #efeff3;
  border-radius: 50%;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.category-section,
.copy-section {
  padding-top: 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.section-heading h3 {
  margin: 0;
  font-size: 17px;
}

.category-chips {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 0 18px 4px;
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.category-chip {
  min-width: 64px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: #656372;
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.category-chip:active {
  transform: scale(0.96);
}

.category-chip.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 6px 15px rgba(111, 91, 231, 0.24);
}

.shuffle-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  color: var(--brand-dark);
  background: transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.shuffle-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-list {
  display: grid;
  gap: 12px;
}

.copy-card {
  position: relative;
  padding: 17px;
  background: var(--surface);
  border: 1px solid rgba(236, 236, 242, 0.88);
  border-radius: 18px;
  box-shadow: 0 7px 20px rgba(40, 38, 58, 0.045);
}

.copy-card__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}

.copy-card__category,
.copy-card__tone {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.copy-card__category {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.copy-card__tone {
  color: #777582;
  background: #f1f1f5;
}

.copy-card blockquote {
  margin: 0;
  overflow-wrap: anywhere;
  color: #302e3c;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.copy-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

.favorite-button,
.copy-button {
  min-height: 42px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.favorite-button {
  min-width: 76px;
  padding: 0 10px;
  border: 0;
  color: #7e7c89;
  background: transparent;
}

.favorite-button.is-favorite {
  color: #df6178;
}

.copy-button {
  min-width: 92px;
  padding: 0 16px;
  border: 0;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 13px rgba(111, 91, 231, 0.2);
}

.copy-button:hover {
  background: var(--brand-dark);
}

.copy-button.is-copied {
  color: #266b59;
  background: #dff5ee;
  box-shadow: none;
}

.empty-state {
  padding: 42px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed #dcdbe4;
  border-radius: 18px;
}

.empty-state > span {
  font-size: 34px;
}

.empty-state h3 {
  margin: 12px 0 6px;
  font-size: 16px;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.empty-state button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  color: #fff;
  background: var(--brand);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bottom-tabs {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(72px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 18px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.bottom-tab {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  color: #96949f;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
}

.bottom-tab span {
  font-size: 23px;
  line-height: 1;
}

.bottom-tab b {
  font-size: 11px;
  font-weight: 700;
}

.bottom-tab.is-active {
  color: var(--brand);
}

.toast {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: calc(86px + var(--safe-bottom));
  max-width: calc(100% - 40px);
  padding: 10px 15px;
  color: #fff;
  background: rgba(36, 35, 49, 0.92);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 9px 25px rgba(20, 18, 32, 0.2);
}

.toast.is-error {
  background: rgba(143, 42, 61, 0.94);
}

[hidden] {
  display: none !important;
}

@media (max-width: 880px) {
  .showcase {
    display: block;
    min-height: 100svh;
    padding: 0;
    background: var(--app-bg);
  }

  .showcase-note {
    display: none;
  }

  .phone-frame {
    width: 100%;
    height: 100svh;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .mini-program {
    border-radius: 0;
  }
}

@media (max-height: 720px) and (min-width: 881px) {
  .phone-frame {
    height: calc(100svh - 24px);
  }

  .showcase {
    padding: 12px;
  }
}

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