:root {
  --ink: #172033;
  --muted: #667085;
  --soft: #f6f8fc;
  --panel: rgb(255 255 255 / 84%);
  --line: #e6ebf3;
  --blue: #4078ff;
  --blue-dark: #2451c6;
  --mint: #18a999;
  --lavender: #8b7cf6;
  --rose: #ff6b9a;
  --shadow: 0 24px 70px rgb(24 39 75 / 10%);
  --shadow-tight: 0 14px 34px rgb(24 39 75 / 10%);
  --radius-large: 34px;
  --radius-medium: 24px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  background:
    radial-gradient(circle at 16% 10%, rgb(64 120 255 / 16%), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgb(24 169 153 / 14%), transparent 24rem),
    radial-gradient(circle at 62% 82%, rgb(139 124 246 / 13%), transparent 26rem),
    linear-gradient(135deg, #fbfcff 0%, #f5f8ff 48%, #ffffff 100%);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgb(64 120 255 / 5%) 1px, transparent 1px),
    linear-gradient(rgb(64 120 255 / 5%) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.app-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero {
  position: relative;
  min-height: 330px;
  padding: 44px;
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 46px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 92%), rgb(255 255 255 / 68%)),
    radial-gradient(circle at 84% 22%, rgb(64 120 255 / 14%), transparent 18rem);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(22px);
  animation: rise 720ms var(--ease) both;
}

.hero::before,
.hero::after {
  position: absolute;
  border-radius: 999px;
  content: "";
}

.hero::before {
  right: -82px;
  top: -92px;
  width: 280px;
  height: 280px;
  border: 38px solid rgb(64 120 255 / 8%);
}

.hero::after {
  right: 86px;
  bottom: 34px;
  width: 86px;
  height: 86px;
  background: linear-gradient(135deg, rgb(24 169 153 / 18%), rgb(139 124 246 / 18%));
  filter: blur(1px);
}

.hero-kicker {
  position: absolute;
  top: 26px;
  right: 34px;
  color: rgb(64 120 255 / 22%);
  font-size: clamp(2.8rem, 8vw, 7.5rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.85;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 34px;
  align-items: end;
  z-index: 1;
}

.eyebrow,
.card-heading,
.status-title {
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 12px;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.07em;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7vw, 6.9rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.9;
}

.points-card {
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(145deg, #ffffff, #f6f9ff);
  box-shadow: var(--shadow-tight);
}

.points-card p,
.points-card span {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.points-card strong {
  display: block;
  margin: 18px 0 10px;
  color: var(--blue);
  font-size: clamp(4.8rem, 10vw, 7.4rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.08em;
}

.dashboard,
.records-grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.dashboard {
  grid-template-columns: 1.45fr 0.9fr;
}

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

.panel,
.shop-section {
  border: 1px solid rgb(230 235 243 / 88%);
  border-radius: var(--radius-large);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.panel {
  padding: 30px;
  animation: rise 720ms 90ms var(--ease) both;
}

.shop-section {
  margin-top: 24px;
  padding: 32px;
  animation: rise 720ms 180ms var(--ease) both;
}

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

.card-heading {
  margin-bottom: 22px;
}

.checkin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.full-width,
.primary-action {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input,
select {
  height: 54px;
  padding: 0 16px;
}

textarea {
  min-height: 96px;
  padding: 16px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgb(64 120 255 / 12%);
  transform: translateY(-1px);
}

.primary-action,
.ghost-button,
.reward-action button {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
}

.primary-action {
  min-height: 62px;
  margin-top: 4px;
  color: #ffffff;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 18px 34px rgb(64 120 255 / 22%);
}

.primary-action:hover,
.ghost-button:hover,
.reward-action button:not(:disabled):hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgb(24 39 75 / 14%);
}

.status-panel {
  position: relative;
  overflow: hidden;
}

.status-panel::before {
  position: absolute;
  top: -76px;
  right: -62px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgb(24 169 153 / 12%);
  content: "";
}

.status-title {
  position: relative;
  margin: 0 0 28px;
}

.streak-number {
  position: relative;
  display: flex;
  align-items: end;
  gap: 8px;
}

.streak-number span {
  color: var(--mint);
  font-size: clamp(5rem, 11vw, 8rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.08em;
}

.streak-number small {
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 900;
}

.progress-track {
  height: 14px;
  margin: 34px 0 18px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--blue));
  transition: width 420ms var(--ease);
}

.status-message {
  min-height: 54px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.score-rules {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.score-rules div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--soft);
}

.score-rules dt,
.score-rules dd {
  margin: 0;
  font-weight: 900;
}

.score-rules dt {
  color: var(--muted);
}

.score-rules dd {
  color: var(--blue-dark);
}

.ghost-button {
  min-height: 46px;
  padding: 0 18px;
  color: var(--ink);
  background: #eef3ff;
}

.reward-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.reward-item {
  display: grid;
  gap: 22px;
  min-height: 218px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background:
    radial-gradient(circle at 90% 0%, rgb(64 120 255 / 10%), transparent 9rem),
    #ffffff;
  box-shadow: 0 14px 36px rgb(24 39 75 / 7%);
}

.reward-item strong {
  display: block;
  font-size: 1.24rem;
  line-height: 1.35;
}

.reward-item p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.reward-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  align-self: end;
}

.reward-action span {
  color: var(--blue-dark);
  font-size: 1.3rem;
  font-weight: 900;
}

.reward-action button {
  min-height: 42px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--ink);
}

.reward-action button:disabled {
  color: var(--muted);
  background: #edf1f7;
  opacity: 0.78;
}

.history,
.redemption {
  margin-top: 0;
}

.history-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
}

.history-item time {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.history-item strong {
  display: block;
  margin-top: 4px;
  font-size: 1.08rem;
}

.history-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.history-item span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--mint), var(--blue));
}

.redemption .history-item span {
  background: linear-gradient(135deg, var(--lavender), var(--rose));
}

.empty-state {
  padding: 34px;
  border: 1px dashed #cfd8e8;
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
}

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

@media (max-width: 960px) {
  .hero-grid,
  .dashboard,
  .records-grid,
  .reward-list {
    grid-template-columns: 1fr;
  }

  .points-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 22px, 680px);
    padding-top: 18px;
  }

  .hero,
  .panel,
  .shop-section {
    padding: 24px;
    border-radius: 28px;
  }

  .hero-kicker {
    display: none;
  }

  .checkin-form,
  .history-item {
    grid-template-columns: 1fr;
  }

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

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