:root {
  color-scheme: light;
  --page-bg: #f2f5f9;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #637083;
  --line: #e9edf3;
  --red: #f7191d;
  --blue: #1728f4;
  --green: #209b5c;
  --orange: #d76527;
  --black: #070a0d;
  --shadow: 0 18px 50px rgba(15, 28, 44, 0.13);
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
  padding: 0 10px;
  background:
    radial-gradient(circle at 50% -80px, rgba(47, 111, 237, 0.16), transparent 240px),
    var(--page-bg);
}

.phone-page {
  width: min(100%, 410px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.1);
}

.home-page {
  padding: 12px 18px 36px;
}

.home-header {
  padding: 8px 4px 20px;
  text-align: center;
}

.home-header::before {
  content: "每日福利入口";
  display: none;
  place-items: center;
  min-height: 24px;
  margin: 0 auto 8px;
  padding: 0 12px;
  border-radius: 999px;
  color: #1f4fd7;
  background: #eef4ff;
  border: 1px solid #d9e6ff;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.home-header h1 {
  display: block;
  position: relative;
  margin: 0 auto;
  max-width: 360px;
  font-size: clamp(22px, 5.2vw, 25px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
  color: #10213f;
  text-shadow: 0 1px 0 #fff, 0 7px 18px rgba(31, 79, 215, 0.18);
}

.home-header h1::after {
  content: "";
  display: block;
  width: 116px;
  height: 5px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0 8%, #ff2f36 8% 36%, #ffb020 36% 64%, #209b5c 64% 92%, transparent 92% 100%);
  box-shadow: 0 4px 12px rgba(255, 47, 54, 0.15);
}

.home-header p {
  margin: 8px auto 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(var(--module-columns, 3), minmax(0, 1fr));
  gap: 22px 14px;
  padding: 6px 2px 24px;
}

.module-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #334155;
  font-size: 15px;
  line-height: 1.18;
  text-align: center;
  font-weight: 650;
}

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

.icon-box {
  width: var(--icon-size, 62px);
  height: var(--icon-size, 62px);
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f6f8fb);
  box-shadow: 0 7px 16px rgba(25, 39, 66, 0.08), inset 0 0 0 1px #edf1f6;
  border: 0 solid transparent;
}

.icon-box img {
  width: var(--icon-image-size, 47px);
  height: var(--icon-image-size, 47px);
  object-fit: contain;
}

.module-card.is-featured .icon-box {
  width: calc(var(--icon-size, 62px) + 6px);
  height: calc(var(--icon-size, 62px) + 6px);
  border: 6px solid #ff3838;
}

.module-title {
  min-height: 33px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-wrap: anywhere;
}

.footer-actions {
  display: grid;
  gap: 13px;
  padding: 10px 3px 0;
}

.big-action,
.coupon-button {
  width: 100%;
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(23, 32, 51, 0.13), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.big-action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 46%);
  pointer-events: none;
}

.big-action::after {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-54%);
  color: rgba(255, 255, 255, 0.82);
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
}

.big-action.red,
.coupon-button.red {
  background: linear-gradient(180deg, #ff3438, var(--red));
  box-shadow: 0 12px 22px rgba(247, 25, 29, 0.24), inset 0 -2px 0 rgba(145, 0, 5, 0.18);
}

.big-action.blue,
.coupon-button.blue {
  background: linear-gradient(180deg, #3152ff, var(--blue));
}

.big-action.green,
.coupon-button.green {
  background: linear-gradient(180deg, #25ad69, var(--green));
  box-shadow: 0 12px 22px rgba(32, 155, 92, 0.24), inset 0 -2px 0 rgba(0, 96, 48, 0.18);
}

.big-action.orange,
.coupon-button.orange {
  background: var(--orange);
}

.big-action.black,
.coupon-button.black {
  background: var(--black);
}

.big-action.yellow,
.coupon-button.yellow {
  background: linear-gradient(180deg, #ffc84d, #d99a00);
  color: #3a2600;
}

.big-action.purple,
.coupon-button.purple {
  background: linear-gradient(180deg, #8a5cff, #6030d9);
}

.big-action.pink,
.coupon-button.pink {
  background: linear-gradient(180deg, #ff5aa5, #d92f7f);
}

.big-action.cyan,
.coupon-button.cyan {
  background: linear-gradient(180deg, #22c7ff, #008bd9);
}

.big-action.teal,
.coupon-button.teal {
  background: linear-gradient(180deg, #20c997, #087f5b);
}

.big-action.brown,
.coupon-button.brown {
  background: linear-gradient(180deg, #b0713d, #79451d);
}

.big-action.gray,
.coupon-button.gray {
  background: linear-gradient(180deg, #718096, #2d3748);
}

.inner-page {
  padding: 48px 18px 34px;
}

.home-fab {
  position: absolute;
  top: 12px;
  left: 17px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: #162033;
  background: #fff;
  box-shadow: 0 3px 12px rgba(20, 36, 55, 0.08);
  font-size: 20px;
  z-index: 3;
}

.page-header {
  text-align: center;
  margin: 0 0 8px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(20px, 5.6vw, 26px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: 0;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.content-flow {
  display: grid;
  gap: 12px;
}

.notice-block,
.rich-block {
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.notice-block {
  background: #fff9db;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  padding: 10px 12px;
}

.rich-block p {
  margin: 0 0 9px;
}

.notice-block p,
.rich-block p:last-child {
  margin-bottom: 0;
}

.notice-block p {
  margin-top: 0;
}

.rich-block strong,
.rich-block b,
.notice-block strong,
.notice-block b {
  font-weight: 900;
}

.rich-block .red,
.notice-block .red {
  color: var(--red);
}

.rich-block .green,
.notice-block .green {
  color: var(--green);
}

.rich-block .blue,
.notice-block .blue {
  color: var(--blue);
}

.image-block {
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.image-block img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  border-radius: 8px;
}

.image-block figcaption {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.image-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.image-with-side-text .image-main {
  width: min(54%, 210px);
  flex: 0 1 auto;
}

.image-with-side-text.has-left-text.has-right-text .image-main {
  width: min(40%, 170px);
}

.image-main {
  display: block;
  min-width: 0;
  max-width: 100%;
  justify-self: center;
}

.image-block > .image-main {
  margin: 0 auto;
}

.image-row .image-main {
  margin: 0;
}

.image-side-text {
  display: grid;
  gap: 6px;
  align-content: center;
  justify-items: center;
  flex: 1 1 0;
  min-width: 0;
  color: #0f49d8;
  font-size: clamp(22px, 7vw, 34px);
  line-height: 1.18;
  font-weight: 950;
  text-align: center;
  overflow-wrap: anywhere;
}

.image-side-text span {
  width: 100%;
  text-align: center;
}

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

.coupon-button {
  min-height: 53px;
  font-size: 21px;
}

.link-list {
  display: grid;
  gap: 9px;
}

.link-list a {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.link-list span {
  font-size: 16px;
  font-weight: 900;
}

.link-list strong {
  color: #48627d;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.loading-panel,
.error-page,
.empty-state {
  width: min(100%, 410px);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.empty-state h1,
.error-page h1 {
  margin: 0;
  font-size: 26px;
}

.empty-state p,
.error-page p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 720px) {
  .app-shell {
    background:
      radial-gradient(circle at 50% -120px, rgba(47, 111, 237, 0.16), transparent 280px),
      #f2f5f9;
    padding: 30px 0;
  }

  .phone-page {
    min-height: 720px;
    border-radius: 0;
    box-shadow: 0 18px 44px rgba(23, 32, 51, 0.12);
    border: 0;
  }

  .home-mode .phone-page {
    border-radius: 0;
    border-width: 0;
  }

  .inner-page {
    padding-top: 92px;
  }

  .home-fab {
    top: 78px;
    left: 22px;
  }
}

@media (max-width: 360px) {
  .home-page {
    padding-inline: 12px;
  }

  .module-grid {
    gap: 12px 4px;
  }

  .module-card {
    font-size: 13px;
  }

  .big-action,
  .coupon-button {
    font-size: 19px;
  }
}
