:root {
  --bg: #fff7f1;
  --bg-soft: #f9eef8;
  --card: rgba(255, 255, 255, 0.86);
  --text: #463a3f;
  --muted: #817178;
  --pink: #e88aa3;
  --rose: #fff0f4;
  --lavender: #eee8ff;
  --mint: #e7f6ef;
  --gold: #f0b85a;
  --shadow: 0 12px 28px rgba(115, 83, 94, 0.13);
  --line: rgba(130, 99, 110, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at 18% 10%, rgba(232, 138, 163, 0.16), transparent 26%),
    radial-gradient(circle at 90% 22%, rgba(149, 194, 172, 0.18), transparent 25%),
    linear-gradient(160deg, #fff7f1 0%, #fff2f6 47%, #f3efff 100%);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 16px 42px;
}

.hero-section {
  display: grid;
  gap: 16px;
  padding-top: 12px;
  text-align: center;
}

.site-title {
  margin: 0;
  padding: 4px 8px;
  color: #4e3c46;
  font-size: clamp(2rem, 9vw, 3.4rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  outline: none;
}

.site-title:focus-visible {
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(232, 138, 163, 0.28);
}

.mascot-wrap {
  display: flex;
  min-height: 130px;
  align-items: center;
  justify-content: center;
}

.mascot-image {
  display: block;
  width: min(56vw, 220px);
  max-height: 210px;
  object-fit: contain;
}

.mascot-image.is-missing {
  display: none;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.quote-card {
  padding: 18px 18px;
  text-align: left;
}

.home-quote {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 650;
}

.countdown-card,
.bank-card,
.action-card,
.rewards-card,
.egg-card {
  margin-top: 16px;
  padding: 18px;
}

h2 {
  margin: 0 0 10px;
  color: #5a4650;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.countdown-grid {
  display: grid;
  gap: 10px;
}

.countdown-grid p {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff8fb;
}

.countdown-grid .label {
  min-width: 0;
  color: var(--muted);
}

.countdown-grid strong {
  color: #c06a82;
  font-size: 1.8rem;
  line-height: 1;
}

.exam-day-message {
  padding: 14px;
  border-radius: 8px;
  background: #fff4da;
  color: #604a2c;
  font-weight: 700;
  white-space: pre-line;
}

.bank-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 221, 0.92));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.bank-card.bump {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(192, 106, 130, 0.2);
}

.bank-note,
.quiet-note,
.status-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bank-amount {
  flex: 0 0 auto;
  margin: 0;
  color: #a46a1f;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

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

.section-head h2 {
  margin-bottom: 0;
}

.section-head .status-label {
  max-width: 48%;
  padding-top: 1px;
  text-align: right;
}

.button-grid {
  display: grid;
  gap: 10px;
}

.soft-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(192, 106, 130, 0.2);
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff7f9;
  color: #5a4650;
  box-shadow: 0 7px 16px rgba(115, 83, 94, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.soft-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(115, 83, 94, 0.12);
}

.soft-button:focus-visible {
  outline: 3px solid rgba(232, 138, 163, 0.32);
  outline-offset: 2px;
}

.soft-button.is-selected {
  border-color: rgba(232, 138, 163, 0.62);
  background: #ffeaf0;
  color: #8c4057;
  font-weight: 750;
}

.soft-button.is-disabled,
.soft-button:disabled {
  border-color: rgba(129, 113, 120, 0.14);
  background: #f2ecef;
  color: #9a8d93;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.message-box {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 8px;
  background: var(--mint);
  color: #40574b;
  font-weight: 650;
  white-space: pre-line;
}

.message-box.rewarded {
  background: #fff2d4;
  color: #6b4a1a;
}

.record-card {
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(149, 194, 172, 0.3);
  border-radius: 8px;
  background: #f1fbf6;
  color: #40574b;
}

.record-card h3 {
  margin: 0 0 8px;
  color: #40574b;
  font-size: 0.98rem;
  line-height: 1.35;
}

.record-meta {
  margin: 0 0 6px;
  color: #658274;
  font-size: 0.9rem;
  font-weight: 700;
}

.record-text {
  margin: 0;
  font-weight: 650;
}

.record-reward {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff2d4;
  color: #6b4a1a;
  font-weight: 750;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-list article {
  padding: 10px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

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

.reward-item {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(240, 184, 90, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff9e9 0%, #fff1f6 100%);
}

.reward-item::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 42%, rgba(240, 184, 90, 0.5) 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, rgba(240, 184, 90, 0.5) 42% 58%, transparent 58%),
    rgba(255, 255, 255, 0.45);
}

.reward-item h3 {
  margin: 0 48px 8px 0;
  color: #8c4057;
  font-size: 1rem;
  line-height: 1.35;
}

.reward-item p {
  margin: 4px 0 0;
}

.reward-code {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #ffffff;
  color: #a46a1f;
  font-weight: 800;
}

.egg-message {
  margin-top: 10px;
  padding: 12px 13px;
  border-radius: 8px;
  background: var(--lavender);
  color: #574d77;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 10;
  width: min(calc(100% - 32px), 420px);
  transform: translateX(-50%);
  border: 1px solid rgba(232, 138, 163, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
  color: #5a4650;
  box-shadow: 0 14px 30px rgba(80, 55, 65, 0.18);
  text-align: center;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@media (min-width: 620px) {
  .page-shell {
    padding: 34px 22px 56px;
  }

  .hero-section {
    gap: 18px;
  }

  .countdown-grid,
  .button-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .soft-button {
    min-height: 64px;
  }
}
