/* ============================================================
   Novatio Reward Board — sticker / squishy toy
   Thick outlines, hard offset shadows, flat saturated fills.
   ============================================================ */

:root {
  --green:  #3ECf8E;
  --pink:   #FF5FA2;
  --orange: #FF9E2C;
  --purple: #8B6BFF;
  --yellow: #FFD93D;
  --blue:   #4DB8FF;
  --red:    #FF4D4D;
  --ink:    #2C2C2A;
  --page:   #FFF3C4;
  --shadow: 0 6px 0 #2C2C2A;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Baloo 2", "Nunito", "Trebuchet MS", system-ui, sans-serif;
  font-size: 20px;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 18px 16px 90px; }

/* ---------- cards ---------- */
.card {
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 0 0 22px;
}
.card.green  { background: var(--green); }
.card.yellow { background: var(--yellow); }
.card.blue   { background: var(--blue); }
.card.pink   { background: var(--pink); }
.card.purple { background: var(--purple); color: #fff; }

h1, h2, h3 { margin: 0 0 10px; line-height: 1.05; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p  { margin: 6px 0; line-height: 1.35; }

/* ---------- the hero number ---------- */
.hero-num {
  font-size: 5.6rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -2px;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  color: #fff;
}
.big-num { font-size: 2.8rem; font-weight: 800; line-height: 1; }
.mid-num { font-size: 1.9rem; font-weight: 800; }
.small { font-size: 0.85rem; }
.quiet { opacity: 0.85; }

/* ---------- buttons ---------- */
button, .btn {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--yellow);
  border: 4px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--ink);
  padding: 12px 20px;
  min-height: 52px;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
button:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
button:focus-visible { outline: 4px solid var(--purple); outline-offset: 3px; }
button.plain { background: #fff; }
button.go { background: var(--green); }
button.danger { background: var(--red); color: #fff; }
button.small { font-size: .9rem; min-height: 40px; padding: 8px 12px; border-width: 3px; box-shadow: 0 4px 0 var(--ink); }
button[disabled] { opacity: .5; cursor: not-allowed; box-shadow: 0 5px 0 var(--ink); transform: none; }

input, select, textarea {
  font-family: inherit;
  font-size: 1.05rem;
  padding: 12px 14px;
  border: 4px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  min-height: 52px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 4px solid var(--purple); outline-offset: 2px;
}
label { display: block; font-weight: 700; font-size: .95rem; margin: 10px 0 4px; }

/* ---------- speaker ---------- */
.speak {
  background: #fff;
  border-radius: 50%;
  width: 52px; height: 52px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  flex: 0 0 auto;
}

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* ---------- stamps ---------- */
.stamp {
  display: inline-block;
  font-weight: 800;
  border: 4px solid var(--ink);
  border-radius: 14px;
  padding: 6px 14px;
  box-shadow: 0 4px 0 var(--ink);
  background: var(--green);
  transform: rotate(-3deg);
}
.stamp.miss { background: var(--orange); transform: rotate(2deg); }

/* ---------- pet ---------- */
.pet-stage { text-align: center; padding: 6px 0 0; }
.pet-stage svg { overflow: visible; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.swatch {
  width: 40px; height: 40px; min-height: 40px; padding: 0;
  border-radius: 50%; border: 4px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.swatch[aria-pressed="true"] { outline: 4px solid var(--purple); outline-offset: 3px; }

/* Growth meter: the late stages are 14-22 tickets apart, so the bar is the
   only thing that moves on an ordinary day. */
.meter {
  height: 18px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--ink);
  overflow: hidden;
  margin: 14px 0 10px;
}
.meter-fill {
  height: 100%;
  background: var(--pink);
  border-right: 3px solid var(--ink);
  transition: width .6s cubic-bezier(.34, 1.2, .5, 1);
}

.ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.rung {
  background: #fff; border: 4px solid var(--ink); border-radius: 16px;
  padding: 6px 4px; text-align: center; box-shadow: 0 4px 0 var(--ink);
  cursor: pointer; min-height: 0;
}
.rung .need { font-weight: 800; font-size: .9rem; }
.rung .nm { font-size: .7rem; line-height: 1.1; }
.rung.locked { background: #EDEDE7; }
.rung.next { background: var(--yellow); }
.rung .secret {
  font-size: 2.4rem;
  font-weight: 800;
  color: #9A9D96;
  line-height: 1.6;
}

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }

/* ---------- banners ---------- */
.banner {
  border: 4px solid var(--ink); border-radius: 0; box-shadow: 0 4px 0 var(--ink);
  padding: 10px 16px; font-weight: 800; text-align: center;
}
.banner.test { background: var(--purple); color: #fff; }
.banner.viewas { background: var(--orange); }

/* ---------- admin only ---------- */
.admin { font-size: 17px; }
.admin .wrap { max-width: 1040px; }
.admin table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin th { text-align: left; font-size: .8rem; padding: 4px 8px 8px 0; }
.admin td { padding: 7px 8px 7px 0; border-top: 3px solid #EDEDE7; vertical-align: middle; }
.admin .tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.admin .tabs button { background: #fff; }
.admin .tabs button[aria-selected="true"] { background: var(--green); }
.admin .logline { padding: 8px 0; border-top: 3px solid #EDEDE7; font-size: .9rem; }
.admin .logline.danger { color: #B0002A; font-weight: 700; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }

.err { background: var(--red); color: #fff; border: 4px solid var(--ink); border-radius: 14px; padding: 10px 14px; font-weight: 700; box-shadow: var(--shadow); }
.ok  { background: var(--green); border: 4px solid var(--ink); border-radius: 14px; padding: 10px 14px; font-weight: 700; box-shadow: var(--shadow); }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .meter-fill { transition: none; }
}

@media (max-width: 520px) {
  html, body { font-size: 18px; }
  .hero-num { font-size: 4.4rem; }
}

/* ---------- arrival celebration ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i {
  position: absolute;
  top: -20px;
  width: 12px; height: 18px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  animation: confettiFall 2.6s linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .9; }
}

/* The dashboard slides in after the login celebration. */
@keyframes slideIn {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.slide-in { animation: slideIn .45s cubic-bezier(.34, 1.2, .5, 1) 1; }

@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
  .slide-in { animation: none; }
}
