:root {
  --moyu-bg: #f5ecdf;
  --moyu-surface: rgba(255, 250, 244, 0.78);
  --moyu-surface-strong: rgba(255, 252, 248, 0.94);
  --moyu-border: rgba(79, 57, 37, 0.1);
  --moyu-ink: #2f241a;
  --moyu-muted: #746657;
  --moyu-accent: #f47c38;
  --moyu-accent-deep: #c4541d;
  --moyu-gold: #ffc95a;
  --moyu-sky: #79b7ff;
  --moyu-mint: #78d4bd;
  --moyu-danger: #ee6675;
  --moyu-violet: #a785ff;
  --moyu-dark: #40506a;
  --moyu-shadow: 0 24px 60px rgba(76, 51, 31, 0.14);
  --f7-theme-color: #f47c38;
  --f7-theme-color-rgb: 244, 124, 56;
  --f7-theme-color-shade: #cf5c22;
  --f7-theme-color-tint: #ff9a58;
  --f7-bars-bg-color: rgba(247, 238, 228, 0.84);
  --f7-navbar-bg-color: rgba(247, 238, 228, 0.84);
  --f7-toolbar-bg-color: rgba(247, 238, 228, 0.92);
  --f7-card-border-radius: 28px;
  --f7-sheet-border-radius: 28px 28px 0 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--moyu-ink);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(180deg, #f8f0e7 0%, #dbeaf8 100%);
}

body {
  min-height: 100vh;
}

#app,
.view,
.page {
  min-height: 100vh;
}

.page {
  background: transparent;
}

.page-content {
  padding: calc(10px + env(safe-area-inset-top)) 14px calc(28px + env(safe-area-inset-bottom));
}

.mobile-page-head,
.mobile-hero {
  padding: 10px 4px 16px;
}

.hero-kicker,
.page-kicker {
  margin: 0 0 8px;
  color: var(--moyu-accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-hero h1,
.mobile-page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.04;
}

.hero-copy,
.page-copy {
  margin: 12px 0 0;
  color: var(--moyu-muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

.content-block,
.block {
  margin: 0;
  padding: 0;
}

.game-stage-card,
.sudoku-stage-card,
.feature-card,
.teaser-card,
.info-card {
  border: 1px solid var(--moyu-border);
  box-shadow: var(--moyu-shadow);
  background: var(--moyu-surface);
  backdrop-filter: blur(14px);
}

.card {
  margin: 0 0 16px;
}

.card-tag {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--moyu-accent-deep);
}

.touch-button,
#actionButton,
.shell-button {
  min-height: 48px;
  border-radius: 18px;
  font: inherit;
  font-weight: 700;
}

.touch-button {
  border: 1px solid rgba(58, 42, 27, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: var(--moyu-ink);
}

.touch-button.secondary {
  background: linear-gradient(135deg, rgba(121, 183, 255, 0.22), rgba(120, 212, 189, 0.24));
}

.touch-button.accent,
.shell-button,
#actionButton {
  color: #fff9f4;
  background: linear-gradient(135deg, var(--moyu-accent), var(--moyu-accent-deep));
  border: none;
  box-shadow: 0 16px 30px rgba(207, 92, 34, 0.18);
}

.stat-card {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(58, 42, 27, 0.08);
}

.stat-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--moyu-muted);
}

.stat-card strong {
  font-size: 1.3rem;
}

.mobile-toolbar {
  backdrop-filter: blur(16px);
}

.mobile-toolbar .toolbar-inner {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: env(safe-area-inset-bottom);
  scrollbar-width: none;
}

.mobile-toolbar .toolbar-inner::-webkit-scrollbar {
  display: none;
}

.mobile-toolbar .link {
  flex: 0 0 auto;
  padding: 0 8px;
  color: var(--moyu-muted);
  font-weight: 700;
}

.mobile-toolbar .link-active {
  color: var(--moyu-accent-deep);
}

.sheet-modal {
  background: linear-gradient(180deg, #fbf5ee 0%, #eef5fb 100%);
}

.sheet-modal-inner {
  padding: 16px 14px calc(30px + env(safe-area-inset-bottom));
}

.info-card h2 {
  margin: 0 0 10px;
  font-size: 1.12rem;
}

.info-card p {
  margin: 0;
  color: var(--moyu-muted);
  line-height: 1.65;
}

.powerup-list,
.leaderboard-list {
  margin: 0;
  padding-left: 18px;
  color: var(--moyu-muted);
}

.powerup-list li,
.leaderboard-list li {
  margin: 0 0 10px;
}

.leaderboard-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(58, 42, 27, 0.12);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  margin-right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f1711;
}

.pill.gold { background: var(--moyu-gold); }
.pill.blue { background: var(--moyu-sky); }
.pill.mint { background: var(--moyu-mint); }
.pill.red { background: var(--moyu-danger); }
.pill.violet { background: var(--moyu-violet); }
.pill.orange { background: #ff9f5d; }
.pill.dark { background: #5f6f88; color: #fff; }

@media (min-width: 768px) {
  .page-content {
    width: min(540px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 430px) {
  .page-content {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .mobile-page-head,
  .mobile-hero {
    padding: 8px 2px 12px;
  }

  .mobile-hero h1,
  .mobile-page-head h1 {
    font-size: clamp(1.72rem, 7.2vw, 2.4rem);
  }

  .hero-copy,
  .page-copy {
    margin-top: 10px;
    font-size: 0.93rem;
    line-height: 1.55;
  }

  .card {
    margin-bottom: 12px;
  }

  .stat-card {
    padding: 12px 13px;
    border-radius: 18px;
  }

  .stat-card strong {
    font-size: 1.14rem;
  }

  .touch-button,
  #actionButton,
  .shell-button {
    min-height: 44px;
    border-radius: 16px;
  }
}
