/* EazyLife — flat bright "sticker book" style. Portrait mobile-first. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Baloo 2', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(180deg, #FFF3D6 0%, #FFE3EC 55%, #DFF3FF 100%);
  min-height: 100vh;
  color: #3A3A3A;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2 { font-weight: 800; margin: 0; }

/* ---------- top bar ---------- */
#topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
}
.top-left { display: flex; gap: 8px; }
.top-title { font-size: 22px; font-weight: 800; color: #B25F00; letter-spacing: 0.4px; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 16px;
  background: #FFFFFF; border: 3px solid #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,0.14);
  display: inline-flex; align-items: center; justify-content: center;
  color: #5B8DEF; text-decoration: none;
}
.icon-btn.off { color: #B9BDC9; }
.icon-btn.active { background: #FFE29A; color: #B25F00; }
.home-btn { color: #E63946; }

#screen { max-width: 520px; margin: 0 auto; padding: 6px 14px 42px; }

/* ---------- generic sticker cards & buttons ---------- */
.card {
  background: #FFFFFF; border: 4px solid #fff; border-radius: 26px;
  box-shadow: 0 5px 0 rgba(0,0,0,0.10), 0 12px 24px rgba(0,0,0,0.06);
  padding: 18px;
}
.big-btn {
  display: block; width: 100%; margin-top: 14px;
  background: #57A773; color: #fff; font-size: 22px; font-weight: 800;
  padding: 15px 20px; border-radius: 20px; border: 3px solid #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,0.16);
}
.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,0.16); }
.big-btn.alt { background: #5B8DEF; }
.back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border-radius: 999px; padding: 9px 16px 9px 10px;
  font-size: 17px; font-weight: 700; color: #5B8DEF;
  box-shadow: 0 3px 0 rgba(0,0,0,0.12); margin-bottom: 12px; min-height: 46px;
}
.badge {
  display: inline-block; background: #FFB703; color: #5C3D00; font-weight: 800;
  font-size: 13px; padding: 3px 12px; border-radius: 999px; letter-spacing: 1px;
}

/* ---------- home ---------- */
.hero { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #FFF7E0, #FFE3EC); }
.hero-mascot { flex: 0 0 auto; }
.hero-text h1 { font-size: 38px; color: #B25F00; line-height: 1.05; }
.hero-text p { margin: 4px 0 10px; font-size: 17px; font-weight: 600; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border-radius: 999px; padding: 6px 12px;
  font-size: 15px; font-weight: 700; box-shadow: 0 2px 0 rgba(0,0,0,0.10);
}
.chip b { font-size: 17px; }
.star-chip { color: #B8860B; }
.missions-card { margin-top: 16px; }
.missions-card h2 { font-size: 21px; margin-bottom: 10px; color: #9B51E0; }
.mission { margin-bottom: 12px; }
.mission:last-child { margin-bottom: 2px; }
.mission-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mission-text { font-size: 16.5px; font-weight: 700; }
.mission-count { font-weight: 800; color: #8A8FA3; }
.mission-check { color: #57A773; display: inline-flex; }
.mission-bar { height: 12px; background: #F1E9DA; border-radius: 999px; overflow: hidden; margin-top: 5px; }
.mission-bar span { display: block; height: 100%; background: linear-gradient(90deg, #FFB703, #FF9F1C); border-radius: 999px; transition: width 0.4s ease; }
.mission.done .mission-text { color: #57A773; }
.claim-btn {
  width: 100%; margin-top: 8px; background: #9B51E0; color: #fff;
  font-size: 19px; font-weight: 800; padding: 13px; border-radius: 16px;
  border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,0.15);
  animation: wiggle 1.2s ease-in-out infinite;
}
.claim-done { text-align: center; font-weight: 700; color: #57A773; margin: 8px 0 0; }
@keyframes wiggle { 0%,100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
.pick-label { font-size: 18px; font-weight: 800; text-align: center; margin: 20px 0 12px; }
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.module-card {
  background: #fff; border-radius: 26px; border: 4px solid #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,0.10);
  padding: 16px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 208px;
}
.module-card:active { transform: translateY(3px); }
.module-art { height: 96px; display: flex; align-items: center; justify-content: center; }
.module-name { font-size: 22px; font-weight: 800; color: var(--mc); }
.module-sub { font-size: 13.5px; font-weight: 600; color: #8A8FA3; text-align: center; }
.module-prog { margin-top: 6px; background: #F7F3EA; border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: 14px; }

/* ---------- level map ---------- */
.map-head { text-align: center; margin-bottom: 20px; }
.map-head h1 { font-size: 30px; }
.map-head p { margin: 4px 0 0; font-weight: 600; color: #8A8FA3; }
.path { display: flex; flex-direction: column; gap: 18px; padding: 6px 8px; }
.path-node {
  display: flex; align-items: center; gap: 14px; width: 82%;
  background: #fff; border-radius: 24px; border: 4px solid #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,0.10); padding: 12px 16px; text-align: left; min-height: 84px;
}
.path-node.right { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.path-node.right .node-info { align-items: flex-end; }
.node-circle {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
  background: #FFB703; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: inset 0 -4px 0 rgba(0,0,0,0.12);
}
.path-node.done .node-circle { background: #57A773; }
.path-node.locked { opacity: 0.62; }
.path-node.locked .node-circle { background: #C9CDD6; color: #fff; }
.node-info { display: flex; flex-direction: column; gap: 3px; }
.node-name { font-size: 20px; font-weight: 800; }
.star-row { display: inline-flex; gap: 2px; }
.star { color: #D8DCE6; display: inline-flex; }
.star.on { color: #FFB703; }
.demo-note { text-align: center; font-weight: 600; color: #8A8FA3; margin-top: 18px; }

/* ---------- locked / complete ---------- */
.locked-card, .complete-card { text-align: center; padding: 26px 20px; }
.locked-icon { color: #B9BDC9; display: inline-flex; margin: 6px 0; }
.locked-card h2, .complete-card h1 { font-size: 27px; margin: 6px 0; }
.locked-card p, .complete-card p { font-size: 17.5px; font-weight: 600; }
.complete-card .star-row { justify-content: center; margin: 8px 0; }
.complete-btns { margin-top: 8px; }

/* ---------- play ---------- */
.q-progress { display: flex; gap: 7px; justify-content: center; margin: 2px 0 14px; }
.q-dot { width: 13px; height: 13px; border-radius: 50%; background: #E4DFD2; border: 2px solid #fff; box-shadow: 0 1px 0 rgba(0,0,0,0.1); }
.q-dot.done { background: #57A773; }
.q-dot.now { background: #FFB703; transform: scale(1.25); }
.prompt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 16px; }
.prompt-text { flex: 1; font-size: 19.5px; font-weight: 700; margin: 0; line-height: 1.35; }
.speaker-btn {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%;
  background: #FFB703; color: #5C3D00; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.feedback {
  position: sticky; bottom: 14px; margin-top: 16px; text-align: center;
  font-size: 19px; font-weight: 800; padding: 12px 16px; border-radius: 18px;
  border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,0.12);
}
.feedback.good { background: #DFF5E3; color: #1E7A3C; }
.feedback.try { background: #FFF1D6; color: #9A6A00; }
.shake { animation: shake 0.45s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.mini-toggle {
  display: block; margin: 14px auto 0; background: #fff; border-radius: 999px;
  padding: 9px 18px; font-size: 15.5px; font-weight: 700; color: #8A8FA3;
  box-shadow: 0 2px 0 rgba(0,0,0,0.10); min-height: 44px;
}

/* clocks */
.clock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.clock-opt {
  background: #fff; border-radius: 24px; border: 4px solid #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,0.10); padding: 12px 6px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 16.5px; font-weight: 800; color: #B25F00; min-height: 168px;
}
.clock-opt:active { transform: translateY(3px); }
.clock-svg { filter: drop-shadow(0 3px 0 rgba(0,0,0,0.08)); }
.routine-card { text-align: center; margin-bottom: 14px; }
.routine-card h2 { font-size: 25px; }
.routine-time { font-size: 19px; font-weight: 800; color: #E63946; margin: 2px 0 0; }
.setclock-wrap { display: flex; flex-direction: column; align-items: center; }
.setcontrols { display: flex; gap: 22px; margin-top: 14px; }
.ctl-group { text-align: center; }
.ctl-group > span { font-weight: 800; font-size: 16px; color: #8A8FA3; display: block; margin-bottom: 6px; }
.ctl-btn {
  width: 62px; height: 62px; border-radius: 50%; background: #5B8DEF; color: #fff;
  font-size: 32px; font-weight: 800; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,0.15);
  margin: 0 4px;
}
.ctl-btn.wide { width: auto; border-radius: 999px; padding: 0 22px; font-size: 19px; height: 62px; }
.ctl-btn:active { transform: translateY(3px); }

/* money */
.money { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; }
.coin {
  border-radius: 50%; background: radial-gradient(circle at 35% 32%, #FFFFFF 0%, var(--mc) 58%, var(--mc) 100%);
  border: 3px solid #fff; box-shadow: 0 3px 0 rgba(0,0,0,0.16), inset 0 0 0 3px rgba(0,0,0,0.08);
  color: #4A3F00;
}
.coin-num { line-height: 1; }
.coin-sub { font-size: 0.42em; letter-spacing: 1px; text-transform: uppercase; opacity: 0.75; }
.note {
  border-radius: 12px; background: linear-gradient(135deg, var(--mc), var(--mc));
  border: 3px solid #fff; box-shadow: 0 3px 0 rgba(0,0,0,0.16);
  color: #fff; position: relative; overflow: hidden;
}
.note::after { content: ''; position: absolute; inset: 5px; border: 2px dashed rgba(255,255,255,0.55); border-radius: 8px; }
.note-amt { line-height: 1; z-index: 1; }
.note-sub { font-size: 0.34em; letter-spacing: 0.6px; opacity: 0.9; z-index: 1; }
.money-sm { font-size: 15px; }
.money-sm.coin { width: 44px; height: 44px; }
.money-sm.note { width: 64px; height: 40px; }
.money-md { font-size: 21px; }
.money-md.coin { width: 64px; height: 64px; }
.money-md.note { width: 96px; height: 58px; }
.money-lg { font-size: 30px; }
.money-lg.coin { width: 96px; height: 96px; }
.money-lg.note { width: 148px; height: 88px; }
.money-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.money-opt {
  background: #fff; border-radius: 24px; border: 4px solid #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,0.10); padding: 16px 6px;
  display: flex; align-items: center; justify-content: center; min-height: 128px;
}
.money-opt:active { transform: translateY(3px); }
.count-tray { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; min-height: 96px; margin-bottom: 16px; }
.total-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.total-opt {
  background: #5B8DEF; color: #fff; font-size: 23px; font-weight: 800;
  border-radius: 18px; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,0.15);
  padding: 16px 8px; min-height: 64px;
}
.total-opt:active { transform: translateY(3px); }

/* shop */
.shop-card { margin-bottom: 14px; }
.shop-item { display: flex; align-items: center; gap: 16px; }
.shop-item h2 { font-size: 25px; }
.price-tag {
  display: inline-block; margin-top: 5px; background: #E63946; color: #fff;
  font-weight: 800; font-size: 19px; padding: 4px 14px; border-radius: 999px;
  transform: rotate(-2deg); box-shadow: 0 2px 0 rgba(0,0,0,0.15);
}
.tray-card { margin-bottom: 14px; }
.tray-label { margin: 0 0 8px; font-weight: 700; color: #8A8FA3; font-size: 15px; }
.tray { display: flex; flex-wrap: wrap; gap: 9px; min-height: 52px; align-items: center; }
.tray-empty { color: #C9CDD6; font-weight: 700; }
.tray-item { padding: 2px; border-radius: 12px; }
.tray-total { margin: 10px 0 0; font-size: 17.5px; font-weight: 700; }
.wallet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wallet-btn {
  background: #fff; border-radius: 18px; border: 3px solid #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,0.10); padding: 10px 2px;
  display: flex; align-items: center; justify-content: center; min-height: 84px;
}
.wallet-btn:active { transform: translateY(3px); }
.big-note { width: 100%; flex-direction: column; gap: 8px; font-weight: 800; color: #9B51E0; font-size: 17px; }

/* confetti */
#confetti-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti { position: absolute; top: -16px; width: 11px; height: 16px; border-radius: 3px; animation: confall 2.6s ease-in forwards; }
@keyframes confall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(560deg); opacity: 0.7; }
}

@media (max-width: 380px) {
  .hero-text h1 { font-size: 32px; }
  .module-name { font-size: 19px; }
  .money-lg.note { width: 128px; height: 78px; }
  .money-lg.coin { width: 84px; height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti, .claim-btn { animation: none; }
  .shake { animation-duration: 0.01s; }
}
