#wdPetalHost {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.wdPetalLauncher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 4px 12px 4px 6px;
  border: 1px solid #e7d8c5;
  border-radius: 999px;
  background: #fffaf4;
  color: #263c3c;
  cursor: pointer;
  box-shadow: 0 2px 9px #183c3610;
}
.wdPetalLauncher:hover {
  border-color: #cf9f62;
  background: #fff6e9;
}
.wdPetalLauncher > span {
  display: grid;
  text-align: left;
  line-height: 1.2;
}
.wdPetalLauncher strong {
  font-size: 14px;
}
.wdPetalLauncher small {
  font-size: 11px;
  color: #65716c;
}
.wdPetalBouquet {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.wdPetalBadge {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 20px;
  background: #ae304b;
  color: white;
  font-size: 11px;
  text-align: center;
}
.wdPetalPanel {
  position: fixed;
  z-index: 120;
  top: 76px;
  right: max(14px, env(safe-area-inset-right));
  width: min(390px, calc(100vw - 24px));
  max-height: calc(100dvh - 96px);
  overflow: auto;
  padding: 19px;
  background: #fffdf9;
  border: 1px solid #e9dfd2;
  border-radius: 20px;
  box-shadow: 0 18px 55px #17373238;
  color: #243b39;
  text-align: left;
}
.wdPetalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.wdPetalHead > div {
  display: flex;
  align-items: center;
  gap: 11px;
}
.wdPetalHead .wdPetalBouquet {
  width: 54px;
  height: 54px;
}
.wdPetalHead h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 26px;
}
.wdPetalHead .eyebrow {
  display: block;
  color: #796448;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.wdPetalClose {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f4ede4;
  color: #4d625d;
  font-size: 25px;
  cursor: pointer;
}
.wdPetalGreeting {
  margin: 12px 0;
  color: #52615d;
  line-height: 1.45;
}
.wdPetalGreeting b {
  color: #263c3c;
}
.wdPetalCounts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wdPetalCounts span {
  padding: 6px 10px;
  border-radius: 99px;
  background: #edf4ef;
  color: #466a58;
  font-size: 13px;
}
.wdPetalFocus {
  margin-top: 13px;
  padding: 15px;
  border-radius: 15px;
  background: linear-gradient(135deg, #f5f0e7, #fff8ee);
}
.wdPetalFocus .eyebrow,
.wdPetalPrompts > .eyebrow {
  color: #836945;
  font-size: 10px;
  letter-spacing: 0.09em;
}
.wdPetalFocus h3 {
  margin: 6px 0;
  font-size: 19px;
}
.wdPetalFocus p {
  margin: 0 0 12px;
  color: #596762;
  font-size: 14px;
  line-height: 1.5;
}
.wdPetalFocus .btn {
  min-height: 42px;
}
.wdPetalPrompts {
  margin-top: 15px;
}
.wdPetalPrompts > div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.wdPetalPrompts button {
  padding: 8px 10px;
  border: 1px solid #e7d8c5;
  border-radius: 99px;
  background: white;
  color: #3e5c55;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.wdPetalAnswer {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid #dfaa68;
  border-radius: 5px 12px 12px 5px;
  background: #fff8ec;
}
.wdPetalAnswer b {
  font-size: 13px;
  color: #765a38;
}
.wdPetalAnswer p {
  margin: 6px 0 10px;
  line-height: 1.5;
}
.wdPetalAsk {
  margin-top: 14px;
}
.wdPetalAsk label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}
.wdPetalAsk > div {
  display: flex;
  gap: 7px;
}
.wdPetalAsk input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d8d9d2;
  border-radius: 11px;
  background: white;
  color: #243b39;
  font: inherit;
}
.wdPetalAsk .btn {
  padding-inline: 13px;
}
.wdPetalAdd {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed #cf9f62;
  border-radius: 11px;
  background: #fffaf4;
  color: #655036;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.wdPetalFoot {
  margin: 11px 0 0;
  color: #77807b;
  font-size: 11px;
  line-height: 1.4;
}
@media (max-width: 600px) {
  .wdPetalLauncher {
    min-height: 42px;
    padding: 2px 8px 2px 3px;
    gap: 5px;
  }
  .wdPetalLauncher .wdPetalBouquet {
    width: 34px;
    height: 34px;
  }
  .wdPetalLauncher small {
    display: none;
  }
  .wdPetalLauncher strong {
    font-size: 12px;
  }
  .wdPetalPanel {
    top: 68px;
    right: 8px;
    padding: 16px;
  }
}
@media (max-width: 360px) {
  .wdPetalLauncher {
    padding: 2px;
  }
  .wdPetalLauncher > span {
    display: none;
  }
}

.wdPetalPanel {
  width: min(450px, calc(100vw - 24px));
}
.wdPetalAnswer h3,
.wdPedalTour h3 {
  font-size: 16px;
  margin: 8px 0;
}
.wdPetalAnswer ol {
  padding-left: 22px;
  margin: 8px 0;
}
.wdPetalAnswer li {
  margin: 9px 0;
  line-height: 1.5;
}
.wdPedalNote {
  font-size: 12px;
  color: #596762;
}
.wdPedalTour {
  margin: 14px 0;
  padding: 15px;
  background: #edf4ef;
  border: 2px solid #457461;
  border-radius: 12px;
}
.wdPedalTour .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.wdPedalTour p {
  line-height: 1.5;
}
.wdPedalTour #wdPedalTargetStatus {
  font-size: 12px;
}
.wdPedalHighlight {
  outline: 4px solid #bd6426 !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 8px #ffe7a7 !important;
}
@media (prefers-reduced-motion: reduce) {
  .wdPedalHighlight {
    scroll-behavior: auto;
  }
}

.wdPedalMemory {
  border-top: 1px solid #ded6c9;
  margin-top: 16px;
  padding-top: 10px;
  font-size: 12px;
}
.wdPedalMemory h3 {
  font-size: 15px;
}
.wdPedalFeedback {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  font-size: 12px;
}
.wdPedalFeedback label {
  display: block;
  flex-basis: 100%;
  line-height: 1.5;
}
.wdPedalFeedback small {
  display: block;
  color: #596762;
}
.wdPedalFeedback button[aria-pressed='true'] {
  border: 2px solid #285c52;
  background: #e7f2ea;
}
.wdPedalMemory .wdPetalAnswer {
  font-size: 13px;
}

/* Pedal's native vector bouquet: quiet idle, greeting, blink and answer celebration. */
.wdPetalBouquet {
  overflow: visible;
  transform-origin: 50% 85%;
  animation: wdPedalSway 6s ease-in-out infinite;
  will-change: auto;
}
.wdPedalBloom {
  transform-box: fill-box;
  transform-origin: center;
  animation: wdPedalBreathe 5s ease-in-out infinite;
}
.wdPedalBloom:nth-of-type(2n) {
  animation-delay: -2.5s;
}
.wdPedalLeaves {
  transform-box: fill-box;
  transform-origin: 50% 80%;
  animation: wdPedalLeaves 6s ease-in-out infinite;
}
.wdPedalEyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: wdPedalBlink 7s ease-in-out infinite;
}
.wdPedalSparkles {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}
.wdPetalLauncher:hover .wdPetalBouquet,
.wdPetalLauncher:focus-visible .wdPetalBouquet {
  animation: wdPedalHello 0.8s ease-in-out 1;
}
.wdPetalHead .wdPedalAwake {
  animation:
    wdPedalHello 0.8s ease-in-out 1,
    wdPedalSway 6s 0.8s ease-in-out infinite;
}
.wdPetalHead .wdPedalCheerful .wdPedalSparkles {
  animation: wdPedalSparkle 1.4s ease-out 1;
}
.wdPetalAnswer {
  animation: wdPedalAnswerIn 0.22s ease-out 1;
}
@keyframes wdPedalSway {
  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }
  50% {
    transform: rotate(2deg) translateY(-1.5px);
  }
}
@keyframes wdPedalBreathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}
@keyframes wdPedalLeaves {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(3deg);
  }
}
@keyframes wdPedalBlink {
  0%,
  43%,
  47%,
  76%,
  80%,
  100% {
    transform: scaleY(1);
  }
  45%,
  78% {
    transform: scaleY(0.1);
  }
}
@keyframes wdPedalHello {
  0%,
  100% {
    transform: rotate(0);
  }
  20% {
    transform: rotate(-9deg) translateY(-2px);
  }
  45% {
    transform: rotate(8deg) translateY(-3px);
  }
  70% {
    transform: rotate(-4deg);
  }
}
@keyframes wdPedalSparkle {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}
@keyframes wdPedalAnswerIn {
  from {
    opacity: 0.4;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .wdPetalBouquet,
  .wdPetalBouquet *,
  .wdPetalAnswer {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .wdPedalSparkles {
    opacity: 0 !important;
  }
}

/* Pedal's approved white-rose character; motion stays decorative. */
.wdPedalRose {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wdPedalRose img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px #4c35422b);
}
.wdPedalRose > .wdPedalSparkles {
  position: absolute;
  right: -3px;
  top: 0;
  color: #b88632;
  font-size: 17px;
}
.wdPetalHead .wdPedalRose {
  width: 76px;
  height: 76px;
}

/* Six character poses make the hand wave and eyes blink, independently of the body sway. */
.wdPedalSprite {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url('./resources/pedal-wave-blink-v1.png');
  background-repeat: no-repeat;
  background-size: 300% 200%;
  background-position: 0 0;
  animation: wdPedalCharacter 6s step-end infinite;
  filter: drop-shadow(0 1px 1px #4c35422b);
}
.wdPetalHead .wdPedalRose {
  width: 96px;
  height: 96px;
}
.wdPetalHead .wdPedalSprite {
  animation-duration: 3.8s;
}
.wdPetalLauncher:hover .wdPedalSprite,
.wdPetalLauncher:focus-visible .wdPedalSprite {
  animation-duration: 1.8s;
}
.wdPetalHead .wdPedalCheerful {
  animation:
    wdPedalCelebrate 1s ease-in-out 1,
    wdPedalSway 4s 1s ease-in-out infinite;
}
.wdPetalHead .wdPedalCheerful .wdPedalSprite {
  animation-duration: 2.4s;
}
.wdPedalMotionToggle {
  display: block;
  margin: 12px 0 0;
  padding: 6px 8px;
  border: 1px solid #d8d9d2;
  border-radius: 8px;
  background: transparent;
  color: #52615d;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
@keyframes wdPedalCharacter {
  0%,
  68% {
    background-position: 0 0;
  }
  73% {
    background-position: 50% 0;
  }
  78% {
    background-position: 100% 0;
  }
  81% {
    background-position: 0 100%;
  }
  86% {
    background-position: 50% 100%;
  }
  91%,
  100% {
    background-position: 100% 100%;
  }
}
@keyframes wdPedalCelebrate {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  25% {
    transform: translateY(-7px) rotate(-6deg);
  }
  50% {
    transform: translateY(-2px) rotate(5deg);
  }
  75% {
    transform: translateY(-5px) rotate(-3deg);
  }
}
.wdPedalMotionPaused,
.wdPedalMotionPaused * {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}
.wdPedalMotionPaused .wdPedalSparkles {
  opacity: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  .wdPedalSprite {
    animation: none !important;
    background-position: 0 0;
  }
}
.wdPetalLauncher > .wdPedalRose {
  display: inline-flex;
}
