:root {
  --bg: #0c0c0e;
  --bg2: #141417;
  --mint: #00e5a0;
  --white: #ffffff;
  --muted: #9696a0;
  --ink: #f4f6ff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.app { max-width: 560px; margin: 0 auto; padding-bottom: 110px; }

.topbar {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

.share-btn {
  padding: 10px 18px;
  background: rgba(0,229,160,0.12); color: var(--mint);
  border: 1px solid rgba(0,229,160,0.5); border-radius: 999px;
  font-size: 14px; font-weight: 800; cursor: pointer;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--mint); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}

.brand-name { font-weight: 800; font-size: 18px; }
.brand-sub { color: var(--muted); font-size: 13px; }

.install-banner {
  margin: 12px 20px 0; padding: 10px 14px;
  background: var(--bg2); border: 1px solid rgba(0,229,160,0.35);
  border-radius: 10px; font-size: 13px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.install-banner button {
  background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
}

main { padding: 4px 0 12px; }

.tab { display: none; }
.tab.active { display: block; }

.game-card {
  margin: 16px 20px 0; padding: 22px 20px;
  background: var(--bg2); border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
}
.game-card.center { text-align: center; }

.eyebrow {
  color: var(--mint); font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
}
.eyebrow.pad { padding: 18px 20px 0; }

h1 { font-size: 30px; margin: 10px 0 6px; line-height: 1.15; }
h2 { font-size: 16px; margin: 20px 0 8px; color: var(--mint); }

.tagline { color: var(--muted); font-size: 15px; margin: 0 0 4px; line-height: 1.45; }

.steps { margin: 0; padding-left: 20px; }
.steps li { margin: 10px 0; line-height: 1.55; font-size: 15px; }

.win-box {
  margin-top: 20px; padding: 14px 16px;
  background: rgba(0,229,160,0.1);
  border-left: 4px solid var(--mint);
  border-radius: 0 10px 10px 0;
}
.win-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--mint); margin-bottom: 6px; }
.win-box p { margin: 0; font-size: 14px; line-height: 1.5; }

.done-btn {
  width: 100%; margin-top: 20px; padding: 16px;
  background: var(--mint); color: var(--bg);
  border: none; border-radius: 14px;
  font-size: 18px; font-weight: 800; cursor: pointer;
}
.done-btn.done { background: #2f9e6e; color: #fff; }

.streak-line { text-align: center; margin-top: 14px; color: var(--muted); font-size: 14px; }
.streak-line strong { color: var(--mint); }

.share-nudge {
  margin-top: 16px; padding: 14px 16px;
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.35);
  border-radius: 12px; text-align: center;
}
.share-nudge p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.share-win-btn {
  width: 100%; padding: 13px;
  background: var(--mint); color: var(--bg);
  border: none; border-radius: 12px;
  font-size: 16px; font-weight: 800; cursor: pointer;
}

.streak-big { font-size: 96px; font-weight: 800; color: var(--mint); line-height: 1; margin-top: 8px; }
.streak-word { font-size: 18px; margin-top: 4px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }

.week-dots { display: flex; justify-content: center; gap: 8px; margin: 18px 0 6px; }
.dot {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted);
}
.dot.hit { background: var(--mint); border-color: var(--mint); color: var(--bg); font-weight: 800; }
.dot.today { border-color: var(--mint); }

.total-line { margin-top: 14px; color: var(--muted); font-size: 14px; }
.total-line strong { color: var(--ink); }

.level-badge {
  margin-top: 14px; padding: 12px 16px;
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.35);
  border-radius: 12px;
}
.level-name { color: var(--mint); font-weight: 800; font-size: 18px; }
.level-next { color: var(--muted); font-size: 13px; margin-top: 4px; }

.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti-piece { position: absolute; top: -14px; border-radius: 2px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(112vh) rotate(720deg); opacity: 0.85; } }

.lib-card {
  margin: 12px 20px 0; background: var(--bg2);
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
}
.lib-head {
  width: 100%; padding: 16px; background: none; border: none;
  color: var(--ink); text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.lib-head .t { font-weight: 700; font-size: 16px; }
.lib-head .d { color: var(--muted); font-size: 12px; margin-top: 2px; }
.lib-head .chev { color: var(--mint); font-size: 18px; }
.lib-body { display: none; padding: 0 16px 16px; }
.lib-card.open .lib-body { display: block; }
.lib-body p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.lib-body ol { padding-left: 20px; margin: 8px 0; }
.lib-body li { font-size: 14px; line-height: 1.55; margin: 6px 0; }

.community { text-align: center; padding: 26px 20px 10px; }
.community p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.wa-btn {
  display: inline-block; padding: 14px 22px;
  background: #25d366; color: #062b16; font-weight: 800;
  border-radius: 999px; text-decoration: none; font-size: 15px;
}

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; background: #08080a;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-btn {
  flex: 1; padding: 16px 0; background: none; border: none;
  color: var(--muted); font-size: 15px; font-weight: 700; cursor: pointer;
}
.tab-btn.active { color: var(--mint); }

.toast {
  position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%) translateY(10px);
  background: #08080a; color: var(--ink);
  border: 1px solid rgba(0,229,160,0.5); border-radius: 12px;
  padding: 12px 18px; font-size: 14px; max-width: 86%;
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none; z-index: 50; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
