@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/patrick-hand-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/patrick-hand-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Caveat Brush";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/caveat-brush-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Caveat Brush";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/caveat-brush-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-head: "Caveat Brush", "Patrick Hand", "Chalkboard SE", "Comic Sans MS", sans-serif;
  --font-body: "Patrick Hand", "Chalkboard SE", "Comic Sans MS", sans-serif;
  --ink: #2a3a52;
  --accent: #ff7f50;
  --accent-2: #22b8a7;
  --ok: #2cbe74;
  --warn: #ef5f4d;
  --sun: #ffd95e;
  --sky: #aee8ff;
  --mint: #d9ffe9;
  --candy: #ffe7f5;
  --lavender: #ede5ff;
  --peach: #fff0e0;
  --soft: #fffffff2;
  --stroke: #d4dff0;
  --shadow: 0 10px 0 #c7d8f0, 0 14px 28px #8db0dc55;
  --shadow-sm: 0 5px 0 #d8e7f9, 0 10px 20px #9db9d440;
  --wobble: 22px 28px 18px 26px / 26px 22px 28px 18px;
}

* {
  box-sizing: border-box;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(4deg);
  }
}

@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.05);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes bubble-drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(6px, -10px);
  }
  66% {
    transform: translate(-4px, -6px);
  }
}

@keyframes coin-fall {
  0% {
    opacity: 0;
    transform: translateY(-28px) rotate(0deg) scale(0.7);
  }
  12% {
    opacity: 1;
  }
  70% {
    transform: translateY(72px) rotate(220deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(92px) rotate(300deg) scale(0.5);
  }
}

@keyframes bar-grow {
  0%,
  100% {
    transform: scaleY(0.45);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes kid-wave {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-6px) rotate(3deg);
  }
}

@keyframes piggy-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-5px) scale(1.04);
  }
}

@keyframes cloud-pass {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(18px);
  }
}

@keyframes badge-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes sparkle-twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 5% 8%, #fff8bd 0 18%, transparent 19%),
    radial-gradient(circle at 95% 4%, #ffc8e8 0 16%, transparent 17%),
    radial-gradient(circle at 88% 92%, #caefff 0 20%, transparent 21%),
    radial-gradient(circle at 12% 85%, #c8ffe0 0 14%, transparent 15%),
    linear-gradient(165deg, #f3fbff 0%, #ecf8ff 34%, #fff5e7 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(3.25rem + env(safe-area-inset-bottom, 0));
}

body.child-custom-bg {
  background:
    linear-gradient(160deg, #1f32484d, #1a28404a),
    var(--child-bg-image),
    linear-gradient(165deg, #f3fbff 0%, #ecf8ff 34%, #fff5e7 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body.kid-theme {
  background:
    radial-gradient(circle at 8% 12%, #fff8bd 0 20%, transparent 21%),
    radial-gradient(circle at 92% 8%, #ffd2ad 0 18%, transparent 19%),
    radial-gradient(circle at 80% 90%, #b8f0ff 0 22%, transparent 23%),
    radial-gradient(circle at 15% 80%, #ffc8e8 0 16%, transparent 17%),
    linear-gradient(165deg, #fff9f0 0%, #f0f8ff 40%, #fff0f8 100%);
}

.sky-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
  animation: bubble-drift 8s ease-in-out infinite;
}

.bubble-1 {
  width: 80px;
  height: 80px;
  top: 8%;
  left: 4%;
  background: radial-gradient(circle at 30% 30%, #fff, #ffd166);
  animation-delay: 0s;
}

.bubble-2 {
  width: 55px;
  height: 55px;
  top: 22%;
  right: 6%;
  background: radial-gradient(circle at 30% 30%, #fff, #ff9ecd);
  animation-delay: 1.5s;
}

.bubble-3 {
  width: 65px;
  height: 65px;
  bottom: 18%;
  left: 8%;
  background: radial-gradient(circle at 30% 30%, #fff, #7be2bc);
  animation-delay: 3s;
}

.bubble-4 {
  width: 45px;
  height: 45px;
  bottom: 30%;
  right: 10%;
  background: radial-gradient(circle at 30% 30%, #fff, #80d2ff);
  animation-delay: 2s;
}

.bubble-5 {
  width: 35px;
  height: 35px;
  top: 45%;
  left: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #c8a8ff);
  animation-delay: 4s;
}

.star-deco {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.7;
  animation: float 4s ease-in-out infinite;
}

.star-1 {
  top: 15%;
  right: 18%;
  animation-delay: 0.5s;
}

.star-2 {
  bottom: 25%;
  left: 15%;
  animation-delay: 1.2s;
}

.star-3 {
  top: 35%;
  right: 5%;
  font-size: 1.1rem;
  animation-delay: 2s;
}

.install-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 0.75rem;
  background: linear-gradient(180deg, #ffffff00, #ffffffcc 18%, #fff 40%);
  pointer-events: none;
}

.install-banner.hidden {
  display: none;
}

.install-banner-content {
  pointer-events: auto;
  max-width: 520px;
  margin: 0 auto;
  padding: 0.85rem 0.95rem;
  border-radius: 20px;
  border: 3px solid #fff;
  background: linear-gradient(145deg, #fffef8, #e8f7ff);
  box-shadow: 0 8px 0 #c8daf5, 0 14px 28px #7aa8d555;
  animation: pop-in 0.45s ease;
}

.install-banner-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: #1f4f74;
}

.install-banner-text {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #3a5f82;
}

.install-ios-hint {
  margin: 0 0 0.55rem;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  background: #fff8e8;
  border: 2px dashed #ffd166;
  font-size: 0.85rem;
  line-height: 1.35;
}

.install-banner-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.install-app-btn {
  background: linear-gradient(145deg, #5ec8ff, #48dda9);
  color: #10324a;
  box-shadow: 0 4px 0 #2f9f8f;
}

.install-dismiss-btn {
  white-space: nowrap;
}

.install-app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.65rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 2px solid #ffd166;
  background: #fff8e8;
  color: #1f4f74;
  font-family: var(--font-head);
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #e8b84a;
}

.install-app-link.hidden {
  display: none;
}

.install-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #1f4f7444;
  backdrop-filter: blur(4px);
}

.install-modal.hidden {
  display: none;
}

.install-modal-card {
  position: relative;
  width: min(100%, 420px);
  max-height: 90vh;
  overflow: auto;
  padding: 1.1rem 1rem 1rem;
  border-radius: 22px;
  border: 3px solid #fff;
  background: linear-gradient(145deg, #fffef8, #e8f7ff);
  box-shadow: 0 10px 0 #c8daf5, 0 18px 36px #7aa8d566;
}

.install-modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: #3a5f82;
  cursor: pointer;
}

.install-modal-title {
  margin: 0 2rem 0.45rem 0;
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: #1f4f74;
}

.install-modal-intro {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #3a5f82;
}

.install-modal-steps {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
  color: #1f4f74;
  font-size: 0.95rem;
  line-height: 1.5;
}

.install-modal-steps li + li {
  margin-top: 0.45rem;
}

.install-modal-note {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: #fff8e8;
  border: 2px dashed #ffd166;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #5a4a20;
}

.install-modal-note.hidden {
  display: none;
}

.install-modal-actions {
  display: grid;
  gap: 0.5rem;
}

.install-modal-actions .hidden {
  display: none;
}

.legal-document-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 820px);
  height: min(92vh, 860px);
  overflow: hidden;
}

.legal-document-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 2px solid #d8e4f6;
  border-radius: 14px;
  background: #fff;
}

.legal-document-complete-btn {
  width: 100%;
  margin-top: 0.75rem;
}

body.legal-document-open {
  overflow: hidden;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
  transform: translateX(-50%);
  z-index: 120;
  max-width: min(92vw, 420px);
  padding: 0.85rem 1.1rem;
  border-radius: 20px;
  border: 3px solid #fff;
  background: linear-gradient(145deg, #fffef8, #e8f7ff);
  color: #1f4f74;
  font-family: var(--font-head);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 8px 0 #c8daf5, 0 12px 28px #7aa8d566;
  animation: toast-pop 0.35s ease;
}

.app-toast.hidden {
  display: none;
}

.app-toast.toast-success {
  background: linear-gradient(145deg, #e8fff5, #c8f7e8);
  color: #0f5a42;
  box-shadow: 0 8px 0 #9edfc8, 0 12px 28px #5fbf9a55;
}

.app-toast.toast-error {
  background: linear-gradient(145deg, #fff5f5, #ffe8e8);
  color: #8b2e2e;
  box-shadow: 0 8px 0 #e8c4c4, 0 12px 28px #c97a7a55;
}

.app-toast.toast-info {
  background: linear-gradient(145deg, #fffef8, #e8f7ff);
  color: #1f4f74;
}

.app-alert-card {
  text-align: center;
}

.app-alert-card[data-type="error"] {
  border-color: #f0d0d0;
  background: linear-gradient(145deg, #fffef8, #fff5f5);
  box-shadow: 0 10px 0 #e8c4c4, 0 18px 36px #c97a7a66;
}

.app-alert-card[data-type="warning"] {
  border-color: #ffe8a8;
  background: linear-gradient(145deg, #fffef8, #fff8e8);
  box-shadow: 0 10px 0 #f3d98e, 0 18px 36px #e8c87866;
}

.app-alert-card[data-type="success"] {
  border-color: #b8e8d0;
  background: linear-gradient(145deg, #fffef8, #e8fff5);
  box-shadow: 0 10px 0 #9edfc8, 0 18px 36px #5fbf9a66;
}

.app-alert-card[data-type="info"] {
  border-color: #c8daf5;
  background: linear-gradient(145deg, #fffef8, #e8f7ff);
  box-shadow: 0 10px 0 #c8daf5, 0 18px 36px #7aa8d566;
}

.app-alert-emoji {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.app-alert-card .install-modal-title {
  margin-right: 0;
  text-align: center;
}

.app-alert-card .install-modal-intro {
  text-align: center;
  margin-bottom: 0.85rem;
}

.app-alert-ok-btn {
  width: 100%;
  margin-top: 0.15rem;
}

@keyframes toast-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.checkout-modal-card,
.payment-success-card {
  text-align: center;
}

.checkout-modal-emoji,
.payment-success-emoji {
  font-size: 2.6rem;
  margin-bottom: 0.35rem;
}

.checkout-modal-hint {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: #5a7a94;
}

.checkout-spinner {
  width: 42px;
  height: 42px;
  margin: 0.75rem auto 0;
  border: 4px solid #d8e8f8;
  border-top-color: #48dda9;
  border-radius: 50%;
  animation: checkout-spin 0.85s linear infinite;
}

@keyframes checkout-spin {
  to {
    transform: rotate(360deg);
  }
}

.payment-success-card .install-app-btn {
  margin-top: 0.5rem;
  width: 100%;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  overflow: hidden;
}

.celebration-layer.hidden {
  display: none;
}

#confettiCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.balloon-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.celebration-balloon {
  position: absolute;
  bottom: -10%;
  animation: balloon-rise linear forwards;
  filter: drop-shadow(0 4px 6px #00000022);
}

@keyframes balloon-rise {
  from {
    transform: translateY(0) rotate(-6deg);
    opacity: 0.95;
  }
  to {
    transform: translateY(-115vh) rotate(8deg);
    opacity: 0.15;
  }
}

#paymentSuccessModal,
#checkoutRedirectModal {
  z-index: 70;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: 1.25rem;
}

body.show-install-banner .app-shell {
  padding-bottom: 7.5rem;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(125deg, #5ec8ff 0%, #48dda9 45%, #ffd166 85%, #ff9ecd 100%);
  color: #13354d;
  border: 4px solid #fff;
  border-radius: 28px;
  padding: 1.2rem 1.1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: pop-in 0.5s ease;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, #ffffff55 0 12%, transparent 13%),
    radial-gradient(circle at 10% 80%, #ffffff44 0 10%, transparent 11%);
  pointer-events: none;
}

.hero-mascot {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background: #fff;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px #ffbd59, 0 6px 0 #e98f3c;
  animation: float-slow 3s ease-in-out infinite;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero h1 {
  margin: 0 0 0.25rem;
  font-family: var(--font-head);
  font-size: 2.1rem;
  letter-spacing: 0.3px;
  text-shadow: 2px 2px 0 #ffffff88;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hero-emoji {
  display: inline-block;
  animation: wiggle 2s ease-in-out infinite;
}

.hero p {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.4;
}

.lang-picker {
  margin-top: 0.75rem;
  display: inline-grid;
  gap: 0.25rem;
  font-weight: 700;
}

.lang-picker select {
  min-width: 180px;
  background: #ffffffe6;
}

.panel {
  margin-top: 0.9rem;
  padding: 1rem;
  background: var(--soft);
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  animation: pop-in 0.45s ease backwards;
}

.landing-showcase {
  background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 55%, #fff8eb 100%);
  border-color: #c8e8ff;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: center;
}

.landing-copy h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-size: 1.45rem;
  line-height: 1.25;
  color: #1f4f74;
}

.landing-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.landing-features li {
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: #ffffffcc;
  border: 2px solid #ffe08a;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.finance-animation {
  display: grid;
  gap: 0.55rem;
}

.anim-stage {
  position: relative;
  height: 240px;
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: inset 0 0 0 2px #b8e4ff;
  background: linear-gradient(180deg, #9ee5ff 0%, #dff6ff 42%, #b8efcb 42%, #8fd9a8 100%);
}

.anim-sky {
  position: absolute;
  inset: 0 0 42%;
  background: linear-gradient(180deg, #7ed4ff 0%, #d9f4ff 100%);
}

.anim-sun {
  position: absolute;
  top: 16px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6b0, #ffd24d 70%);
  box-shadow: 0 0 0 6px #fff6b055;
  animation: float-slow 4s ease-in-out infinite;
}

.anim-cloud {
  position: absolute;
  top: 28px;
  width: 64px;
  height: 24px;
  background: #fff;
  border-radius: 20px;
  opacity: 0.92;
  animation: cloud-pass 6s ease-in-out infinite alternate;
}

.anim-cloud::before,
.anim-cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.anim-cloud::before {
  width: 26px;
  height: 26px;
  top: -12px;
  left: 10px;
}

.anim-cloud::after {
  width: 20px;
  height: 20px;
  top: -8px;
  right: 12px;
}

.anim-cloud-1 {
  left: 14%;
}

.anim-cloud-2 {
  left: 48%;
  top: 48px;
  animation-delay: 1.2s;
}

.anim-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, #9fe0b2 0%, #6fc48a 100%);
}

.anim-kid {
  position: absolute;
  left: 10%;
  bottom: 18%;
  font-size: 2.6rem;
  filter: drop-shadow(0 4px 0 #00000018);
  animation: kid-wave 2.8s ease-in-out infinite;
  z-index: 3;
}

.anim-piggy {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  z-index: 4;
  animation: piggy-bounce 2.2s ease-in-out infinite;
}

.anim-piggy-face {
  display: block;
  font-size: 3.4rem;
  filter: drop-shadow(0 5px 0 #00000015);
}

.anim-piggy-slot {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 18px;
  height: 4px;
  margin-left: -9px;
  border-radius: 4px;
  background: #c45c7a;
}

.anim-coins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.anim-coin {
  position: absolute;
  top: 18%;
  font-size: 1.35rem;
  animation: coin-fall 2.8s ease-in infinite;
}

.anim-coin-1 {
  left: 46%;
  animation-delay: 0s;
}

.anim-coin-2 {
  left: 52%;
  animation-delay: 0.7s;
}

.anim-coin-3 {
  left: 49%;
  animation-delay: 1.4s;
}

.anim-coin-4 {
  left: 55%;
  animation-delay: 2.1s;
}

.anim-chart {
  position: absolute;
  right: 8%;
  bottom: 22%;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 72px;
  z-index: 2;
}

.anim-bar {
  display: block;
  width: 14px;
  border-radius: 6px 6px 2px 2px;
  transform-origin: bottom;
  animation: bar-grow 2.4s ease-in-out infinite;
}

.anim-bar-1 {
  height: 34px;
  background: linear-gradient(180deg, #ff9f6b, #ff7f50);
  animation-delay: 0s;
}

.anim-bar-2 {
  height: 48px;
  background: linear-gradient(180deg, #6ed4ff, #2f9fd8);
  animation-delay: 0.3s;
}

.anim-bar-3 {
  height: 58px;
  background: linear-gradient(180deg, #8be8b0, #2cbe74);
  animation-delay: 0.6s;
}

.anim-bar-4 {
  height: 68px;
  background: linear-gradient(180deg, #ffd76a, #ffb703);
  animation-delay: 0.9s;
}

.anim-badge {
  position: absolute;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: #ffffffeb;
  border: 2px solid #ffd166;
  font-size: 0.72rem;
  font-weight: 800;
  color: #2a5278;
  box-shadow: 0 3px 0 #f0c96a;
  animation: badge-float 3s ease-in-out infinite;
  z-index: 6;
}

.anim-badge-1 {
  top: 14%;
  left: 8%;
  animation-delay: 0s;
}

.anim-badge-2 {
  top: 22%;
  right: 10%;
  animation-delay: 0.8s;
}

.anim-badge-3 {
  top: 42%;
  left: 34%;
  animation-delay: 1.5s;
}

.anim-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.anim-sparkles span {
  position: absolute;
  font-size: 1rem;
  animation: sparkle-twinkle 2s ease-in-out infinite;
}

.anim-sparkles span:nth-child(1) {
  top: 30%;
  left: 28%;
}

.anim-sparkles span:nth-child(2) {
  top: 18%;
  left: 62%;
  animation-delay: 0.6s;
}

.anim-sparkles span:nth-child(3) {
  top: 52%;
  right: 22%;
  animation-delay: 1.1s;
}

.anim-caption {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #3a5f82;
  line-height: 1.35;
}

.auth-shell {
  padding: 0.85rem;
  background: linear-gradient(160deg, #ffffff 0%, #f7fbff 100%);
  border-color: #cfe6ff;
}

.auth-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.auth-menu-btn {
  padding: 0.65rem 0.75rem;
  border-radius: 16px;
  border: 3px solid #fff;
  background: linear-gradient(145deg, #f4f8ff, #e8f2ff);
  color: #2f5f8f;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #c8daf5;
  transition: transform 0.15s ease;
}

.auth-menu-btn:hover {
  transform: translateY(-1px);
}

.auth-menu-btn.active {
  background: linear-gradient(145deg, #5ec8ff, #48dda9);
  color: #10324a;
  box-shadow: 0 4px 0 #2f9f8f;
}

.auth-panel h2 {
  margin-top: 0;
}

.auth-panel.hidden {
  display: none;
}

.auth-card {
  background: var(--soft);
  border: 3px solid #fff;
  border-radius: 22px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  animation: pop-in 0.5s ease backwards;
}

.auth-card-login {
  background: linear-gradient(160deg, #fff 0%, #e8f5ff 100%);
  border-color: #b8dcff;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  margin: 0 0 0.85rem;
  background: #fff;
  color: #1f2a44;
  border: 2px solid #d8e4f6;
  box-shadow: 0 4px 0 #d5e2f2;
  font-weight: 800;
}

.google-login-btn:hover {
  filter: none;
  background: #f7fbff;
  box-shadow: 0 6px 0 #d5e2f2;
}

.google-login-btn:active {
  box-shadow: 0 2px 0 #d5e2f2;
}

.google-login-btn:disabled {
  cursor: wait;
  transform: none;
  filter: none;
}

.google-g {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.auth-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  color: #6b7c93;
  font-size: 0.85rem;
  font-weight: 800;
}

.auth-or::before,
.auth-or::after {
  content: "";
  height: 1px;
  background: #d5e2f2;
}

.auth-card-register {
  background: linear-gradient(160deg, #fff 0%, #ffe8f5 100%);
  border-color: #ffc8e8;
}

.auth-card-child {
  background: linear-gradient(160deg, #fff 0%, #fff4e3 100%);
  border-color: #ffd6a8;
}

.child-auth-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.child-mode-btn {
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  border: 2px solid #ffe2b8;
  background: #fff8ee;
  color: #8a4b12;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.child-mode-btn.active {
  background: linear-gradient(145deg, #ffd27a, #ffb347);
  border-color: #f2a23a;
  color: #5a3200;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.form-grid .checkbox-row > input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0.1rem 0 0;
  padding: 0;
  border-radius: 5px;
  accent-color: #28b98b;
}

.form-grid .checkbox-row > label,
.form-grid .checkbox-copy > label {
  display: block;
  cursor: pointer;
}

.checkbox-copy {
  min-width: 0;
}

.legal-consent-row input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#legalConsentHint {
  display: block;
  margin-top: 0.3rem;
  color: #8a5b20;
  font-weight: 700;
}

#legalConsentHint.ready {
  color: #16815f;
}

#privacyAcceptLabel a.legal-link-reviewed::after {
  content: " ✓";
  color: #16815f;
  font-weight: 900;
}

.invite-preview {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: #eef9ff;
  color: #245a7a;
  font-size: 0.92rem;
}

.invite-child-form {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.invite-child-form input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 2px solid #d8e5f8;
  border-radius: 12px;
  font: inherit;
}

.invite-child-submit {
  width: 100%;
  margin-top: 0.15rem;
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  width: 100%;
  min-width: 0;
  padding-right: 3.15rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  width: 2.3rem;
  height: 2.3rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  transform: translateY(-50%);
  background: #eaf3ff;
  box-shadow: none;
  filter: none;
}

.password-toggle:active {
  transform: translateY(-50%);
  background: #dcecff;
  box-shadow: none;
}

.child-request-message-display {
  margin: 0 0 0.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #fff8f0;
  border: 2px solid #ffe2b8;
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #5a4635;
}

.invite-result {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 12px;
  background: #f2fff8;
  border: 2px dashed #9be3c5;
}

.invite-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.invite-mailto {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.join-requests-list h5 {
  margin: 0.85rem 0 0.45rem;
}

.join-request-card {
  margin-bottom: 0.65rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: #fff8f0;
  border: 2px solid #ffe2b8;
}

.join-request-message {
  margin: 0.45rem 0;
  white-space: pre-wrap;
  font-size: 0.92rem;
  color: #5a4635;
}

.join-request-meta {
  margin: 0;
  font-size: 0.82rem;
  color: #7a6555;
}

.join-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.card-invites::before {
  content: "👨‍👩‍👧";
}

.link-btn {
  justify-self: start;
  background: transparent;
  color: #2f6fad;
  border: 0;
  box-shadow: none;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover {
  transform: none;
  filter: none;
  color: #1f5f9d;
  box-shadow: none;
}

.link-btn:active {
  transform: none;
  box-shadow: none;
}

.forgot-password-row {
  margin-top: 0.65rem;
  text-align: center;
}

.forgot-btn {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 2px dashed #7ec8e3;
  border-radius: 14px;
  background: linear-gradient(145deg, #f0fbff, #e8f7ff);
  color: #1f5f9d;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.forgot-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 95, 157, 0.15);
}

.forgot-panel {
  margin-top: 0.65rem;
  padding: 0.85rem;
  border-radius: 16px;
  background: linear-gradient(145deg, #fffef8, #fff5e0);
  border: 2px dashed #ffd166;
}

.forgot-panel p {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.pix-profile-panel,
.family-pix-panel {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding: 0.85rem;
  border-radius: 16px;
  background: linear-gradient(145deg, #f4fffb, #eef9ff);
  border: 2px solid #9de8d5;
}

.pix-profile-panel h3,
.family-pix-panel h3 {
  margin: 0;
  font-family: var(--font-head);
  color: #1f5f74;
}

.pix-profile-panel p,
.family-pix-panel p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #3a5f82;
}

.pix-qr-preview {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 0.65rem;
  border-radius: 14px;
  background: #fff;
  border: 2px dashed #7ec8e3;
}

.pix-qr-preview canvas,
.pix-modal-card canvas {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px #7aa8d533;
}

.family-pix-list,
.family-pix-form {
  display: grid;
  gap: 0.55rem;
}

.family-pix-form {
  padding: 0.75rem;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #b8f0d0;
}

.family-pix-form strong {
  font-size: 0.98rem;
}

.pix-pay-btn {
  background: linear-gradient(145deg, #32c6a3, #1ea781);
  color: #fff;
  box-shadow: 0 4px 0 #157a60;
}

.pix-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: #13354d77;
  backdrop-filter: blur(3px);
}

.pix-modal.hidden {
  display: none;
}

.pix-modal-card {
  width: min(100%, 360px);
  padding: 1rem;
  border-radius: 22px;
  border: 3px solid #fff;
  background: linear-gradient(160deg, #fff, #f0fff8);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.65rem;
  justify-items: center;
  animation: pop-in 0.35s ease;
}

.pix-modal-card h3 {
  margin: 0;
  font-family: var(--font-head);
  color: #1f5f74;
}

.pix-modal-meta {
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #3a5f82;
}

.pix-payload-text {
  margin: 0;
  width: 100%;
  max-height: 72px;
  overflow: auto;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: #f7fbff;
  border: 1px solid #d4e7ff;
  font-size: 0.72rem;
  line-height: 1.35;
  word-break: break-all;
  color: #2f4d68;
}

.pix-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  width: 100%;
}

.family-password-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px dashed #ffd166;
}

.family-password-panel h3 {
  margin: 0 0 0.35rem;
}

.family-password-panel p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #5b4b3a;
}

.family-password-list {
  display: grid;
  gap: 0.75rem;
}

.family-password-form {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffef8, #fff5e0);
  border: 2px solid #ffe08a;
}

.family-password-form strong {
  font-size: 0.98rem;
}

.family-password-email {
  font-size: 0.85rem;
  color: #6a5b4d;
}

.auth-card h2::before {
  margin-right: 0.35rem;
}

.auth-card-login h2::before {
  content: "🔑";
}

.auth-card-register h2::before {
  content: "🎉";
}

.auth-card h2,
.panel > h2,
.view-panel > h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: #284663;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.panel > h2::before,
.view-panel > h2::before {
  font-size: 1.2rem;
}

.app-menu {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  background: linear-gradient(120deg, #e7f8ff, #f6ecff, #fff2dd);
  border: 3px solid #fff;
}

.menu-btn {
  background: #ffffff;
  color: #33506a;
  border: 2px solid #d4e4ff;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.55rem 1rem;
  box-shadow: 0 3px 0 #d4e4ff;
}

.menu-btn::before {
  margin-right: 0.25rem;
}

.menu-btn[data-view="dashboard"]::before {
  content: "🏠";
}

.menu-btn[data-view="console"]::before {
  content: "🎯";
}

.menu-btn[data-view="history"]::before {
  content: "📜";
}

.menu-btn.active {
  background: linear-gradient(120deg, #ff8f66, #ffbd59);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 5px 0 #e98f3c;
  transform: translateY(-1px);
}

.menu-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #e98f3c;
}

.user-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(130deg, #effbff, #f7fff3, #fff5f0);
  border: 3px solid #fff;
}

.user-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px #80d2ff, 0 4px 0 #5bb8e8;
  background: #fff;
}

.user-meta,
#userMeta {
  margin: 0.15rem 0;
}

.family-chip {
  margin: 0;
  font-size: 0.86rem;
  background: linear-gradient(120deg, #fff5d7, #ffe8a8);
  border: 2px dashed #f0c057;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  display: inline-block;
  font-weight: 700;
}

.user-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  gap: 0.65rem;
}

.animal-avatar-field {
  margin: 0;
  padding: 0.85rem;
  border: 2px dashed #80d2ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #f4fbff, #fff9e8);
}

.animal-avatar-field legend {
  padding: 0 0.4rem;
  color: #28567a;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
}

.animal-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.55rem;
}

.animal-avatar-option {
  cursor: pointer;
}

.animal-avatar-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.animal-avatar-card {
  display: grid;
  place-items: center;
  gap: 0.28rem;
  padding: 0.35rem 0.35rem 0.45rem;
  border: 3px solid #fff;
  border-radius: 18px;
  background: #fffaf3;
  box-shadow: 0 3px 0 #b6dff3;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.animal-avatar-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
}

.avatar.avatar-animal {
  border-radius: 22px;
}

.animal-avatar-name {
  color: #28567a;
  font-size: 0.78rem;
  font-weight: 800;
}

.animal-avatar-option input:checked + .animal-avatar-card {
  border-color: #ff9f43;
  box-shadow: 0 4px 0 #e98f3c;
  transform: translateY(-2px);
}

.animal-avatar-option input:focus-visible + .animal-avatar-card {
  outline: 3px solid #4f9cff;
  outline-offset: 2px;
}

.animal-avatar-hint {
  margin: 0.75rem 0 0;
  color: #557086;
  font-size: 0.86rem;
  font-weight: 700;
}

.form-grid label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
}

select,
input,
button {
  font: inherit;
  border-radius: 16px;
  border: 2px solid #d8e4f6;
  padding: 0.58rem 0.75rem;
}

input,
select {
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: #80d2ff;
  box-shadow: 0 0 0 3px #80d2ff44;
}

button {
  background: linear-gradient(120deg, var(--accent), #ffb066);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 0 #e07040;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 6px 0 #e07040;
}

button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #e07040;
}

.ghost-btn {
  background: linear-gradient(120deg, #ff6b6b, #f78f8f);
  box-shadow: 0 4px 0 #d95555;
}

.ghost-btn:hover {
  box-shadow: 0 6px 0 #d95555;
}

.ghost-btn:active {
  box-shadow: 0 2px 0 #d95555;
}

.approve-btn {
  background: linear-gradient(120deg, #2cbe74, #5dd99a);
  box-shadow: 0 4px 0 #1f9e5c;
}

.approve-btn::before {
  content: "✅ ";
}

.reject-btn {
  background: linear-gradient(120deg, #f06767, #f58c8c);
  box-shadow: 0 4px 0 #d95555;
}

.reject-btn::before {
  content: "❌ ";
}

.summary-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
}

.month-earnings-hero {
  position: relative;
  overflow: hidden;
  margin: 0.15rem 0 0.95rem;
  padding: 1.35rem 4.4rem 1.2rem;
  border-radius: 28px;
  border: 4px solid #fff;
  background:
    radial-gradient(circle at 12% 18%, #fff 0 18px, transparent 19px),
    radial-gradient(circle at 88% 22%, #fff 0 14px, transparent 15px),
    linear-gradient(145deg, #fff6c8 0%, #ffe08a 46%, #ffd4ee 100%);
  box-shadow: 0 10px 0 #f0b45a, 0 18px 28px #f0b45a55;
  text-align: center;
}

.month-earnings-hero h3,
.month-earnings-kicker,
.month-earnings-value,
.month-earnings-kids {
  position: relative;
  z-index: 1;
}

.month-earnings-kicker {
  margin: 0 0 0.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #8a4b16;
}

.month-earnings-hero h3 {
  margin: 0 auto;
  max-width: 18rem;
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  line-height: 1.15;
  color: #24506f;
}

.month-earnings-value {
  margin: 0.35rem 0 0;
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 9vw, 4.4rem);
  font-weight: 800;
  line-height: 0.95;
  color: #127a45;
  text-shadow: 0 3px 0 #fff;
}

.month-earnings-kids {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.month-earnings-kids span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #ffe7a8;
  color: #24506f;
  font-weight: 800;
}

.balloon {
  position: absolute;
  width: 54px;
  height: 68px;
  border-radius: 50% 50% 50% 50%;
  z-index: 0;
  pointer-events: none;
}

.balloon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: inherit;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 28px;
  background: #8fb4d4;
}

.balloon-a { top: 10px; left: 8%; background: #ff7aa2; }
.balloon-b { top: 18px; right: 9%; background: #7ec8ff; width: 42px; height: 54px; }
.balloon-c { bottom: 8px; left: 16%; background: #8ee0a8; width: 36px; height: 46px; }
.balloon-d { bottom: 12px; right: 14%; background: #ffd15c; width: 40px; height: 52px; }

@media (max-width: 720px) {
  .month-earnings-hero {
    padding-left: 2.4rem;
    padding-right: 2.4rem;
  }

  .balloon {
    transform: scale(0.72);
  }
}

.kpi-card {
  background: linear-gradient(145deg, #fff, #f3fbff);
  border: 3px solid #d6e8ff;
  border-radius: 20px;
  padding: 0.75rem;
  transition: transform 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-3px) rotate(-1deg);
}

.kpi-card:nth-child(3n) {
  background: linear-gradient(145deg, #fffef2, #fff7df);
  border-color: #ffe8a8;
}

.kpi-card:nth-child(3n + 1) {
  background: linear-gradient(145deg, #f7fff8, #e8fff0);
  border-color: #b8f0d0;
}

.kpi-card:nth-child(3n + 2) {
  background: linear-gradient(145deg, #fff5fb, #ffe8f5);
  border-color: #ffc8e8;
}

.kpi-card .label {
  margin: 0;
  font-size: 0.86rem;
  color: #556b84;
  font-weight: 600;
}

.kpi-card .value {
  margin: 0.2rem 0 0;
  font-size: 1.3rem;
  font-family: var(--font-head);
  font-weight: 800;
  color: #1a6b4a;
}

.kid-mode .dashboard-kpis {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.kid-kpi {
  border-radius: 22px;
  padding: 0.9rem;
  color: #24425f;
  border: 3px solid #fff;
  box-shadow: 0 6px 0 #d7e8fb;
  transition: transform 0.2s ease;
}

.kid-kpi:hover {
  transform: translateY(-4px) rotate(1deg);
}

.kid-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #fff;
  margin-bottom: 0.4rem;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  box-shadow: 0 3px 0 #d6e8fb;
}

.kid-kpi-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.kid-kpi-value {
  margin: 0.2rem 0 0;
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 800;
}

.kid-kpi-money {
  background: linear-gradient(140deg, #e8fff1, #c9f8de);
  box-shadow: 0 6px 0 #9ee8c0;
}

.kid-kpi-month {
  background: linear-gradient(140deg, #fff4dc, #ffd99b);
  box-shadow: 0 6px 0 #efb85c;
}

.kid-kpi-mission {
  background: linear-gradient(140deg, #fff8d9, #ffe7a8);
  box-shadow: 0 6px 0 #f0c860;
}

.kid-kpi-grade {
  background: linear-gradient(140deg, #e5f3ff, #d0e8ff);
  box-shadow: 0 6px 0 #a8d4f8;
}

.kid-kpi-star {
  background: linear-gradient(140deg, #ffe8f5, #ffd0eb);
  box-shadow: 0 6px 0 #f0a8d8;
}

.kid-focus-card {
  border-radius: 20px;
  padding: 0.85rem;
  background: linear-gradient(140deg, #fff6d9, #ffefb8);
  border: 3px solid #fff;
  box-shadow: 0 5px 0 #f0c860;
}

.kid-focus-card-blue {
  background: linear-gradient(140deg, #e4f3ff, #cfe8ff);
  box-shadow: 0 5px 0 #a8d4f8;
}

.kid-focus-card h4 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-family: var(--font-head);
}

.kid-focus-card h4::before {
  margin-right: 0.3rem;
}

.kid-focus-card:not(.kid-focus-card-blue) h4::before {
  content: "🐷";
}

.kid-focus-card-blue h4::before {
  content: "📚";
}

.kid-focus-card p {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}

.kid-progress-track {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffffb0;
  border: 2px solid #fff;
  box-shadow: inset 0 2px 4px #00000012;
}

.kid-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8f5d, #ffbe5a, #ffd166);
  transition: width 0.4s ease;
}

.kid-progress-fill-blue {
  background: linear-gradient(90deg, #44b8ff, #5dd8ff, #80e8ff);
}

.kid-progress-meta {
  margin-top: 0.3rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.kid-missions-card {
  background: linear-gradient(140deg, #f4faff, #e8f5ff);
  border-color: #b8dcff;
}

.kid-missions-card h3::before {
  content: "🚀 ";
}

.kid-mission-row + .kid-mission-row {
  margin-top: 0.5rem;
}

.kid-mission-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.kid-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.kid-pill {
  background: linear-gradient(120deg, #fff3cf, #ffe8a8);
  border: 2px solid #ffe1a1;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 2px 0 #f0c860;
}

.kid-pill-blue {
  background: linear-gradient(120deg, #e8f5ff, #cfe8ff);
  border-color: #cde8ff;
  box-shadow: 0 2px 0 #a8d4f8;
}

.dashboard-grid {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.7rem;
}

.dash-card {
  background: #fff;
  border: 3px solid #dce8fa;
  border-radius: 20px;
  padding: 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #9db9d433;
}

.dash-card h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: #284663;
  padding-bottom: 0.35rem;
  border-bottom: 3px dashed #dce8fa;
}

.dash-card.dash-section-collapsible {
  padding: 0;
}

.dash-card.dash-section-collapsible > .app-collapsible-summary h3 {
  margin: 0;
  padding: 0;
  border-bottom: 0;
  flex: 1;
}

.dash-section-collapsible {
  margin-top: 0.7rem;
}

.bar-list {
  display: grid;
  gap: 0.45rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.bar-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #edf4fe;
  overflow: hidden;
  border: 2px solid #d2def2;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #23c1ac, #7be2bc, #a8f0d0);
}

.compare-list {
  display: grid;
  gap: 0.55rem;
}

.compare-row {
  display: grid;
  gap: 0.25rem;
}

.compare-label {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.compare-track {
  width: 100%;
  height: 15px;
  border-radius: 999px;
  background: #edf4fe;
  overflow: hidden;
  border: 2px solid #d6e1f4;
}

.compare-fill {
  height: 100%;
  border-radius: 999px;
}

.mini-list {
  display: grid;
  gap: 0.45rem;
}

.mini-item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.94rem;
  border-bottom: 2px dashed #d7e5f7;
  padding-bottom: 0.35rem;
  font-weight: 500;
}

.mini-item:last-child {
  border-bottom: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.grades-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.92rem;
}

.grades-table th,
.grades-table td {
  border-bottom: 2px dashed #d7e5f7;
  padding: 0.5rem 0.4rem;
  text-align: left;
  white-space: nowrap;
}

.grades-table th {
  font-family: var(--font-head);
  color: #2d4865;
  background: #f3faff;
}

.grade-score {
  display: inline-block;
  min-width: 58px;
  text-align: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 0 #00000022;
}

.grade-score-low {
  background: linear-gradient(120deg, #e15353, #f07878);
}

.grade-score-mid {
  background: linear-gradient(120deg, #e6b129, #f0c860);
}

.grade-score-high {
  background: linear-gradient(120deg, #35a56f, #5dd99a);
}

.payroll-row {
  display: grid;
  gap: 0.4rem;
  border: 3px solid #deebfb;
  border-radius: 16px;
  padding: 0.65rem;
  background: linear-gradient(145deg, #fff, #f7fbff);
  transition: transform 0.15s ease;
}

.payroll-row:hover {
  transform: translateX(3px);
}

.payroll-meta {
  font-size: 0.9rem;
}

.payroll-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.paid-badge {
  background: linear-gradient(120deg, var(--ok), #5dd99a);
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 0 #1f9e5c;
}

.paid-badge::before {
  content: "💰 ";
}

.pending-badge {
  background: linear-gradient(120deg, #ffb84a, #ffd166);
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 0 #e09830;
}

.pending-badge::before {
  content: "⏳ ";
}

.summary-card {
  border-radius: 20px;
  padding: 0.95rem;
  background: linear-gradient(140deg, #fff, #f3faff);
  border: 3px solid #d6e8ff;
  transition: transform 0.15s ease;
  animation: pop-in 0.4s ease backwards;
}

.summary-card:nth-child(3n) {
  background: linear-gradient(140deg, #fff, #fff5f0);
  border-color: #ffd8c8;
}

.summary-card:nth-child(3n + 1) {
  background: linear-gradient(140deg, #fff, #f5fff8);
  border-color: #b8f0d0;
}

.summary-card:nth-child(3n + 2) {
  background: linear-gradient(140deg, #fff, #fff5fb);
  border-color: #ffc8e8;
}

.summary-card:hover {
  transform: translateY(-3px) rotate(-0.5deg);
}

.summary-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-head);
}

.summary-card h3::before {
  content: "👧 ";
}

.summary-value {
  font-size: 1.55rem;
  margin: 0.25rem 0;
  color: #0e8360;
  font-family: var(--font-head);
  font-weight: 800;
}

.summary-value::before {
  content: "🪙 ";
  font-size: 1.2rem;
}

.card-list {
  display: grid;
  gap: 0.6rem;
}

.entry-card {
  border: 3px solid #dbe8fb;
  border-radius: 18px;
  padding: 0.8rem;
  background: linear-gradient(145deg, #fff, #f8fbff);
  transition: transform 0.15s ease;
}

.entry-card:hover {
  transform: translateX(4px);
  border-color: #b8dcff;
}

.entry-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.entry-meta,
.entry-value,
.entry-reviews {
  margin: 0.35rem 0;
  font-size: 0.95rem;
}

.status-pill {
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 0 #00000022;
}

.status-approved {
  background: linear-gradient(120deg, var(--ok), #5dd99a);
}

.status-pending {
  background: linear-gradient(120deg, #ffb84a, #ffd166);
}

.status-rejected {
  background: linear-gradient(120deg, var(--warn), #f78f8f);
}

.comment-input {
  width: 100%;
  margin-top: 0.3rem;
}

.entry-edit {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.45rem;
}

.entry-edit .ghost-btn {
  justify-self: start;
}

.action-row {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}

.catalog-admin {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.catalog-admin > h3 {
  margin: 0;
  font-family: var(--font-head);
}

.catalog-admin > h3::before {
  content: "🎨 ";
}

.catalog-subtitle {
  margin: -0.15rem 0 0.15rem;
  font-size: 0.92rem;
  color: #587089;
}

.card-help-text {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #587089;
}

.catalog-card {
  width: 100%;
  position: relative;
  background: linear-gradient(145deg, #fff, #f7fbff);
  border: 3px solid #d8e5f8;
  border-radius: 18px;
  padding: 0.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.catalog-card::before {
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  color: #2a4b64;
  background: #eaf3ff;
  border: 2px solid #fff;
  box-shadow: 0 2px 0 #d0e4f8;
}

.catalog-card:hover {
  transform: translateY(-3px) rotate(-0.5deg);
}

.card-activity::before {
  content: "🏃";
}

.card-subject::before {
  content: "📐";
}

.card-grade::before {
  content: "⭐";
}

.card-grade-period::before {
  content: "📅";
}

.card-grade-period {
  background: linear-gradient(145deg, #fffef8, #f3fbff);
  border-color: #ffd9a0;
}

.catalog-card h4 {
  margin: 0 0 0.45rem;
  padding-right: 2.5rem;
  font-size: 1rem;
  font-family: var(--font-head);
}

.app-collapsible {
  overflow: hidden;
}

.app-collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem;
  cursor: pointer;
  list-style: none;
}

.app-collapsible-summary::-webkit-details-marker {
  display: none;
}

.app-collapsible-summary h3,
.app-collapsible-summary h4 {
  margin: 0;
}

.app-collapsible-summary::after {
  content: "+";
  display: inline-grid;
  flex: 0 0 1.9rem;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border-radius: 50%;
  background: #dff3ff;
  color: #246b8a;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.app-collapsible[open] > .app-collapsible-summary::after {
  content: "−";
  background: #dff8eb;
  color: #19704f;
}

.app-collapsible-content {
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  border-top: 2px solid #e0edf9;
}

.console-collapsible {
  margin-top: 0.8rem;
  border: 3px solid #d8e5f8;
  border-radius: 18px;
  background: #fff;
}

.catalog-card.app-collapsible {
  padding: 0;
}

.catalog-card.app-collapsible::before {
  right: auto;
  left: 0.7rem;
  z-index: 1;
}

.catalog-card.app-collapsible .app-collapsible-summary {
  padding-left: 3.25rem;
}

.catalog-card.app-collapsible h4 {
  padding-right: 0;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr minmax(100px, 128px) auto;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.admin-list {
  display: grid;
  gap: 0.35rem;
  max-height: 230px;
  overflow: auto;
  padding-right: 0.15rem;
}

.catalog-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem;
  border: 2px solid #e1ebfa;
  border-radius: 14px;
  background: #fff;
  transition: background 0.15s ease;
}

.catalog-line:hover {
  background: #f3faff;
}

.catalog-line-main {
  display: grid;
  gap: 0.05rem;
}

.catalog-line-main strong {
  font-size: 0.95rem;
}

.catalog-line-main span {
  font-size: 0.86rem;
  color: #5a738d;
  font-weight: 600;
}

.catalog-line-actions {
  display: flex;
  gap: 0.3rem;
}

.catalog-line-actions button {
  height: 34px;
  padding: 0.45rem 0.7rem;
  font-size: 0.88rem;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 104px auto;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 2px solid #e1ebfa;
  border-radius: 14px;
  background: #ffffff;
}

.admin-row.subject {
  grid-template-columns: 1fr auto;
}

.admin-row input,
.admin-row button {
  height: 36px;
}

.admin-row input[readonly] {
  background: #eef6ff;
  border-color: #d9e9ff;
  text-align: center;
  font-weight: 800;
  color: #2d4b64;
}

.hidden {
  display: none;
}

body.kid-theme .hero-mascot {
  content: "🚀";
}

body.kid-theme #childSection .form-grid {
  background: linear-gradient(145deg, #fffef8, #fff5e0);
  border: 3px dashed #ffd166;
  border-radius: 20px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

body.kid-theme #childSection .form-grid:last-of-type {
  background: linear-gradient(145deg, #f5faff, #e8f5ff);
  border-color: #80d2ff;
}

body.kid-theme #childSection .form-grid button[type="submit"]::before {
  content: "🚀 ";
}

.history-load-more {
  width: 100%;
  margin-top: 0.75rem;
  background: linear-gradient(120deg, #48dda9, #5ec8ff);
  box-shadow: 0 4px 0 #2ea8c8;
}

.history-load-more:hover {
  box-shadow: 0 6px 0 #2ea8c8;
}

.history-load-more:active {
  box-shadow: 0 2px 0 #2ea8c8;
}

@media (max-width: 700px) {
  .app-shell {
    padding: 0.75rem;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    border-radius: 22px;
    padding: 1rem 0.85rem;
  }

  .hero h1 {
    font-size: 1.75rem;
    justify-content: center;
  }

  .hero-mascot {
    width: 64px;
    height: 64px;
    font-size: 2.2rem;
  }

  .avatar {
    width: 58px;
    height: 58px;
  }

  .app-menu {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inline-form,
  .admin-row,
  .admin-row.subject,
  .catalog-line {
    grid-template-columns: 1fr;
  }

  .catalog-line-actions {
    width: 100%;
  }

  .catalog-line-actions button {
    flex: 1;
  }

  .star-deco,
  .bubble {
    opacity: 0.3;
  }

  .landing-grid {
    grid-template-columns: 1fr;
  }

  .anim-stage {
    height: 210px;
  }

  .landing-copy h2 {
    font-size: 1.25rem;
    text-align: center;
  }
}

.plan-badge {
  display: inline-block;
  margin: 0.35rem 0 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef4ff;
  border: 2px solid #c8daf5;
  color: #1f4f74;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.plan-badge-plus {
  background: linear-gradient(145deg, #fff8e8, #ffe8f3);
  border-color: #ffb347;
  color: #8a4b00;
}

.menu-btn-plus {
  background: linear-gradient(145deg, #fff3d6, #ffd9ec);
  border-color: #ffb347;
}

.plan-upsell-banner {
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 2px dashed #ffb347;
  background: #fff8e8;
  color: #5a4a20;
  font-size: 0.92rem;
  line-height: 1.45;
}

.plan-upsell-banner button {
  margin-top: 0.45rem;
}

.plan-hero {
  margin-bottom: 0.85rem;
}

.plan-section-subtitle {
  margin: 0.25rem 0 0;
  color: #3a5f82;
}

.plan-current-card,
.plan-card {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 3px solid #fff;
  background: linear-gradient(145deg, #fffef8, #eef7ff);
  box-shadow: 0 6px 0 #c8daf5;
}

.plan-current-card {
  margin-bottom: 0.85rem;
}

.plan-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.plan-card-plus {
  background: linear-gradient(145deg, #fff8e8, #ffeef8);
  box-shadow: 0 6px 0 #ffb347;
}

.plan-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-head);
  color: #1f4f74;
}

.plan-price {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ff7f11;
}

.plan-features {
  margin: 0;
  padding-left: 1.1rem;
  color: #3a5f82;
  font-size: 0.9rem;
  line-height: 1.45;
}

.plan-features li + li {
  margin-top: 0.25rem;
}

.plan-actions {
  display: grid;
  gap: 0.55rem;
}

.plan-action-btn {
  width: 100%;
}

.plan-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: #5a7088;
  line-height: 1.4;
}

.export-payroll-btn {
  margin: 0.45rem 0 0.65rem;
  background: linear-gradient(145deg, #ffd166, #ffb347);
  color: #4a3200;
  box-shadow: 0 4px 0 #d4922d;
}

.export-payroll-btn.hidden {
  display: none;
}

.grade-period-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.grade-period-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: #2a4b64;
}

.grade-period-form label span {
  font-weight: 700;
}

.grade-period-form select,
.grade-period-form button {
  width: 100%;
}

.grade-period-series {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.35rem;
  border-top: 2px dashed #d7e7f8;
}

.grade-period-series h5 {
  margin: 0;
  font-family: var(--font-head);
  color: #284663;
}

.grade-period-series p {
  margin: 0;
}

.grade-period-save-btn {
  margin-top: 0.15rem;
  background: linear-gradient(145deg, #5ec8ff, #48dda9);
  color: #10324a;
  box-shadow: 0 4px 0 #2f9f8f;
}

.grade-period-preview {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: #eef7ff;
  border: 2px dashed #9fd0ff;
  color: #1f4f74;
  font-size: 0.88rem;
}

.grade-period-preview.hidden {
  display: none;
}

.grade-period-block {
  margin-bottom: 0.85rem;
}

.grade-period-block:last-child {
  margin-bottom: 0;
}

.grade-period-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.grade-period-header h4 {
  margin: 0;
  font-family: var(--font-head);
  color: #1f4f74;
  font-size: 1rem;
}

.subject-strength-chart {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.subject-strength-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 2px solid #d7e8fb;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fcff, #fff);
}

.subject-strength-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.subject-strength-card h4,
.subject-strength-card p {
  margin: 0;
}

.subject-strength-card p {
  color: #5d7690;
  font-size: 0.86rem;
  font-weight: 700;
}

.subject-strength-grade,
.subject-strength-missing {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.subject-strength-grade {
  background: #e7f8ef;
  color: #18724f;
}

.subject-strength-missing {
  background: #fff4df;
  color: #9a6414;
}

.subject-strength-row {
  display: grid;
  gap: 0.25rem;
}

.subject-strength-label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 700;
}

.subject-strength-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f2fb;
}

.subject-strength-fill {
  height: 100%;
  border-radius: inherit;
}

.subject-strength-high {
  background: linear-gradient(90deg, #35a56f, #5dd99a);
}

.subject-strength-mid {
  background: linear-gradient(90deg, #e6b129, #f0c860);
}

.subject-strength-low {
  background: linear-gradient(90deg, #e15353, #f07878);
}

.school-grade-inline,
.school-grade-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.45rem;
}

.school-grade-form {
  padding: 0.65rem;
  border: 2px solid #d7e8fb;
  border-radius: 14px;
  background: #fff;
}

.school-grade-form-missing {
  border-color: #f0cf8a;
  background: #fffaf0;
}

.school-grade-form strong,
.school-grade-form span,
.school-grade-inline select,
.school-grade-form select {
  min-width: 9.5rem;
  font-size: 0.92rem;
}

.family-school-grade-list {
  display: grid;
  gap: 0.55rem;
}

.grade-period-header span {
  color: #3a5f82;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .plan-compare-grid {
    grid-template-columns: 1fr;
  }
}

.auth-legal-links {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.85rem;
}

.auth-legal-links a {
  color: #2f6fad;
}

.invite-consent-row {
  grid-column: 1 / -1;
  margin: 0.15rem 0;
}

.delete-account-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 2px dashed #f0d0d0;
}

.delete-account-panel h3,
.delete-account-panel h4 {
  color: #a33;
}

.danger-btn {
  background: #c0392b !important;
  color: #fff !important;
  border: 0;
  box-shadow: 0 4px 0 #962d22;
}

.delete-account-modal-card {
  border-color: #f0d0d0;
  background: linear-gradient(145deg, #fffef8, #fff5f5);
  box-shadow: 0 10px 0 #e8c4c4, 0 18px 36px #c97a7a66;
}

.delete-account-modal-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.delete-account-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.delete-child-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.profile-legal-links {
  margin-top: 1rem;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom, 0));
  text-align: center;
  font-size: 0.82rem;
  color: #4a5f73;
  background: rgba(255, 252, 245, 0.96);
  border-top: 1px solid rgba(47, 111, 173, 0.16);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 18px rgba(26, 50, 74, 0.08);
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  max-width: 960px;
  margin: 0 auto;
}

.site-footer-nav a {
  color: #2f6fad;
  text-decoration: none;
  font-weight: 700;
}

.site-footer-nav a:hover {
  text-decoration: underline;
}

body.cookie-consent-open .site-footer {
  display: none;
}

body.cookie-consent-open {
  padding-bottom: 0;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #2f6fad;
  cursor: pointer;
  text-decoration: underline;
}

.cookie-consent-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9999;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0));
  background: rgba(20, 40, 58, 0.97);
  color: #f5f8fc;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}

.cookie-consent-banner.hidden {
  display: none;
}

.cookie-consent-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-consent-text {
  flex: 1 1 280px;
}

.cookie-consent-text h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: #fff;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #d8e6f2;
}

.cookie-consent-text a {
  color: #7ec8ff;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.cookie-consent-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.cookie-consent-accept {
  background: linear-gradient(145deg, #5ec8ff, #48dda9);
  color: #10324a;
}

.cookie-consent-banner .ghost-btn {
  background: transparent;
  color: #d8e6f2;
  border: 2px solid #5a7a94;
}

@media (max-width: 720px) {
  .site-footer {
    font-size: 0.78rem;
  }

  .cookie-consent-actions {
    width: 100%;
  }

  .cookie-consent-actions .cookie-consent-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

.history-category {
  overflow: hidden;
  margin-bottom: 0.8rem;
  border: 3px solid #d7e8fb;
  border-radius: 18px;
  background: #fff;
}

.history-category-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  background: linear-gradient(135deg, #f1f9ff, #f8fff9);
  list-style: none;
}

.history-category-summary::-webkit-details-marker,
.school-year-report summary::-webkit-details-marker {
  display: none;
}

.history-category-summary h3,
.history-category-summary p {
  margin: 0;
}

.history-category-summary p {
  margin-top: 0.15rem;
  color: #60778e;
  font-size: 0.9rem;
}

.history-category-summary::after,
.school-year-report summary::after {
  content: "+";
  display: inline-grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: #dff3ff;
  color: #246b8a;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease;
}

.history-category[open] > .history-category-summary::after,
.school-year-report[open] > summary::after {
  content: "−";
  background: #dff8eb;
  color: #19704f;
  transform: rotate(180deg);
}

.history-category-content {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-top: 2px solid #e0edf9;
}

.school-year-history {
  margin-bottom: 0.8rem;
}

.school-year-archive-form {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) minmax(105px, 0.6fr) minmax(145px, 0.8fr);
  gap: 0.65rem;
  padding: 0.85rem;
  border: 2px solid #d8e9fb;
  border-radius: 18px;
  background: #f7fbff;
}

.school-year-archive-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
}

.school-year-archive-form .school-year-notes-field,
.school-year-archive-form button {
  grid-column: 1 / -1;
}

.school-year-archive-form button {
  justify-self: start;
}

.school-year-archive-list {
  display: grid;
  gap: 0.7rem;
}

.school-year-empty {
  color: #57718a;
  margin: 0;
}

.school-year-report {
  overflow: hidden;
  border: 3px solid #d7e8fb;
  border-radius: 18px;
  background: #fff;
}

.school-year-report summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  background: linear-gradient(135deg, #f5fbff, #f7fff9);
  list-style: none;
}

.school-year-report summary > span:first-of-type {
  display: inline-grid;
  flex: 1 1 auto;
  gap: 0.15rem;
}

.school-year-report summary small {
  color: #60778e;
}

.school-year-outcome {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.school-year-outcome-approved {
  background: #269c68;
}

.school-year-outcome-retained {
  background: #ce5858;
}

.school-year-report-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-top: 2px solid #e0edf9;
}

.school-year-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.school-year-kpis > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem;
  border-radius: 14px;
  background: #eef8ff;
}

.school-year-kpis span,
.school-year-subject-row small {
  color: #5e748a;
  font-size: 0.82rem;
}

.school-year-kpis strong {
  color: #117a60;
  font-size: 1.18rem;
}

.school-year-report-section {
  display: grid;
  gap: 0.55rem;
}

.school-year-report-section h4,
.school-year-period h5,
.school-year-report-section p {
  margin: 0;
}

.school-year-period {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 2px solid #e1ecf8;
  border-radius: 14px;
}

.school-year-subject-row,
.school-year-activity-row {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: center;
  padding-top: 0.45rem;
  border-top: 1px dashed #c9dcef;
}

.school-year-subject-row > div:first-child {
  display: grid;
}

.school-year-grade-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.school-year-grade-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #eaf7f1;
  color: #176d53;
  font-weight: 800;
}

.school-year-grade-chip small {
  color: #52776b;
  font-weight: 600;
}

.school-year-reopen-btn {
  justify-self: start;
}

@media (max-width: 700px) {
  .school-year-archive-form,
  .school-year-kpis {
    grid-template-columns: 1fr;
  }

  .school-year-subject-row,
  .school-year-activity-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-category-summary {
    align-items: flex-start;
  }

  .history-category-summary::after,
  .school-year-report summary::after {
    flex-basis: 1.8rem;
    width: 1.8rem;
    height: 1.8rem;
  }

  .school-year-grade-list {
    justify-content: flex-start;
  }
}

.captcha-wrap {
  grid-column: 1 / -1;
  min-height: 65px;
}

.captcha-wrap.hidden {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Visual Rabisco
   Caderno pautado, traço de caneta e cores de giz de cera.
   Esta camada cuida só da aparência: redefine as cores, bordas, sombras e
   fontes das regras acima, sem mudar a estrutura das telas.
   ========================================================================== */

:root {
  --paper: #fdfbf3;
  --rule: #d3e0f3;
  --ink: #1b2233;
  --ink-soft: #4a5265;
  --ink-line: rgba(27, 34, 51, 0.28);
  --card: #ffffff;
  --red: #dc2a26;
  --red-deep: #a01814;
  --red-soft: #ffd9d7;
  --blue: #1f6fd6;
  --blue-soft: #e3ecfb;
  --yellow: #ffd43b;
  --yellow-soft: #fff0b3;
  --note: #fff8d6;
  --marker: #ffe169;
  --green: #26803a;
  --green-ink: #1b5e20;
  --green-soft: #d9f2d9;
  --amber-ink: #5e4300;
  --track: #efefe8;
  --shade: #b9cdec;

  --crayon-red: repeating-linear-gradient(105deg, #dc2a26 0 6px, #e9524e 6px 8px);
  --crayon-blue: repeating-linear-gradient(105deg, #1f6fd6 0 6px, #4a8fe6 6px 8px);
  --crayon-green: repeating-linear-gradient(105deg, #2f9e44 0 6px, #4fb562 6px 8px);
  --crayon-yellow: repeating-linear-gradient(105deg, #ffd43b 0 6px, #ffe27a 6px 8px);

  --r-card: 16px 22px 14px 24px / 22px 14px 24px 16px;
  --r-sm: 12px 16px 10px 18px / 16px 10px 18px 12px;
  --r-btn: 10px 14px 9px 15px / 14px 9px 15px 10px;
  --r-input: 9px 12px 8px 13px / 12px 8px 13px 9px;
  --shadow-btn: 3px 4px 0 var(--ink);
  --shadow-btn-sm: 2px 3px 0 var(--ink);

  --accent: var(--red);
  --accent-2: var(--blue);
  --ok: var(--green);
  --warn: var(--red);
  --soft: var(--card);
  --stroke: var(--ink);
  --shadow: 4px 5px 0 var(--shade);
  --shadow-sm: 3px 3px 0 var(--shade);
  --wobble: var(--r-card);
}

/* ---------- Base ---------- */

html {
  font-size: 106.25%;
  /* As fontes manuscritas têm um peso só; sem isto o navegador engrossa o traço artificialmente. */
  font-synthesis-weight: none;
}

body,
body.kid-theme {
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.35;
  background: var(--paper) repeating-linear-gradient(transparent 0 27px, var(--rule) 27px 28px);
}

::selection {
  background: var(--marker);
  color: var(--ink);
}

.sky-deco {
  display: none;
}

h1,
h2,
h3,
h4,
h5,
legend,
th {
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: 0.01em;
}

strong,
b {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.06em;
  letter-spacing: 0.01em;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Campos ---------- */

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-input);
  padding: 0.5rem 0.7rem;
}

textarea {
  width: 100%;
  min-height: 3.2rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #858b9b;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 3px 3px 0 var(--shade);
}

input[type="file"] {
  border-style: dashed;
}

input[type="checkbox"],
input[type="radio"],
.form-grid .checkbox-row > input[type="checkbox"] {
  accent-color: var(--red);
}

.checkbox-row > input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0.15rem 0 0;
  padding: 0;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  box-shadow: none;
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.form-grid label,
.grade-period-form label,
.grade-period-form label span,
.school-year-archive-form label {
  font-weight: 400;
  color: var(--ink);
}

.invite-child-form input {
  border: 2px solid var(--ink);
  border-radius: var(--r-input);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--blue-soft);
}

.password-toggle:active {
  background: var(--shade);
}

/* ---------- Botões ---------- */

button {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: var(--r-btn);
  box-shadow: var(--shadow-btn);
  padding: 0.5rem 0.9rem;
}

button:hover {
  transform: translate(-1px, -1px);
  filter: none;
  box-shadow: 4px 5px 0 var(--ink);
}

button:active {
  transform: translate(2px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

button:disabled {
  opacity: 0.65;
}

.ghost-btn,
.google-login-btn,
.reject-btn,
.user-actions button {
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-btn);
  font-weight: 400;
}

.ghost-btn:hover,
.google-login-btn:hover {
  background: var(--card);
  box-shadow: 4px 5px 0 var(--ink);
}

.ghost-btn:active,
.google-login-btn:active {
  box-shadow: 1px 1px 0 var(--ink);
}

.reject-btn {
  color: var(--red-deep);
}

.approve-btn,
.pix-pay-btn {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.install-app-btn,
.grade-period-save-btn,
.history-load-more {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.history-load-more:hover {
  box-shadow: 4px 5px 0 var(--ink);
}

.history-load-more:active {
  box-shadow: 1px 1px 0 var(--ink);
}

.export-payroll-btn {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: var(--shadow-btn);
}

.danger-btn {
  background: var(--red-deep) !important;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-btn);
}

.link-btn,
.link-btn:hover,
.link-btn:active,
.forgot-btn,
.forgot-btn:hover,
.forgot-btn:active {
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  transform: none;
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn,
.link-btn:hover,
.link-btn:active {
  color: var(--blue);
}

.forgot-btn,
.forgot-btn:hover,
.forgot-btn:active {
  padding: 0.2rem 0.4rem;
  color: var(--ink);
  font-size: 1rem;
}

.install-modal-close,
.install-modal-close:hover,
.install-modal-close:active {
  padding: 0 0.3rem;
  box-shadow: none;
  transform: none;
  color: var(--ink);
  font-family: var(--font-body);
}

.install-modal-close:hover {
  color: var(--red);
}

.install-app-link {
  background: var(--yellow);
  border: 2px solid var(--ink);
  color: var(--ink);
  box-shadow: var(--shadow-btn-sm);
}

/* ---------- Abas ---------- */

.auth-menu-btn,
.menu-btn,
.child-mode-btn {
  padding: 0.5rem 0.45rem;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r-btn);
  box-shadow: 2px 3px 0 var(--shade);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.1;
}

.auth-menu-btn:hover,
.menu-btn:hover,
.child-mode-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 4px 0 var(--shade);
}

.auth-menu-btn:active,
.menu-btn:active,
.child-mode-btn:active {
  transform: translate(1px, 2px);
  box-shadow: 1px 1px 0 var(--shade);
}

.menu-btn-plus {
  background: var(--card);
  border-color: var(--ink);
}

.auth-menu-btn.active,
.menu-btn.active {
  background: var(--red);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 2px 3px 0 var(--shade);
  transform: none;
}

.child-mode-btn.active {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--ink);
}

/* Cada aba ocupa o espaço do próprio texto, em qualquer idioma. */
.auth-menu {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.auth-menu .auth-menu-btn {
  flex: 1 1 auto;
  min-width: 0;
}

.app-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.app-menu .menu-btn {
  flex: 1 1 auto;
  padding: 0.5rem 0.8rem;
}

/* ---------- Estrutura: o conteúdo fica direto na folha, os blocos viram cartões ---------- */

.panel {
  margin-top: 1.1rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-card h2,
.panel > h2,
.view-panel > h2 {
  margin: 0 0 0.7rem;
  font-size: 1.8rem;
  line-height: 1.1;
  color: var(--ink);
}

.auth-card,
.user-bar,
.dash-card,
.catalog-card,
.console-collapsible,
.history-category,
.school-year-report,
.plan-current-card,
.plan-card,
.summary-card,
.entry-card,
.kid-focus-card,
.kid-kpi,
.kpi-card,
.payroll-row,
.month-earnings-hero,
.pix-profile-panel,
.family-pix-panel,
.animal-avatar-field,
.legal-page,
#childSection .form-grid,
body.kid-theme #childSection .form-grid,
body.kid-theme #childSection .form-grid:last-of-type {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.kpi-card:nth-child(n),
.summary-card:nth-child(n) {
  background: var(--card);
  border-color: var(--ink);
}

.kpi-card,
.kid-kpi,
.entry-card,
.payroll-row,
.kid-focus-card,
.summary-card {
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
}

.dash-card:hover {
  box-shadow: 5px 7px 0 var(--shade);
}

.entry-card:hover {
  border-color: var(--ink);
}

.dashboard-grid,
.dashboard-kpis,
.summary-grid,
.card-list {
  gap: 0.9rem;
}

.dashboard-grid,
.dash-section-collapsible {
  margin-top: 0.9rem;
}

.card-help-text,
.catalog-subtitle,
.plan-section-subtitle,
.plan-footnote,
.school-year-empty,
.animal-avatar-hint,
.family-password-email,
.checkout-modal-hint {
  color: var(--ink-soft);
  font-weight: 400;
}

/* ---------- Entrada ---------- */

.hero {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.2rem 0 0;
  text-align: left;
  background: none;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  animation: none;
}

.hero::before {
  content: none;
}

.hero-mascot {
  width: 50px;
  height: 50px;
  font-size: 1.75rem;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 3px 0 var(--shade);
  animation: none;
}

.hero-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem 0.6rem;
}

.hero h1 {
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: none;
  white-space: nowrap;
}

.lang-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-weight: 400;
}

.lang-picker::before {
  content: "🌐";
  font-size: 1rem;
}

.lang-picker > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lang-picker select {
  min-width: 0;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: var(--card);
  font-size: 0.98rem;
}

.landing-showcase {
  margin-top: 0.9rem;
}

.landing-grid {
  grid-template-columns: 1fr;
  gap: 0.9rem;
  justify-items: center;
  text-align: center;
}

.finance-animation {
  width: min(100%, 320px);
}

.anim-stage {
  height: 200px;
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  background: #fff;
  transform: rotate(1.2deg);
}

/* O céu vira um arco-íris de giz de cera atrás do cofrinho. */
.anim-sky {
  inset: auto auto 24% 50%;
  width: 200px;
  height: 100px;
  margin-left: -100px;
  background: radial-gradient(
    circle 100px at 50% 100%,
    transparent 0 58px,
    #7a4fd3 58px 65px,
    #1f6fd6 65px 72px,
    #2f9e44 72px 79px,
    #ffd43b 79px 86px,
    #f08c00 86px 93px,
    #dc2a26 93px 100px,
    transparent 100px
  );
  opacity: 0.9;
}

.anim-sun {
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: none;
}

.anim-sun::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 3px dashed #f5b800;
  border-radius: 50%;
}

.anim-cloud,
.anim-cloud::before,
.anim-cloud::after {
  background: #a9c9f5;
  opacity: 1;
}

.anim-ground {
  height: 26%;
  border-radius: 55% 45% 0 0 / 16px 12px 0 0;
  background: repeating-linear-gradient(100deg, #63bf4f 0 5px, #4fae3c 5px 8px);
}

.anim-chart {
  bottom: 24%;
}

.anim-bar {
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 4px 5px 0 0;
}

.anim-bar-1 {
  background: var(--crayon-red);
}

.anim-bar-2 {
  background: var(--crayon-blue);
}

.anim-bar-3 {
  background: var(--crayon-green);
}

.anim-bar-4 {
  background: var(--crayon-yellow);
}

.anim-badge {
  background: #fff;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--shade);
  font-size: 0.8rem;
  font-weight: 400;
}

.anim-badge-2 {
  top: 34%;
  right: 6%;
}

.anim-piggy-slot {
  background: var(--ink);
}

/* A legenda continua disponível para leitores de tela como nome da ilustração. */
.anim-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.landing-copy h2 {
  margin: 0 0 0.3rem;
  font-size: 2.05rem;
  line-height: 1.08;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

.landing-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.3;
  text-wrap: balance;
}

.landing-features {
  gap: 0.1rem;
  margin-top: 1.1rem;
}

.landing-features li {
  padding: 0.15rem 0.2rem;
  background: none;
  border: 0;
  border-radius: 0;
  font-weight: 400;
  font-size: 1rem;
}

.auth-shell {
  margin-top: 1rem;
}

.auth-card {
  padding: 1.1rem 1rem 1rem;
}

.auth-or {
  color: var(--ink-soft);
  font-weight: 400;
}

.auth-or::before,
.auth-or::after {
  height: 1.5px;
  background: var(--ink-line);
}

.forgot-panel,
.plan-upsell-banner,
.install-modal-note,
.install-ios-hint {
  background: var(--note);
  border: 2px dashed var(--ink);
  border-radius: var(--r-sm);
  color: var(--ink);
}

.invite-preview,
.grade-period-preview {
  background: var(--blue-soft);
  border: 1.5px dashed var(--ink);
  border-radius: var(--r-sm);
  color: var(--ink);
}

.child-request-message-display,
.pix-payload-text {
  background: var(--paper);
  border: 1.5px dashed var(--ink);
  border-radius: var(--r-input);
  color: var(--ink);
}

.invite-result {
  background: var(--green-soft);
  border: 2px dashed var(--ink);
  border-radius: var(--r-sm);
}

.join-request-message {
  color: var(--ink);
}

.join-request-meta {
  color: var(--ink-soft);
}

#legalConsentHint {
  color: #7a5600;
  font-weight: 400;
}

#legalConsentHint.ready,
#privacyAcceptLabel a.legal-link-reviewed::after {
  color: var(--green);
}

.auth-legal-links a,
.site-footer-nav a {
  color: var(--ink);
  font-weight: 400;
  text-decoration: underline;
}

/* ---------- Topo do app ---------- */

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.app-brand .hero-mascot {
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
}

.app-brand-name {
  font-family: var(--font-head);
  font-size: 1.8rem;
  line-height: 1;
}

.user-bar {
  padding: 0.85rem 1rem;
}

.user-main {
  flex: 1 1 14rem;
  min-width: 0;
}

.user-main > div {
  min-width: 0;
}

.user-main .avatar {
  flex: 0 0 auto;
}

#userMeta,
.user-meta {
  overflow-wrap: anywhere;
}

.avatar,
.avatar.avatar-animal {
  width: 62px;
  height: 62px;
  border: 2px solid var(--ink);
  border-radius: 18px 22px 16px 24px / 22px 16px 24px 18px;
  box-shadow: 3px 3px 0 var(--shade);
}

.user-meta,
#userMeta {
  color: var(--ink-soft);
}

.family-chip {
  background: var(--yellow-soft);
  border: 1.5px dashed var(--ink);
  color: var(--ink);
  font-weight: 400;
}

.plan-badge {
  background: var(--blue-soft);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 400;
}

.plan-badge-plus {
  background: var(--yellow);
  border-color: var(--ink);
  color: var(--ink);
}

.user-actions button {
  padding: 0.4rem 0.75rem;
  font-size: 1.02rem;
  box-shadow: var(--shadow-btn-sm);
}

/* ---------- Dashboard ---------- */

.month-earnings-kicker {
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: 0;
}

.month-earnings-hero h3 {
  font-size: clamp(1.45rem, 3.6vw, 1.95rem);
  color: var(--ink);
}

.month-earnings-value {
  display: inline-block;
  margin: 0.3rem 0 0.15rem;
  padding: 0 0.45rem;
  font-size: clamp(3rem, 10vw, 4.6rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  text-shadow: none;
  background: linear-gradient(transparent 58%, var(--marker) 58%);
}

.month-earnings-kids span {
  background: var(--blue-soft);
  border: 0;
  color: var(--ink);
  font-weight: 400;
}

.balloon {
  border: 2px solid var(--ink);
}

.balloon::before {
  content: none;
}

.balloon::after {
  height: 24px;
  background: var(--ink);
}

.balloon-a {
  background: var(--red);
}

.balloon-b {
  background: var(--blue);
}

.balloon-c {
  background: #5fbf5a;
}

.balloon-d {
  background: var(--yellow);
}

.kpi-card {
  padding: 0.7rem 0.8rem;
}

.kpi-card:nth-child(odd) {
  transform: rotate(-0.5deg);
}

.kpi-card:nth-child(even) {
  transform: rotate(0.5deg);
}

.kpi-card:hover {
  transform: translateY(-2px);
}

.kpi-card .label {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 400;
}

.kpi-card .value {
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}

.kid-kpi {
  padding: 0.8rem 0.85rem;
  color: var(--ink);
}

.kid-kpi-icon {
  width: 44px;
  height: 44px;
  background: var(--yellow-soft);
  border: 2px solid var(--ink);
  box-shadow: none;
}

.kid-kpi-money .kid-kpi-icon,
.kid-kpi-month .kid-kpi-icon {
  background: var(--yellow);
}

.kid-kpi-mission .kid-kpi-icon {
  background: var(--red-soft);
}

.kid-kpi-grade .kid-kpi-icon {
  background: var(--blue-soft);
}

.kid-kpi-star .kid-kpi-icon {
  background: var(--green-soft);
}

.kid-kpi-title {
  color: var(--ink-soft);
  font-weight: 400;
}

.kid-kpi-value {
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.1;
}

.kid-focus-card h4 {
  font-size: 1.3rem;
}

.kid-progress-track,
.bar-track,
.compare-track,
.subject-strength-track {
  height: 16px;
  background: var(--track);
  border: 2px solid var(--ink);
  box-shadow: none;
}

.kid-progress-fill,
.subject-strength-low {
  background: var(--crayon-red);
}

.kid-progress-fill-blue,
.bar-fill {
  background: var(--crayon-blue);
}

.subject-strength-high {
  background: var(--crayon-green);
}

.subject-strength-mid {
  background: var(--crayon-yellow);
}

.kid-progress-meta,
.kid-mission-head,
.compare-label,
.subject-strength-label,
.mini-item {
  font-weight: 400;
}

.kid-pill {
  background: var(--yellow-soft);
  border: 0;
  box-shadow: none;
  color: var(--ink);
  font-weight: 400;
}

.kid-pill-blue {
  background: var(--blue-soft);
}

.dash-card {
  padding: 0.9rem 1rem;
}

.dash-card h3,
.app-collapsible-summary h3,
.history-category-summary h3 {
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--ink);
}

.dash-card h3 {
  border-bottom: 2px dashed var(--ink-line);
}

.mini-item {
  border-bottom: 2px dashed var(--ink-line);
}

.mini-item:last-child {
  border-bottom: 0;
}

.grades-table th,
.grades-table td {
  border-bottom: 2px dashed var(--ink-line);
}

.grades-table th {
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 1.05rem;
}

.grade-score {
  border: 1.5px solid var(--ink);
  box-shadow: none;
  font-family: var(--font-head);
  font-weight: 400;
}

.grade-score-low {
  background: var(--red);
}

.grade-score-mid {
  background: var(--yellow);
  color: var(--ink);
}

.grade-score-high {
  background: var(--green);
}

.subject-strength-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
}

.subject-strength-card p,
.grade-period-header span {
  color: var(--ink-soft);
  font-weight: 400;
}

.grade-period-header h4,
.grade-period-series h5 {
  color: var(--ink);
  font-size: 1.2rem;
}

.grade-period-series {
  border-top: 2px dashed var(--ink-line);
}

.payroll-row {
  padding: 0.65rem 0.75rem;
}

.summary-card h3 {
  font-size: 1.3rem;
}

.summary-value {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--ink);
}

/* ---------- Etiquetas de situação ---------- */

.paid-badge,
.pending-badge,
.status-pill,
.school-year-outcome,
.subject-strength-grade,
.subject-strength-missing {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  box-shadow: none;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.paid-badge,
.status-approved,
.school-year-outcome-approved,
.subject-strength-grade {
  background: var(--green-soft);
  color: var(--green-ink);
}

.pending-badge,
.status-pending,
.subject-strength-missing {
  background: var(--yellow-soft);
  color: var(--amber-ink);
}

.status-rejected,
.school-year-outcome-retained {
  background: var(--red-soft);
  color: var(--red-deep);
}

/* ---------- Lançamentos e consoles ---------- */

.entry-card {
  padding: 0.75rem 0.85rem;
}

.entry-title {
  font-size: 1.15rem;
}

.entry-meta {
  color: var(--ink-soft);
}

#childSection .form-grid,
body.kid-theme #childSection .form-grid,
body.kid-theme #childSection .form-grid:last-of-type {
  position: relative;
  margin-bottom: 1.2rem;
  padding: 1rem;
}

.catalog-admin {
  gap: 1rem;
}

.catalog-admin > h3 {
  font-size: 1.5rem;
  color: var(--ink);
}

.catalog-card {
  padding: 0.85rem;
}

.catalog-card::before {
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: none;
  color: var(--ink);
}

.card-invites::before,
.card-grade::before {
  background: var(--red-soft);
}

.card-grade-period::before,
.card-subject::before {
  background: var(--blue-soft);
}

.catalog-card h4 {
  font-size: 1.25rem;
}

.app-collapsible-summary::after,
.history-category-summary::after,
.school-year-report summary::after {
  background: var(--blue-soft);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 400;
}

.app-collapsible[open] > .app-collapsible-summary::after,
.history-category[open] > .history-category-summary::after,
.school-year-report[open] > summary::after {
  background: var(--yellow);
  color: var(--ink);
}

.app-collapsible-content,
.history-category-content,
.school-year-report-body {
  border-top: 2px dashed var(--ink-line);
}

/* Tabelas largas rolam dentro do próprio quadro, sem empurrar o cartão para fora da tela. */
.app-collapsible-content,
.history-category-content {
  grid-template-columns: minmax(0, 1fr);
}

.app-collapsible-content > *,
.history-category-content > *,
.dash-card > *,
.school-year-report-body > * {
  min-width: 0;
}

.history-category {
  margin-bottom: 1rem;
}

.history-category-summary,
.school-year-report summary {
  background: var(--card);
}

.history-category-summary p,
.school-year-report summary small,
.school-year-kpis span,
.school-year-subject-row small {
  color: var(--ink-soft);
}

.catalog-line,
.admin-row,
.school-grade-form,
.family-pix-form,
.family-password-form,
.school-year-period,
.school-year-archive-form,
.join-request-card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
}

.catalog-line:hover {
  background: var(--paper);
}

.catalog-line-main span {
  color: var(--ink-soft);
  font-weight: 400;
}

.catalog-line-main {
  flex: 1 1 auto;
  min-width: 0;
}

.catalog-line-main strong {
  font-size: 1.05rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.catalog-line-actions {
  flex: 0 0 auto;
  width: auto;
}

.catalog-line-actions button {
  flex: 0 0 auto;
  height: auto;
  padding: 0.25rem 0.65rem;
  font-size: 1rem;
  box-shadow: var(--shadow-btn-sm);
}

.catalog-line-actions button[data-action="edit"] {
  background: var(--blue);
}

.catalog-line-actions button[data-action="delete"] {
  color: var(--red-deep);
}

.admin-row input[readonly] {
  background: var(--blue-soft);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 400;
}

.school-grade-form-missing,
.join-request-card {
  background: var(--note);
  border-color: var(--ink);
}

.school-year-archive-form {
  background: var(--paper);
  border-style: dashed;
}

.school-year-kpis > div {
  background: var(--blue-soft);
  border-radius: var(--r-sm);
}

.school-year-kpis strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.school-year-subject-row,
.school-year-activity-row {
  border-top: 1.5px dashed var(--ink-line);
}

.school-year-grade-chip {
  background: var(--blue-soft);
  color: var(--ink);
  font-weight: 400;
}

.school-year-grade-chip small {
  color: var(--ink-soft);
  font-weight: 400;
}

/* ---------- Plano ---------- */

.plan-current-card,
.plan-card {
  padding: 0.95rem 1rem;
}

.plan-card-plus {
  background: var(--card);
  box-shadow: inset 0 0 0 3px var(--red), var(--shadow);
}

.plan-card h3 {
  font-size: 1.45rem;
  color: var(--ink);
}

.plan-price {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
}

.plan-features {
  padding-left: 0;
  list-style: none;
  color: var(--ink);
  font-size: 1rem;
}

.plan-features li {
  position: relative;
  padding-left: 1.4rem;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--red);
}

/* ---------- Perfil ---------- */

.pix-profile-panel,
.family-pix-panel {
  margin-top: 0.9rem;
  padding: 0.9rem;
}

.pix-profile-panel p,
.family-pix-panel p,
.family-password-panel p {
  color: var(--ink-soft);
}

.family-pix-form label {
  display: grid;
  gap: 0.25rem;
}

.family-pix-form input,
.family-pix-form select {
  width: 100%;
}

.pix-qr-preview {
  border: 2px dashed var(--ink);
  border-radius: var(--r-sm);
}

.pix-qr-preview canvas,
.pix-modal-card canvas {
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: none;
}

.family-school-grade-panel {
  margin-top: 1rem;
}

.family-password-panel {
  border-top: 2px dashed var(--ink-line);
}

.delete-account-panel {
  border-top: 2px dashed var(--red);
}

.delete-account-panel h3,
.delete-account-panel h4 {
  color: var(--red-deep);
}

.delete-child-row {
  border-bottom: 1.5px dashed var(--ink-line);
}

.animal-avatar-field {
  padding: 0.9rem;
}

.animal-avatar-field legend {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 400;
}

.animal-avatar-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: 2px 3px 0 var(--shade);
}

.animal-avatar-photo {
  border-radius: var(--r-input);
}

.animal-avatar-name {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 400;
}

.animal-avatar-option input:checked + .animal-avatar-card {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red), 3px 4px 0 var(--ink);
  transform: translateY(-2px) rotate(-1deg);
}

.animal-avatar-option input:focus-visible + .animal-avatar-card {
  outline: 3px solid var(--blue);
}

/* ---------- Janelas, avisos e rodapé ---------- */

.install-banner {
  background: linear-gradient(180deg, rgba(253, 251, 243, 0), rgba(253, 251, 243, 0.85) 18%, var(--paper) 40%);
}

.install-modal,
.pix-modal {
  background: rgba(27, 34, 51, 0.45);
  backdrop-filter: blur(2px);
}

.install-banner-content,
.install-modal-card,
.pix-modal-card,
.app-alert-card[data-type],
.delete-account-modal-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: 5px 6px 0 var(--shade);
}

.app-alert-card[data-type="error"],
.delete-account-modal-card {
  box-shadow: 5px 6px 0 #f1b3b1;
}

.app-alert-card[data-type="warning"] {
  box-shadow: 5px 6px 0 #ffe08a;
}

.app-alert-card[data-type="success"] {
  box-shadow: 5px 6px 0 #b4e0b4;
}

.install-banner-title,
.install-modal-title,
.install-modal-steps,
.pix-modal-card h3,
.pix-profile-panel h3,
.family-pix-panel h3 {
  color: var(--ink);
}

.install-modal-title,
.pix-modal-card h3 {
  font-size: 1.6rem;
  line-height: 1.1;
}

.install-banner-text,
.install-modal-intro,
.pix-modal-meta {
  color: var(--ink-soft);
}

.legal-document-frame {
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
}

.checkout-spinner {
  border-color: var(--blue-soft);
  border-top-color: var(--red);
}

.app-toast,
.app-toast.toast-info,
.app-toast.toast-success,
.app-toast.toast-error {
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r-btn);
  box-shadow: 3px 4px 0 var(--ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.3;
}

.app-toast.toast-success {
  background: var(--green-soft);
}

.app-toast.toast-error {
  background: var(--red-soft);
}

.site-footer {
  background: rgba(253, 251, 243, 0.96);
  border-top: 2px solid var(--ink);
  box-shadow: none;
  color: var(--ink-soft);
  backdrop-filter: none;
}

.cookie-consent-banner {
  background: var(--ink);
}

.cookie-consent-text h2 {
  font-size: 1.3rem;
}

.cookie-consent-text a {
  color: var(--marker);
}

.cookie-consent-btn,
.cookie-consent-btn:hover,
.cookie-consent-btn:active {
  border-radius: var(--r-btn);
  box-shadow: none;
  transform: none;
}

.cookie-consent-accept {
  background: var(--yellow);
  border: 2px solid var(--yellow);
  color: var(--ink);
}

.cookie-consent-banner .ghost-btn {
  background: transparent;
  border: 2px solid #c9d2e6;
  color: #fff;
}

/* Painel dos responsáveis: seis números em duas fileiras iguais no computador. */
@media (min-width: 721px) {
  #dashboardSection:not(.kid-mode) .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Páginas de Privacidade e Termos abertas direto: respiro nas laterais em telas estreitas. */
html:not(.embedded) body > article.legal-page {
  width: calc(100% - 1.5rem);
}

/* ---------- Telas pequenas ---------- */

@media (max-width: 480px) {
  .hero-mascot {
    width: 42px;
    height: 42px;
    font-size: 1.45rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-emoji,
  .lang-picker::before {
    display: none;
  }

  .lang-picker select {
    max-width: 7.4rem;
    font-size: 0.92rem;
  }

  .landing-copy h2 {
    font-size: 1.8rem;
  }

  .auth-menu-btn {
    padding: 0.5rem 0.25rem;
    font-size: 1rem;
  }

  .app-menu .menu-btn {
    flex: 1 1 calc(50% - 0.55rem);
  }

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

  .month-earnings-hero {
    padding-left: 2.2rem;
    padding-right: 2.2rem;
  }

  .balloon {
    transform: scale(0.5);
  }

  .balloon-a {
    top: -4px;
    left: -6px;
  }

  .balloon-b {
    top: -2px;
    right: -4px;
  }

  .balloon-c {
    bottom: 22px;
    left: -2px;
  }

  .balloon-d {
    bottom: 22px;
    right: -2px;
  }
}

/* Vale para qualquer bloco, inclusive os que definem "display" mais abaixo na folha. */
.hidden {
  display: none !important;
}

/* ==========================================================================
   Rabisco — telas iguais ao modelo aprovado
   As nove telas do app usam as classes "rb-" abaixo, com as medidas do
   modelo: coluna de celular, cartões de caneta, abas, linhas e etiquetas.
   ========================================================================== */

body.rb {
  padding-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.i {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.i.fill {
  fill: currentColor;
  stroke: none;
}

.i.sm {
  width: 14px;
  height: 14px;
}

/* ---------- Coluna e blocos ---------- */

.rb-shell {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 448px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 16px 22px;
  font-size: 16.5px;
  line-height: 1.32;
  color: var(--ink);
}

.rb-shell * {
  min-width: 0;
}

.rb-landing,
.rb-auth,
.rb-app,
.rb-view,
.rb-panel,
.rb-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rb-auth,
.rb-panel {
  flex: 1 1 auto;
}

.rb-view:empty,
.rb-hero:empty,
.rb-stats:empty,
.rb-stack:empty,
.rb-rows:empty,
.rb-chips:empty,
.rb-plan-current:empty {
  display: none;
}

/* O perfil ocupa a tela; a saudação aparece só no Dashboard. */
.rb-app[data-view="profile"] > .rb-view:not(#profileEditor),
.rb-app:not([data-view="dashboard"]) > .rb-greet {
  display: none;
}

/* O desenho e a frase de abertura ficam só na aba de login. */
body[data-auth-tab="register-parent"] .rb-intro,
body[data-auth-tab="child"] .rb-intro,
body[data-auth-tab="register-parent"] #authSection:not(.hidden) ~ .rb-footer,
body[data-auth-tab="child"] #authSection:not(.hidden) ~ .rb-footer {
  display: none;
}

.rb-shell h1,
.rb-shell h2,
.rb-shell h3,
.rb-shell h4,
.rb-shell legend {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
}

.rb-shell h1,
.rb-shell .rb-h1 {
  font-size: 35px;
  line-height: 1.05;
}

.rb-shell h2 {
  font-size: 28px;
  line-height: 1.1;
}

.rb-shell h3,
.rb-shell h4,
.rb-shell legend {
  font-size: 22px;
  line-height: 1.15;
}

.rb-shell h5 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.rb-shell p {
  margin: 0;
}

.rb-shell b,
.rb-shell strong {
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: 0;
}

.rb-shell code {
  font-family: var(--font-body);
  letter-spacing: 0.04em;
}

.rb-shell .rb-muted {
  color: var(--ink-soft);
}

.rb-small {
  font-size: 0.88em;
}

.rb-grow {
  flex: 1;
}

.rb-center {
  display: grid;
  gap: 6px;
  text-align: center;
}

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

.rb-stack,
.rb-form,
.rb-fold-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.rb-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}

.rb-two.flex {
  display: flex;
}

.rb-two.flex > * {
  flex: 1 1 0;
}

/* ---------- Topo ---------- */

.rb-appbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.rb-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
}

.rb-shell .rb-brand {
  margin: 0;
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.rb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.86em;
  cursor: pointer;
}

.rb-pill:focus-within {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.rb-shell .rb-lang select {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.rb-ava {
  box-sizing: border-box;
  display: block;
  flex: none;
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--card);
  object-fit: cover;
}

.rb-ava.letter {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 1;
}

.rb-ava.big {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.rb-ava.big.letter {
  font-size: 34px;
}

.rb-greet {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rb-greet-main {
  flex: 1;
}

.rb-greet-links {
  display: flex;
  flex: none;
  gap: 12px;
  padding-top: 8px;
}

/* ---------- Botões ---------- */

.rb-shell button {
  --bs: var(--shadow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: var(--r-btn);
  background: var(--red);
  box-shadow: var(--bs);
  color: #fff;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
  cursor: pointer;
}

.rb-shell button::before {
  content: none;
}

.rb-shell button:hover {
  transform: none;
  filter: none;
  box-shadow: var(--bs);
}

.rb-shell button:active {
  transform: translate(1px, 2px);
  box-shadow: var(--bs);
}

.rb-shell .rb-btn:not(.primary),
.rb-shell .ghost-btn {
  background: var(--card);
  color: var(--ink);
}

.rb-shell .rb-btn.sm,
.rb-shell .school-grade-inline button,
.rb-shell .invite-result button,
.rb-shell .join-request-actions button {
  --bs: var(--shadow-btn-sm);
  min-height: 34px;
  padding: 0 12px;
  font-size: 16.5px;
  white-space: nowrap;
}

.rb-shell .rb-link,
.rb-shell .link-btn {
  --bs: none;
  display: inline;
  align-self: center;
  justify-self: center;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.93em;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.rb-shell .rb-link:active,
.rb-shell .link-btn:active,
.rb-shell .rb-avabtn:active,
.rb-shell .password-toggle:active {
  transform: none;
}

.rb-shell .rb-link.danger {
  color: var(--red-deep);
}

.rb-shell .rb-iconbtn {
  --bs: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
}

.rb-shell .rb-avabtn {
  --bs: none;
  display: block;
  flex: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: none;
  line-height: 0;
}

/* ---------- Abas ---------- */

.rb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rb-shell .rb-tab {
  --bs: 2px 3px 0 var(--shade);
  flex: 1 1 auto;
  min-width: auto;
  min-height: 36px;
  padding: 0 6px;
  background: var(--card);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1;
  white-space: nowrap;
}

.rb-shell .rb-tab.active {
  background: var(--red);
  color: #fff;
}

.rb-app[data-view="profile"] #appMenu .rb-tab.active {
  background: var(--card);
  color: var(--ink);
}

/* ---------- Cartões ---------- */

.rb-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
}

.rb-card.feat {
  outline: 3px solid var(--red);
  outline-offset: -2px;
}

.rb-card.rb-note {
  background: var(--note);
}

/* Cartões levemente tortos, como colados à mão. */
.rb-view > .rb-card:nth-child(odd),
.rb-auth > .rb-card,
.rb-stack > .rb-card:nth-child(odd),
.rb-form > .rb-card:nth-child(odd),
.rb-catalog.is-open .rb-item:nth-child(odd) {
  transform: rotate(0.35deg);
}

.rb-view > .rb-card:nth-child(even),
.rb-panel > .rb-card,
.rb-stack > .rb-card:nth-child(even),
.rb-form > .rb-card:nth-child(even),
.rb-catalog.is-open .rb-item:nth-child(even) {
  transform: rotate(-0.4deg);
}

.rb-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rb-head h3,
.rb-head h4 {
  flex: 1;
}

summary.rb-head,
.rb-report > summary,
.rb-edit > summary,
.rb-danger > summary {
  list-style: none;
  cursor: pointer;
}

summary.rb-head::-webkit-details-marker,
.rb-report > summary::-webkit-details-marker,
.rb-edit > summary::-webkit-details-marker,
.rb-danger > summary::-webkit-details-marker {
  display: none;
}

.rb-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
}

.rb-ico.a2 {
  background: var(--blue);
  color: #fff;
}

.rb-ico.a3 {
  background: var(--yellow);
  color: var(--ink);
}

.rb-tog {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--ink);
}

.rb-tog .i {
  width: 15px;
  height: 15px;
}

details:not([open]) > summary .rb-tog .minus,
details[open] > summary .rb-tog .plus {
  display: none;
}

/* ---------- Campos ---------- */

.rb-field {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--ink);
  font-size: 1.04em;
  font-weight: 400;
}

.rb-shell input,
.rb-shell select,
.rb-shell textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: var(--r-input);
  background-color: var(--card);
  box-shadow: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.2;
}

.rb-shell input:focus,
.rb-shell select:focus,
.rb-shell textarea:focus {
  border-color: var(--blue);
  box-shadow: 3px 3px 0 var(--shade);
}

.rb-shell select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b2233' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px;
  appearance: none;
  -webkit-appearance: none;
}

.rb-shell textarea {
  min-height: 64px;
  padding: 9px 12px;
}

.rb-shell input[type="file"] {
  padding: 8px 10px;
  border-style: dashed;
  font-size: 16px;
}

.rb-shell input[type="checkbox"],
.rb-shell input[type="radio"] {
  width: auto;
  min-height: 0;
  padding: 0;
}

.rb-shell .password-field {
  position: relative;
  display: block;
}

.rb-shell .password-field input {
  padding-right: 42px;
}

.rb-shell .password-toggle {
  --bs: none;
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  transform: none;
}

.rb-shell .password-toggle:hover {
  background: var(--blue-soft);
}

.rb-shell .password-toggle[aria-pressed="true"] {
  color: var(--red);
}

.rb-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.86em;
}

.rb-or::before,
.rb-or::after {
  content: "";
  height: 1.5px;
  background: var(--ink-line);
}

.rb-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  font-size: 0.88em;
  line-height: 1.25;
}

.rb-check label {
  margin: 0;
  font-size: inherit;
}

.rb-check a {
  color: var(--ink);
}

.rb-shell .rb-check small {
  display: block;
  margin-top: 2px;
  font-size: 0.95em;
}

.rb-shell .rb-check input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--card) center / 13px no-repeat;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.rb-shell .rb-check input[type="checkbox"]:checked {
  border-color: var(--red);
  background-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.rb-shell .rb-check input[type="checkbox"]:disabled {
  border-style: dashed;
  opacity: 0.6;
  cursor: not-allowed;
}

.rb-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.rb-shell .rb-inline input {
  flex: 1 1 110px;
  width: auto;
}

.rb-shell .rb-inline button {
  flex: none;
}

.rb-shell .captcha-wrap {
  margin: 0;
}

.rb-shell .invite-preview,
.rb-shell .child-request-message-display {
  margin: 0;
  font-size: 0.95em;
}

/* ---------- Entrada ---------- */

.rb-art {
  align-self: center;
  width: 176px;
  height: 176px;
  margin: 4px 0 2px;
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(1.5deg);
}

.rb-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rb-shell .google-g {
  width: 18px;
  height: 18px;
}

.rb-legal {
  margin: auto 0 0;
  color: var(--ink-soft);
  font-size: 0.8em;
  text-align: center;
}

.rb-footer {
  padding-top: 4px;
}

.rb-footer .site-footer-nav {
  display: block;
  margin: 0;
  padding: 0;
}

.rb-shell .rb-legal a,
.rb-shell .rb-legal .link-btn {
  display: inline;
  color: inherit;
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 400;
  text-decoration: none;
}

.rb-shell .rb-legal a:hover,
.rb-shell .rb-legal .link-btn:hover {
  text-decoration: underline;
}

/* ---------- Dashboard ---------- */

.rb-hero {
  display: grid;
  gap: 8px;
  padding: 15px 16px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
}

.rb-shell .rb-hero-k,
.rb-shell .rb-hero-s {
  color: var(--ink-soft);
}

.rb-hero-v {
  justify-self: start;
  max-width: 100%;
  padding: 0 6px;
  background: linear-gradient(transparent 58%, var(--marker) 58%);
  font-family: var(--font-head);
  font-size: 54px;
  line-height: 1;
  white-space: nowrap;
}

.rb-hero-s {
  font-size: 0.88em;
}

.rb-bar {
  height: 12px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}

.rb-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--red);
}

.rb-bar.blue i {
  background: var(--blue);
}

.rb-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92em;
}

.rb-meter {
  display: grid;
  gap: 4px;
}

.rb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rb-stat {
  display: grid;
  align-content: center;
  gap: 2px;
  margin: 0;
  padding: 10px 6px;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.rb-shell .rb-stat b {
  font-family: var(--font-head);
  font-size: 22px;
  line-height: 1.1;
  white-space: nowrap;
}

.rb-shell .rb-stat b.long {
  font-size: 17px;
}

.rb-stat span {
  color: var(--ink-soft);
  font-size: 0.76em;
  line-height: 1.15;
}

/* No painel da criança, os dois cartões de progresso trazem o próprio título. */
.kid-mode .rb-compare > .rb-head {
  display: none;
}

.rb-compare > div:not(.rb-head) {
  display: grid;
  gap: 10px;
}

/* ---------- Linhas e etiquetas ---------- */

.rb-rows {
  display: grid;
}

.rb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1.5px dashed var(--ink-line);
}

.rb-rows > .rb-row:first-child {
  padding-top: 2px;
  border-top: 0;
}

.rb-rows > .rb-row:last-child {
  padding-bottom: 2px;
}

.rb-row .t {
  display: grid;
  flex: 1;
  gap: 1px;
}

.rb-shell .rb-row .t b,
.rb-shell .rb-row .v b {
  font-size: 1.04em;
}

.rb-row .t span {
  color: var(--ink-soft);
  font-size: 0.84em;
}

.rb-row .v {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
  white-space: nowrap;
}

.rb-row-actions {
  display: inline-flex;
  gap: 10px;
}

.rb-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 99px;
  background: var(--blue-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.86em;
  white-space: nowrap;
}

.rb-chip.ok {
  background: var(--green-soft);
  color: var(--green-ink);
}

.rb-chip.wait {
  background: var(--yellow-soft);
  color: var(--amber-ink);
}

.rb-chip.no {
  background: var(--red-soft);
  color: var(--red-deep);
}

.rb-chip.plan-badge-plus {
  background: var(--yellow);
}

#planBadge {
  cursor: pointer;
}

.rb-chips,
.rb-plan-current {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rb-chips .rb-chip,
.rb-plan-current .rb-chip {
  padding: 2px 9px;
  white-space: normal;
}

/* Lançamentos, folhas e relatórios: blocos separados por linha tracejada. */
.rb-entries,
.rb-reports {
  display: grid;
}

.rb-entry,
.rb-payroll,
.rb-report {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1.5px dashed var(--ink-line);
}

.rb-entry:first-child,
.rb-payroll:first-child,
.rb-report:first-child {
  padding-top: 2px;
  border-top: 0;
}

.rb-entry:last-child,
.rb-payroll:last-child,
.rb-report:last-child {
  padding-bottom: 2px;
}

.rb-entry > .rb-row,
.rb-payroll > .rb-row,
.rb-report > .rb-row {
  padding: 0;
  border: 0;
}

.rb-report[open] > summary {
  margin-bottom: 8px;
}

.rb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rb-edit[open] > .rb-form {
  margin-top: 8px;
}

/* ---------- Console dos Filhos: "Gerenciar" ---------- */

.rb-catalog-items {
  display: grid;
}

.rb-item {
  padding: 9px 0;
  border-top: 1.5px dashed var(--ink-line);
}

.rb-item:first-child {
  padding-top: 2px;
  border-top: 0;
}

.rb-item:last-child {
  padding-bottom: 2px;
}

.rb-item > summary .rb-ico {
  display: none;
}

.rb-shell .rb-item > summary h4 {
  font-family: var(--font-body);
  font-size: 1.04em;
  line-height: 1.32;
}

.rb-item > .rb-fold-body {
  margin-top: 10px;
}

/* Com algum item aberto, cada item vira um cartão com o próprio ícone. */
.rb-catalog.is-open {
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  transform: none;
}

.rb-catalog.is-open .rb-catalog-items {
  gap: 12px;
}

.rb-catalog.is-open .rb-item {
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
}

.rb-catalog.is-open .rb-item > summary .rb-ico {
  display: grid;
}

.rb-shell .rb-catalog.is-open .rb-item > summary h4 {
  font-family: var(--font-head);
  font-size: 22px;
  line-height: 1.15;
}

/* ---------- Plano ---------- */

.rb-price {
  font-family: var(--font-head);
  font-size: 34px;
  line-height: 1;
}

.rb-ticks {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rb-ticks li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rb-ticks .i {
  color: var(--red);
}

/* ---------- Perfil ---------- */

.rb-fieldset {
  min-width: 0;
}

.rb-fieldset legend {
  float: left;
  width: 100%;
  padding: 0;
}

.rb-pets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.rb-pet {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.rb-pet img {
  box-sizing: border-box;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 16px;
  object-fit: cover;
}

.rb-shell .rb-pet input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.rb-pet input:checked + img {
  outline: 3.5px solid var(--red);
  outline-offset: 2px;
}

.rb-pet input:focus-visible + img {
  outline: 3.5px solid var(--blue);
  outline-offset: 2px;
}

.rb-pix-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 12px;
}

.rb-pix-grid .pix-type {
  grid-area: 1 / 1;
}

.rb-pix-grid .pix-key {
  grid-area: 2 / 1;
}

.rb-pix-grid .pix-name {
  grid-area: 3 / 1 / auto / -1;
}

.rb-pix-grid .pix-city {
  grid-area: 4 / 1 / auto / -1;
}

.rb-pix-qr {
  display: contents;
}

.rb-pix-qr canvas {
  box-sizing: border-box;
  grid-area: 1 / 2 / span 2 / auto;
  align-self: end;
  width: 96px;
  height: 96px;
  padding: 7px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
}

.rb-pix-qr button {
  grid-area: 5 / 1 / auto / -1;
}

.rb-danger > summary {
  text-align: center;
}

.rb-danger[open] > .rb-card {
  margin-top: 10px;
}

/* ---------- Tutorial passo a passo ---------- */

.tour-root {
  position: fixed;
  inset: 0;
  z-index: 2400;
  /* Só o cartão captura toque; o formulário de trás continua preenchível. */
  pointer-events: none;
}

.tour-scrim {
  display: none;
}

.tour-card {
  position: fixed;
  left: 50%;
  top: calc(0.55rem + env(safe-area-inset-top, 0));
  bottom: auto;
  z-index: 2;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 1.5rem));
  max-height: min(42vh, 280px);
  overflow: auto;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: var(--font-body);
  transform: translateX(-50%);
  pointer-events: auto;
}

.tour-card.tour-card-bottom {
  top: auto;
  bottom: calc(0.7rem + env(safe-area-inset-bottom, 0));
}

.tour-step {
  margin: 0 0 0.2rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.tour-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-head);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.1;
}

.tour-text {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.35;
}

.tour-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
}

.tour-actions .rb-btn {
  min-width: 5.5rem;
}

.tour-target {
  position: relative !important;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--yellow), 4px 5px 0 var(--shade) !important;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  background: var(--card);
  animation: tour-pulse 1.4s ease-in-out infinite;
  pointer-events: auto !important;
  /* Reserva espaço sob o cartão do guia no topo da tela. */
  scroll-margin-top: 170px;
  scroll-margin-bottom: 24px;
}

.tour-target input,
.tour-target select,
.tour-target textarea,
.tour-target button,
.tour-target label,
.tour-target summary {
  pointer-events: auto !important;
}

@keyframes tour-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px var(--yellow), 4px 5px 0 var(--shade);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 212, 59, 0.55), 4px 5px 0 var(--shade);
  }
}

/* O guia não trava a rolagem: a pessoa precisa subir e descer para preencher. */
body.tour-open {
  overflow: auto;
}

.rb-tour-replay {
  margin-top: 0.2rem;
}

.rb-payroll-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.rb-payroll-actions .pix-pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.rb-payroll-actions .pix-pay-btn .i {
  width: 1em;
  height: 1em;
}

.pix-pay-btn-disabled,
.rb-btn.pix-pay-btn-disabled:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background: #f3f0e8;
  color: #6b5c4a;
  border: 2px dashed var(--ink-line, #13354d);
  box-shadow: none;
}

.rb-payment-day {
  margin: 0 0 14px;
}

.rb-payment-day.hidden {
  display: none;
}

.rb-payment-day-inner {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 2.5px solid var(--ink, #13354d);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 236, 210, 0.88)),
    repeating-linear-gradient(
      -8deg,
      transparent,
      transparent 10px,
      rgba(19, 53, 77, 0.03) 10px,
      rgba(19, 53, 77, 0.03) 11px
    );
  box-shadow: 4px 5px 0 var(--shade, #c9b79a);
}

.rb-payment-day-k {
  margin: 0;
  font-family: var(--font-head, inherit);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--red-deep, #c0392b);
}

.rb-payment-day-v {
  margin: 0;
  font-family: var(--font-head, inherit);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ink, #13354d);
}

.rb-payment-day-s {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #3a5f82;
}

.rb-payment-day-inner .pix-pay-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
