:root {
  --ink: #12224f;
  --muted: #687083;
  --cream: #fffaf2;
  --paper: #fffefd;
  --coral: #ff685f;
  --coral-dark: #f35351;
  --peach: #ff9a72;
  --yellow: #ffc33f;
  --mint: #59c69e;
  --sky: #67c9da;
  --lilac: #9a7bd8;
  --line: #eee3d6;
  --shadow: 0 10px 30px rgba(95, 63, 38, 0.09), 0 2px 7px rgba(95, 63, 38, 0.06);
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--cream); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 70% 0%, rgba(255, 215, 124, .12), transparent 32%),
    #fffaf3;
}

body.auth-pending { overflow: hidden; }
body.auth-pending .app-shell { visibility: hidden; }
body.authenticated .auth-gate { display: none; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 30px 18px;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 198, 58, .18), transparent 24%),
    radial-gradient(circle at 88% 82%, rgba(154, 123, 216, .16), transparent 26%),
    #fffaf3;
}
.auth-card {
  width: min(100%, 470px);
  padding: 29px 36px 34px;
  border: 1px solid #ebddce;
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(92, 61, 35, .14);
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--ink);
  font: 700 28px/.85 "Baloo 2", cursive;
}
.auth-brand img { width: 65px; height: 72px; object-fit: contain; margin-right: -2px; }
.auth-brand span { display: flex; flex-direction: column; }
.auth-brand strong { color: var(--coral); font-size: 32px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  margin-bottom: 25px;
  border-radius: 15px;
  background: #f7f2ec;
}
.auth-tabs button {
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #81838d;
  font-weight: 800;
}
.auth-tabs button.active {
  background: #fff;
  color: var(--coral);
  box-shadow: 0 4px 12px rgba(91, 62, 37, .09);
}
.auth-form[hidden] { display: none; }
.auth-heading { margin-bottom: 19px; text-align: center; }
.auth-heading > span {
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: #9b7d6c;
  font-size: 10px;
  font-weight: 900;
}
.auth-heading h1 { margin: 1px 0 2px; font: 800 29px/1.1 "Baloo 2", cursive; }
.auth-heading p { margin: 0; color: #747987; font-size: 13px; }
.auth-form > label { display: block; margin: 13px 0; }
.auth-form > label > span {
  display: block;
  margin: 0 0 5px 3px;
  color: #525865;
  font-size: 12px;
  font-weight: 800;
}
.auth-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #e6dcd2;
  border-radius: 13px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.auth-form input:focus {
  border-color: #f29a91;
  box-shadow: 0 0 0 4px rgba(255, 104, 95, .1);
}
.auth-submit {
  width: 100%;
  height: 51px;
  margin-top: 5px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff746d, #ff5e56);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(244, 79, 71, .24);
}
.auth-submit:disabled { cursor: wait; opacity: .65; }
.auth-error {
  min-height: 19px;
  margin: 4px 0;
  color: #d94747;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.auth-privacy { margin: 3px 0 8px; color: #838793; text-align: center; font-size: 11px; }
.language-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #e7ddd3;
  border-radius: 12px;
  background: rgba(255, 255, 255, .88);
}
.language-switch button {
  min-width: 37px;
  height: 29px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #858792;
  font-size: 10px;
  font-weight: 900;
}
.language-switch button.active { background: var(--ink); color: #fff; }
.auth-language { position: absolute; top: 22px; right: 25px; }

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
svg { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  padding: 45px 20px 30px;
  background: rgba(255, 253, 248, .93);
  border-right: 1px solid #eadfd2;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  min-height: 195px;
}

.brand-copy {
  position: relative;
  z-index: 2;
  font-family: "Baloo 2", cursive;
  font-size: 34px;
  font-weight: 700;
  line-height: .88;
  text-align: center;
  letter-spacing: .5px;
}

.brand-copy strong {
  display: block;
  color: var(--coral);
  font-size: 40px;
}

.brand-giraffe {
  position: relative;
  width: 91px;
  height: 105px;
  margin-bottom: -18px;
}

.brand-giraffe img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 2px rgba(106, 67, 24, .12));
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.account-menu {
  position: absolute;
  z-index: 3;
  left: 17px;
  right: 17px;
  bottom: 118px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 29px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #eadfd3;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 6px 14px rgba(91, 62, 37, .06);
}
#account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffe7e0;
  color: var(--coral);
  font: 800 16px "Baloo 2";
}
.account-menu > div { min-width: 0; display: flex; flex-direction: column; }
.account-menu strong, .account-menu small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu strong { font-size: 11px; }
.account-menu small { color: #8a8d96; font-size: 8px; }
#logout-button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 9px;
  background: #fff1ee;
  color: var(--coral);
}
#logout-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-language { position: absolute; z-index: 4; left: 74px; bottom: 78px; }

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  height: 66px;
  padding: 0 14px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--ink);
  font-weight: 800;
  font-size: 17px;
  transition: .22s ease;
}

.nav-item:hover { transform: translateX(3px); background: rgba(255,255,255,.75); }
.nav-item.active {
  color: var(--coral-dark);
  background: #fffaf5;
  border-color: #f1d5c5;
  box-shadow: 0 7px 16px rgba(103, 65, 31, .09);
}

.nav-icon, .round-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.05);
}
.nav-icon svg, .round-icon svg {
  width: 23px; height: 23px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.coral { background: var(--coral); }
.lilac { background: var(--lilac); }
.yellow { background: #ffbd27; }
.mint { background: #59c5a1; }

.sidebar-garden {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 165px;
  pointer-events: none;
}
.hill { position: absolute; bottom: -50px; border-radius: 50% 50% 0 0; }
.hill-a { width: 175px; height: 128px; left: -45px; background: #b9d993; transform: rotate(8deg); }
.hill-b { width: 190px; height: 100px; right: -80px; background: #f7d989; transform: rotate(-8deg); }
.leaf {
  position: absolute; width: 28px; height: 75px; bottom: 54px;
  background: #9bc48a; border-radius: 100% 0 100% 0; transform-origin: bottom;
}
.leaf-a { left: 15px; transform: rotate(-25deg); }
.leaf-b { left: 46px; bottom: 40px; transform: rotate(10deg); background: #7db47b; }
.leaf-c { left: 72px; bottom: 38px; transform: rotate(35deg); background: #b3d39a; }
.tiny-flower { position: absolute; left: 22px; bottom: 33px; color: white; font-size: 30px; text-shadow: 0 1px 2px #b78950; }

.dashboard {
  min-width: 0;
  padding: 32px 38px 42px;
  max-width: 1540px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  min-height: 128px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 8px 14px 0;
}
.eyebrow, .section-kicker, .small-card-heading > div > span {
  margin: 0 0 2px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: #9b7d6c;
  font-size: 11px;
  font-weight: 800;
}
.page-header h1 {
  margin: 0;
  font: 800 48px/1.08 "Baloo 2", cursive;
  letter-spacing: -.8px;
}
.page-header h1 span { color: #ff8e88; font-size: 23px; vertical-align: top; }
.page-header p:not(.eyebrow) { margin: 0; color: #626879; font-size: 20px; }

.sky-scene { position: relative; width: 310px; height: 116px; }
.sky-scene img {
  position: absolute;
  width: 330px;
  height: 165px;
  right: -8px;
  top: -25px;
  object-fit: contain;
  filter: drop-shadow(0 6px 4px rgba(81,64,50,.11));
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(450px, .96fr) minmax(550px, 1.1fr);
  gap: 18px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: .88fr 1fr 1.06fr;
  gap: 18px;
  margin-top: 18px;
}

.dashboard[data-view="medidas"] .bottom-grid {
  grid-template-columns: minmax(320px, 620px);
}
.dashboard[data-view="medidas"] .streak-card,
.dashboard[data-view="medidas"] .achievement-card,
.dashboard[data-view="medidas"] .achievement-placeholder {
  display: none;
}
.dashboard[data-view="conquistas"] .top-grid,
.dashboard[data-view="conquistas"] .history-card {
  display: none;
}
.dashboard[data-view="conquistas"] .bottom-grid {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  max-width: 920px;
  margin-top: 0;
}
.dashboard[data-view="conquistas"] .achievement-placeholder:not([hidden]) {
  display: flex;
}

.card {
  background: rgba(255, 255, 255, .93);
  border: 1px solid #eee1d3;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.measure-card, .chart-card { min-height: 393px; padding: 25px 28px 22px; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.card h2 {
  margin: 0;
  font: 800 27px/1.12 "Baloo 2", cursive;
  letter-spacing: -.25px;
}
.mini-star { color: #ff8f8c; font-size: 28px; transform: rotate(13deg); }
.measure-content { display: grid; grid-template-columns: minmax(235px, .84fr) minmax(210px, .72fr); height: 305px; }
.measure-form { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-right: 12px; }
.height-input-wrap { display: flex; align-items: baseline; color: var(--coral); }
.height-input-wrap input {
  width: 205px; border: 0; outline: 0; padding: 0;
  background: transparent; color: var(--coral);
  font: 700 70px/1 "Baloo 2", cursive; letter-spacing: -4px;
  appearance: textfield;
}
.height-input-wrap input::placeholder { color: #f3b2aa; opacity: .72; }
.height-input-wrap input::-webkit-inner-spin-button { display: none; }
.height-input-wrap span { font: 700 24px "Baloo 2", cursive; }
.date-control {
  margin-top: 18px; width: 100%; height: 48px; display: flex; align-items: center; gap: 10px;
  border: 1px solid #e9ddd0; border-radius: 14px; padding: 0 15px; background: #fff;
}
.date-control svg { width: 20px; height: 20px; fill: none; stroke: #5c6070; stroke-width: 1.8; }
.date-control input { border: 0; outline: 0; width: 100%; color: #525765; background: transparent; }
.save-button {
  border: 0; width: 100%; height: 55px; border-radius: 15px; margin-top: 18px;
  background: linear-gradient(180deg, #ff746d, #ff5e56); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 11px;
  font-weight: 800; font-size: 17px;
  box-shadow: 0 8px 15px rgba(244, 79, 71, .26), inset 0 -3px 0 rgba(205,55,50,.12);
  transition: transform .2s, box-shadow .2s;
}
.save-button:hover { transform: translateY(-2px); box-shadow: 0 11px 19px rgba(244,79,71,.31); }
.save-button:active { transform: translateY(1px); }
.save-button svg { width: 23px; height: 23px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ruler-scene { position: relative; min-width: 220px; height: 100%; overflow: hidden; }
.ruler-asset {
  position: absolute;
  z-index: 3;
  width: 246px;
  height: 360px;
  left: -5px;
  bottom: -27px;
  object-fit: contain;
  filter: drop-shadow(0 4px 3px rgba(107, 68, 26, .11));
}
.marker-line {
  position: absolute; z-index: 7; top: 90px; left: 18px; right: 6px;
  border-top: 2px dashed var(--coral);
}
.marker-line.is-empty { opacity: 0; }
.marker-line span {
  position: absolute; top: -16px; left: -12px; padding: 5px 8px;
  border-radius: 10px; color: white; background: var(--coral);
  font-size: 12px; font-weight: 800; box-shadow: 0 3px 5px rgba(131,45,41,.18);
}

.chart-card { position: relative; overflow: hidden; }
.chart-heading { align-items: center; }
.chart-heading select {
  border: 1px solid #e8ded5; background: #fff; border-radius: 12px; color: #555c68;
  height: 39px; padding: 0 38px 0 14px; outline: none;
}
.chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  min-height: 20px;
  margin: 2px 3px -5px 0;
  color: #747a89;
  font-size: 10px;
  font-weight: 800;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend b { font: inherit; }
.legend-line { width: 22px; height: 0; border-top: 3px solid var(--coral); border-radius: 4px; }
.legend-line.who-line { border-top-color: var(--lilac); border-top-style: dashed; }
.chart-wrap { position: relative; height: 250px; margin-top: 2px; }
#growth-chart { width: 100%; height: 100%; overflow: visible; }
.grid-lines path { stroke: #e9e8e5; stroke-width: 1; stroke-dasharray: 4 4; }
.axis-labels text { font: 13px "Nunito", sans-serif; fill: #7e8490; }
.chart-area { fill: url(#areaGradient); }
.reference-line {
  fill: none;
  stroke: var(--lilac);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 7;
  opacity: .88;
}
.chart-line { fill: none; stroke: url(#lineGradient); stroke-width: 4; stroke-linecap: round; }
.chart-dots circle { fill: #fff; stroke: var(--sky); stroke-width: 4; }
.chart-dots circle:nth-child(-n+4) { stroke: var(--lilac); }
.chart-dots circle:nth-child(n+8):nth-child(-n+12) { stroke: #9bc27f; }
.chart-dots circle:nth-child(n+13):nth-child(-n+14) { stroke: #f7ad28; }
.chart-dots circle:nth-child(n+15) { stroke: var(--coral); }
.chart-bubble {
  position: absolute; left: 92%; top: 20px; background: var(--coral); color: white;
  border-radius: 12px; padding: 7px 10px; font-weight: 800; box-shadow: 0 5px 10px rgba(221,72,65,.22);
  transform: translate(-50%, -115%);
  white-space: nowrap;
}
.chart-bubble::after { content: ""; position: absolute; bottom: -6px; right: 16px; border: 7px solid transparent; border-top-color: var(--coral); border-bottom: 0; }
.chart-summary {
  position: absolute; left: 30px; right: 30px; bottom: 18px; height: 48px;
  border-top: 1px solid #f0e8df; display: flex; align-items: center; gap: 10px; padding-top: 12px;
}
.chart-summary.is-empty { color: #858a96; }
.alice-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ffe7e0; color: var(--coral); font: 800 17px "Baloo 2"; }
.chart-summary div { display: flex; flex-direction: column; }
.chart-summary strong { color: var(--coral-dark); line-height: 1; }
.chart-summary small { color: #828795; font-size: 11px; }
.trend-pill { margin-left: auto; background: #e8f7ef; color: #338761; border-radius: 16px; padding: 6px 10px; font-size: 11px; font-weight: 800; }
.chart-empty {
  position: absolute;
  inset: 22px 20px 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #858a96;
}
.chart-empty[hidden] { display: none; }
.chart-empty span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 9px;
  border-radius: 50%;
  background: #f6f0fb;
  color: var(--lilac);
  font-size: 28px;
}
.chart-empty strong { color: #5e6473; font: 700 17px "Baloo 2"; }
.chart-empty small { margin-top: 2px; }

.history-card, .streak-card, .achievement-card { min-height: 385px; padding: 22px 20px 18px; position: relative; }
.small-card-heading { display: flex; align-items: center; gap: 12px; }
.small-card-heading h2 { font-size: 23px; }
.round-icon { width: 43px; height: 43px; }
.coral-soft { color: var(--coral); background: #ffe4df; }
.mint-soft { color: var(--mint); background: #e3f5e9; }

.measure-list { list-style: none; margin: 17px 0 10px; padding: 0; }
.measure-list li {
  display: grid; grid-template-columns: 15px 1fr auto 25px; align-items: center; gap: 8px;
  min-height: 42px; border-bottom: 1px solid #eee8e2; font-size: 13px;
}
.measure-list li strong { font-size: 13px; color: var(--coral); }
.measure-list li:nth-child(2) strong { color: #ed9c26; }
.measure-list li:nth-child(3) strong { color: #5aa461; }
.measure-list li:nth-child(4) strong { color: #4ba9c7; }
.measure-list li:nth-child(5) strong { color: #8c6acc; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.coral-dot { background: var(--coral); }.orange-dot { background: #f0a129; }.green-dot { background: #80b56d; }
.blue-dot { background: #62b7d2; }.purple-dot { background: #9774d4; }
.delete-measure {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #aaa7ad;
  font-size: 18px;
  line-height: 1;
}
.delete-measure:hover { color: var(--coral); background: #fff0ed; }
.history-empty {
  min-height: 225px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8a8e99;
}
.history-empty[hidden] { display: none; }
.history-empty span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #fff0ec;
  color: var(--coral);
  font-size: 21px;
}
.history-empty strong { color: #626775; font: 700 17px "Baloo 2"; }
.history-empty small { font-size: 12px; }
.ghost-button {
  width: 100%; height: 42px; border: 1px solid #e4d6ee; border-radius: 12px;
  background: #fff; color: #7653ad; font-weight: 700; font-size: 13px;
  display: flex; justify-content: center; align-items: center; gap: 20px;
}
.ghost-button[hidden] { display: none; }
.ghost-button span { font-size: 22px; line-height: 1; }

.calendar-head { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 8px; }
.calendar-head button { border: 0; background: transparent; font-size: 25px; padding: 0 10px; }
.calendar-head strong { font-size: 13px; color: #59606e; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(28px, 1fr)); gap: 7px 5px; text-align: center; align-items: center; }
.calendar span {
  display: grid;
  place-items: center;
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  height: 26px;
  min-height: 26px;
  aspect-ratio: 1 / 1;
  justify-self: center;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}
.calendar .weekday { font-size: 8px; width: 100%; max-width: none; height: 14px; min-height: 14px; aspect-ratio: auto; color: #838997; font-weight: 800; }
.calendar .muted { color: #c9c8c6; }
.calendar .checked { border-radius: 50%; background: #79b66c; color: transparent; position: relative; }
.calendar .checked::after { content: "✓"; position: absolute; color: white; font-weight: 900; font-size: 13px; }
.calendar .today { border-radius: 50%; background: var(--coral); color: white; font-weight: 800; box-shadow: 0 3px 7px rgba(229,72,65,.25); }
.calendar .today.checked { background: var(--coral); }
.encouragement {
  position: absolute; left: 20px; right: 20px; bottom: 17px; height: 45px;
  display: flex; justify-content: center; align-items: center; gap: 4px;
  border: 1px solid #cce7c9; border-radius: 13px; background: #f0faed; color: #348352; font-size: 11px;
}
.encouragement span { color: var(--mint); font-size: 22px; margin-right: 8px; }

.achievement-card {
  overflow: hidden; text-align: center; background:
    radial-gradient(circle at 50% 42%, rgba(255,222,109,.22), transparent 28%),
    linear-gradient(145deg, #f7efff, #eee4ff);
  border-color: #e5d5f0;
}
.achievement-card[hidden] { display: none; }
.bottom-grid.without-achievement { grid-template-columns: 1fr 1fr; }
.achievement-placeholder {
  display: none;
  min-height: 385px;
  padding: 35px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 208, 77, .18), transparent 28%),
    linear-gradient(145deg, #faf5ff, #f1e9fb);
  border-color: #e5d5f0;
}
.achievement-placeholder .placeholder-star {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 14px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(145deg, #ffd662, #ffb92e);
  font-size: 39px;
  transform: rotate(-5deg);
  box-shadow: 0 9px 18px rgba(205, 143, 30, .2);
}
.achievement-placeholder h2 { font-size: 25px; }
.achievement-placeholder p {
  max-width: 330px;
  margin: 5px 0 22px;
  color: #777b89;
  line-height: 1.5;
}
.achievement-placeholder button {
  min-height: 45px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 7px 15px rgba(244, 79, 71, .24);
}
.close-achievement {
  position: absolute; right: 12px; top: 12px; z-index: 8;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d7cce4;
  background: rgba(255,255,255,.84); color: #747085; font-size: 20px; line-height: 1;
}
.achievement-kicker { font: 800 21px "Baloo 2", cursive; }
.badge-scene { position: relative; width: 232px; height: 176px; margin: 1px auto -10px; }
.badge-scene img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 7px 5px rgba(109, 70, 22, .12));
}
.confetti i { position: absolute; font-style: normal; }
.confetti i:nth-child(1) { top: 65px; left: 32px; color: #f9c62e; font-size: 25px; transform: rotate(-12deg); }
.confetti i:nth-child(2) { top: 110px; left: 26px; color: #6dc397; }
.confetti i:nth-child(3) { top: 160px; left: 45px; color: #ff836e; }
.confetti i:nth-child(4) { top: 66px; right: 31px; color: #f9c62e; font-size: 23px; transform: rotate(13deg); }
.confetti i:nth-child(5) { top: 130px; right: 24px; color: #60c5be; }
.confetti i:nth-child(6) { top: 174px; right: 42px; color: #ff836e; }
.achievement-copy {
  position: relative; z-index: 5; width: 195px; min-height: 98px; margin: 0 auto;
  padding: 9px 10px 7px; border-radius: 15px; background: white; color: #704cb0;
  display: flex; flex-direction: column; box-shadow: 0 7px 15px rgba(91,58,126,.18);
}
.achievement-copy span { font: 700 17px/1 "Baloo 2"; }
.achievement-copy strong { font: 800 39px/.96 "Baloo 2"; }
.achievement-copy b { font: 800 18px/1 "Baloo 2"; }

.toast {
  position: fixed; z-index: 50; right: 28px; bottom: 25px; min-width: 310px;
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  border-radius: 16px; background: #17375b; color: white; box-shadow: 0 12px 30px rgba(23,55,91,.28);
  transform: translateY(120px); opacity: 0; pointer-events: none; transition: .35s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); color: white; }
.toast div { display: flex; flex-direction: column; }
.toast small { color: #d8e6f0; }

@media (max-width: 1230px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .dashboard { padding: 28px 24px 35px; }
  .top-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr 1fr; }
  .achievement-card { grid-column: 1 / -1; min-height: 365px; }
  .measure-card, .chart-card { min-height: 405px; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar {
    position: sticky; width: 100%; height: 76px; padding: 8px 14px;
    border-right: 0; border-bottom: 1px solid #eadfd2;
    flex-direction: row; align-items: center; justify-content: space-between;
  }
  .brand { min-height: 0; width: 140px; flex-direction: row; align-items: center; }
  .brand-giraffe { transform: scale(.55); width: 46px; height: 65px; margin: 0 -4px 0 -11px; }
  .brand-copy { font-size: 19px; text-align: left; line-height: .78; }
  .brand-copy strong { font-size: 22px; }
  .main-nav { margin: 0; flex-direction: row; gap: 4px; }
  .nav-item { width: 48px; height: 48px; padding: 3px; border-radius: 15px; justify-content: center; }
  .nav-item > span:last-child { display: none; }
  .nav-icon { width: 38px; height: 38px; }
  .sidebar-garden { display: none; }
  .account-menu {
    position: static;
    width: 42px;
    padding: 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
    grid-template-columns: 34px;
  }
  .account-menu > div, #logout-button { display: none; }
  .app-language { position: static; flex: 0 0 auto; }
  .app-language button { min-width: 30px; padding: 0 5px; }
  .dashboard { padding: 22px 14px 30px; }
  .page-header { min-height: 112px; padding: 3px 5px; }
  .page-header h1 { font-size: 38px; }
  .page-header p:not(.eyebrow) { font-size: 16px; }
  .sky-scene { width: 120px; transform: scale(.7); transform-origin: top right; }
  .bottom-grid { grid-template-columns: 1fr; }
  .dashboard[data-view="medidas"] .bottom-grid,
  .dashboard[data-view="conquistas"] .bottom-grid { grid-template-columns: 1fr; }
  .achievement-card { grid-column: auto; }
}

@media (max-width: 570px) {
  .auth-card { padding: 24px 20px 27px; }
  .auth-gate { align-items: start; padding-top: 65px; }
  .sidebar { padding: 7px 8px; }
  .brand { width: 110px; }
  .brand-copy { font-size: 16px; }
  .brand-copy strong { font-size: 19px; }
  .nav-icon { width: 34px; height: 34px; }
  .nav-item { width: 38px; height: 43px; }
  .page-header { overflow: hidden; }
  .sky-scene { display: none; }
  .measure-card, .chart-card { padding: 20px 16px; }
  .measure-content { grid-template-columns: 1fr; height: auto; }
  .measure-form { padding: 18px 0 8px; }
  .height-input-wrap input { width: 190px; font-size: 65px; }
  .ruler-scene { min-height: 310px; width: 245px; margin: 0 auto; }
  .chart-card { min-height: 395px; }
  .chart-heading { align-items: flex-start; gap: 8px; }
  .chart-heading select { width: 145px; padding-left: 7px; font-size: 11px; }
  .chart-wrap { margin-left: -8px; margin-right: -8px; height: 250px; }
  .chart-summary { left: 18px; right: 18px; }
  .trend-pill { display: none; }
  .toast { left: 14px; right: 14px; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
