/* Keep the scene between the shared header and navigation. */
html body #screen-my-buddy {
  --buddy-header-space:76px;
  --buddy-dock-space:calc(94px + env(safe-area-inset-bottom));
}
html body #screen-my-buddy .buddy-stage.buddy-growth-enabled {
  --buddy-actions-height:152px;
  position:absolute;
  inset:var(--buddy-header-space) 0 auto;
  margin:0 auto;
  width:min(100% - 32px, 560px)!important;
  height:min(780px,calc(100% - var(--buddy-header-space) - var(--buddy-dock-space)))!important;
  max-height:none!important;
  aspect-ratio:auto;
  overflow:visible;
}
html body #screen-my-buddy > .buddy-header {
  position:absolute!important;
  inset:0 0 auto!important;
  z-index:12;
}
html body #screen-my-buddy > .buddy-header h1 {
  position:absolute!important;
  left:64px!important;
  right:64px!important;
  top:0!important;
  height:var(--buddy-header-space)!important;
  width:auto!important;
  margin:0!important;
  transform:none!important;
}
html body #screen-my-buddy > .buddy-header #buddy-name {
  font:600 clamp(26px,4.3vw,42px)/1.1 Fredoka,Nunito,sans-serif!important;
  text-overflow:ellipsis;
  overflow:hidden;
  white-space:nowrap;
  height:auto!important;
}
html body #screen-my-buddy #buddy-name::after { display:none!important; }
html body #screen-my-buddy #buddy-name .buddy-name-letter {
  -webkit-text-stroke:0!important;
}
html body #screen-my-buddy .buddy-growth-enabled .buddy-hero {
  left:10cqw;
  top:calc((100% - var(--buddy-actions-height)) * .91 - 57.5cqw);
  scale:none;
}
html body #screen-my-buddy .buddy-stage[data-state=egg] #buddy-egg {
  scale:1.25;
}
html body #screen-my-buddy .buddy-growth-enabled .buddy-speech {
  left:var(--buddy-bubble-x, 63%)!important;
  top:var(--buddy-bubble-y, 32%)!important;
  width:clamp(82px,22cqw,136px);
  height:auto;
  aspect-ratio:5 / 3;
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-size:clamp(14px,3.5cqw,23px);
  z-index:4;
}
html body #screen-my-buddy .buddy-growth-enabled .buddy-growth-tools {
  left:0!important;
  top:var(--buddy-tools-y, 40%)!important;
  transform:translateY(-50%);
  width:auto!important;
  gap:8px!important;
}
html body #screen-my-buddy .buddy-growth-tools button {
  width:44px;
  height:44px;
  font-size:19px;
  margin:0;
}
html body #screen-my-buddy .buddy-grow-now {
  left:auto;
  right:0;
  top:calc((100% - var(--buddy-actions-height)) * .71);
  width:48px;
  padding:4px;
  font-size:16px;
}
html body #screen-my-buddy .buddy-grow-now span { display:none; }

html body #screen-my-buddy .buddy-controls {
  display:grid;
  align-content:space-between;
  gap:10px;
  inset:auto 0 0;
  width:auto;
  height:var(--buddy-actions-height);
  aspect-ratio:auto;
}
#screen-my-buddy .buddy-controls > .buddy-growth {
  position:relative;
  inset:auto;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-height:32px;
}
#screen-my-buddy .buddy-growth-copy {
  position:static;
  display:flex;
  align-items:center;
  gap:5px;
  width:auto;
  height:32px;
  padding:0 10px 0 6px;
  font:800 15px/1 Nunito,sans-serif;
}
#screen-my-buddy .buddy-growth-copy .buddy-star-art {
  position:relative;
  inset:auto;
  width:22px;
  height:22px;
}
#screen-my-buddy #buddy-progress-text {
  position:static;
  width:auto;
  height:auto;
}
#screen-my-buddy .buddy-progress {
  position:relative;
  inset:auto;
  width:100%;
  height:18px;
}
#screen-my-buddy .buddy-progress-track {
  inset:3px;
  width:auto;
  height:auto;
}
#screen-my-buddy .buddy-growth-details {
  height:100%;
  min-height:44px;
  top:50%;
  transform:translateY(-50%);
}
#screen-my-buddy .buddy-controls > .buddy-feed {
  position:relative;
  inset:auto;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  width:100%;
  height:46px;
  border-radius:24px;
  font:800 18px/1 Nunito,sans-serif;
}
#screen-my-buddy .buddy-feed .buddy-star-art {
  position:relative;
  inset:auto;
  width:25px;
  height:25px;
}
#screen-my-buddy .buddy-feed .buddy-star-art img {
  inset:0!important;
  width:100%!important;
  height:100%!important;
}
#screen-my-buddy :is(.buddy-feed-balance,.buddy-feed-label) {
  position:static;
  width:auto;
  height:auto;
  font:inherit;
}

html body #screen-my-buddy .buddy-controls > .buddy-worlds {
  position:relative;
  inset:auto;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 25px;
  align-items:center;
  gap:8px;
  width:100%;
  height:54px;
  padding:0 12px 0 8px;
  border:1px solid #c3ded1;
  border-radius:20px;
  background:linear-gradient(120deg,#fffdf4,#ebf9ed);
  box-shadow:0 3px 0 #3056421c;
  color:#285b4b;
  text-align:left;
  font-size:16px;
}
#screen-my-buddy .buddy-worlds-mark {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:13px;
  background:#ddf3e8;
}
#screen-my-buddy .buddy-worlds-mark img {
  width:27px;
  height:27px;
}
#screen-my-buddy .buddy-worlds-title {
  display:block;
  font:600 clamp(16px,4.8cqw,22px)/1.05 Fredoka,Nunito,sans-serif;
  white-space:nowrap;
}
#screen-my-buddy .buddy-worlds-lock-hint {
  display:none;
  margin-top:3px;
  font:800 11px/1.1 Nunito,sans-serif;
  color:#496d61;
}
#screen-my-buddy .buddy-stage[data-state=egg] .buddy-worlds-lock-hint { display:block; }
#screen-my-buddy .buddy-worlds-end {
  grid-column:3;
  display:grid;
  place-items:center;
}
#screen-my-buddy .buddy-worlds-end > img {
  width:23px;
  height:23px;
}
#screen-my-buddy .buddy-worlds-end > .buddy-worlds-lock,
#screen-my-buddy .buddy-stage[data-state=egg] .buddy-worlds-end > .v39-forward-glyph { display:none; }
#screen-my-buddy .buddy-stage[data-state=egg] .buddy-worlds-end > .buddy-worlds-lock { display:block; }

@media (min-width:700px) and (orientation:portrait) {
  html body #screen-my-buddy { --buddy-header-space:116px; }
  html body #screen-my-buddy .buddy-stage.buddy-growth-enabled { --buddy-actions-height:202px; }
  #screen-my-buddy .buddy-controls > .buddy-growth { min-height:42px; }
  #screen-my-buddy .buddy-growth-copy { height:38px; font-size:18px; }
  #screen-my-buddy .buddy-controls > .buddy-feed { height:58px; font-size:22px; }
  html body #screen-my-buddy .buddy-controls > .buddy-worlds { height:70px; }
}
@media (min-width:700px) and (orientation:landscape) {
  html body #screen-my-buddy { --buddy-header-space:104px; }
  html body #screen-my-buddy .buddy-stage.buddy-growth-enabled {
    --buddy-actions-height:202px;
    width:min(100% - 64px, 1040px)!important;
  }
  html body #screen-my-buddy .buddy-growth-enabled .buddy-hero {
    left:0;
    top:calc(50% - 23cqw);
    scale:.6;
    transform-origin:0 0;
  }
  html body #screen-my-buddy .buddy-controls {
    inset:55% 0 auto auto;
    width:min(45%,440px);
    transform:translateY(-50%);
  }
  html body #screen-my-buddy .buddy-grow-now {
    top:auto;
    bottom:12%;
    right:60%;
  }
  #screen-my-buddy .buddy-controls > .buddy-growth { min-height:42px; }
  #screen-my-buddy .buddy-growth-copy { height:38px; font-size:18px; }
  #screen-my-buddy .buddy-controls > .buddy-feed { height:58px; font-size:22px; }
  html body #screen-my-buddy .buddy-controls > .buddy-worlds { height:70px; }
}
@media (max-width:699px) and (max-height:680px) {
  html body #screen-my-buddy .buddy-stage.buddy-growth-enabled { width:min(100% - 32px, 310px)!important; }
}


@media (min-width:700px) and (orientation:portrait) {
  html body #screen-my-buddy .buddy-growth-enabled .buddy-growth-tools { left:8cqw!important; }
}
@media (min-width:700px) and (orientation:landscape) {
  html body #screen-my-buddy .buddy-growth-enabled .buddy-growth-tools { left:4cqw!important; }
}
