#ccfw-widget,
#ccfw-widget *,
#ccfw-widget *::before,
#ccfw-widget *::after {
  box-sizing: border-box;
}

#ccfw-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(675px, calc(100vw - 24px));
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 99999;
  pointer-events: none;
  font-family: Arial, Helvetica, sans-serif;
}

#ccfw-widget .ccfw-mascot-stage {
  position: relative;
  width: 285px;
  height: 300px;
  flex: 0 0 285px;
  opacity: 0;
  transform: translateY(420px) rotate(-8deg);
  animation: ccfwMascotEntrance 1.3s cubic-bezier(.18,.89,.32,1.28) .25s forwards;
}

#ccfw-widget .ccfw-mascot-idle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: 55% 100%;
  animation: ccfwMascotIdle 4.5s ease-in-out 2.3s infinite;
}

#ccfw-widget .ccfw-mascot {
  display: block;
  width: 285px;
  max-width: none;
  height: auto;
  user-select: none;
  pointer-events: none;
  transform-origin: 61% 72%;
  filter: drop-shadow(0 18px 16px rgba(0,0,0,.28));
  animation: ccfwMascotWave .9s ease-in-out 1.5s 7;
}

#ccfw-widget .ccfw-ground-shadow {
  position: absolute;
  left: 48px;
  bottom: 3px;
  width: 185px;
  height: 25px;
  border-radius: 50%;
  background: rgba(0,0,0,.20);
  filter: blur(8px);
  z-index: -1;
  animation: ccfwShadowPulse 4.5s ease-in-out 2.3s infinite;
}

#ccfw-widget .ccfw-star,
#ccfw-widget .ccfw-fun {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  line-height: 1;
}

#ccfw-widget .ccfw-star {
  color: #ffd129;
  font-size: 24px;
  text-shadow: 0 3px 5px rgba(0,0,0,.20);
  animation: ccfwStarBurst 3.4s ease-in-out infinite;
}

#ccfw-widget .ccfw-star-1 { left: 28px; top: 66px; animation-delay: 2.2s; }
#ccfw-widget .ccfw-star-2 { right: 18px; top: 42px; animation-delay: 2.9s; }
#ccfw-widget .ccfw-star-3 { right: 0; top: 138px; animation-delay: 3.6s; }

#ccfw-widget .ccfw-fun {
  color: #d0202e;
  font-size: 21px;
  font-weight: 900;
  animation: ccfwFunMark 5s ease-in-out infinite;
}

#ccfw-widget .ccfw-fun-1 { left: 26px; top: 132px; animation-delay: 3s; }
#ccfw-widget .ccfw-fun-2 { right: 12px; top: 95px; animation-delay: 4s; }

#ccfw-widget .ccfw-card {
  position: relative;
  flex: 1;
  margin-left: -34px;
  margin-bottom: 24px;
  padding: 60px 30px 22px;
  background: #fff;
  color: #192a38;
  border: 4px solid #073763;
  border-radius: 26px;
  box-shadow: 0 22px 50px rgba(0,0,0,.27);
  pointer-events: auto;
  opacity: 0;
  transform: scale(.5) rotate(4deg);
  transform-origin: left bottom;
  animation: ccfwMessagePop .85s cubic-bezier(.18,.89,.32,1.35) 1.45s forwards;
}

#ccfw-widget .ccfw-card::before {
  content: "";
  position: absolute;
  left: -31px;
  bottom: 48px;
  width: 0;
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-right: 33px solid #073763;
}

#ccfw-widget .ccfw-card::after {
  content: "";
  position: absolute;
  left: -24px;
  bottom: 53px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-right: 26px solid #fff;
}

#ccfw-widget .ccfw-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

#ccfw-widget .ccfw-close,
#ccfw-widget .ccfw-motion {
  min-height: 44px;
  border: 3px solid #073763;
  background: #fff;
  color: #073763;
  font: 800 14px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

#ccfw-widget .ccfw-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
}

#ccfw-widget .ccfw-motion {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
}

#ccfw-widget .ccfw-close:hover,
#ccfw-widget .ccfw-motion:hover {
  background: #073763;
  color: #fff;
}

#ccfw-widget .ccfw-close:focus-visible,
#ccfw-widget .ccfw-motion:focus-visible,
#ccfw-widget .ccfw-info:focus-visible {
  outline: 4px solid #ffd129;
  outline-offset: 4px;
}

#ccfw-widget .ccfw-howdy {
  margin: 0 0 5px;
  color: #b81624;
  font-size: clamp(28px,4vw,38px);
  line-height: .96;
  font-weight: 900;
  letter-spacing: -1px;
}

#ccfw-widget .ccfw-location {
  margin-bottom: 5px;
  color: #073763;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
}

#ccfw-widget .ccfw-title {
  margin: 0 0 10px;
  color: #b81624;
  font-size: clamp(25px,3.2vw,33px);
  line-height: 1.01;
  font-weight: 900;
}

#ccfw-widget .ccfw-date {
  display: inline-block;
  margin-bottom: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #ffd129;
  color: #11283a;
  font-size: 13px;
  font-weight: 900;
}

#ccfw-widget .ccfw-description {
  max-width: 360px;
  margin: 0 0 18px;
  color: #253747;
  font-size: 13px;
  line-height: 1.55;
}

#ccfw-widget .ccfw-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 18px;
  border: 3px solid #7d0d15;
  border-radius: 999px;
  background: #b81624;
  color: #fff !important;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: 0 5px 0 #650a11;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

#ccfw-widget .ccfw-info:hover {
  background: #97101b;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #650a11;
}

#ccfw-widget.ccfw-motion-paused *,
#ccfw-widget.ccfw-motion-paused *::before,
#ccfw-widget.ccfw-motion-paused *::after {
  animation-play-state: paused !important;
}

#ccfw-widget.ccfw-motion-paused .ccfw-mascot-stage,
#ccfw-widget.ccfw-motion-paused .ccfw-card {
  opacity: 1;
  transform: none;
}

#ccfw-widget.ccfw-closed { display: none !important; }

@keyframes ccfwMascotEntrance {
  0% { opacity: 0; transform: translateY(420px) rotate(-10deg); }
  60% { opacity: 1; transform: translateY(-35px) rotate(5deg); }
  76% { transform: translateY(10px) rotate(-3deg); }
  88% { transform: translateY(-6px) rotate(2deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0); }
}

@keyframes ccfwMessagePop {
  0% { opacity: 0; transform: scale(.5) rotate(5deg); }
  65% { opacity: 1; transform: scale(1.07) rotate(-1deg); }
  82% { transform: scale(.97) rotate(.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes ccfwMascotWave {
  0%,100% { transform: rotate(0) translateY(0); }
  25% { transform: rotate(-3deg) translateY(-4px); }
  50% { transform: rotate(3deg) translateY(-7px); }
  75% { transform: rotate(-2deg) translateY(-2px); }
}

@keyframes ccfwMascotIdle {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes ccfwShadowPulse {
  0%,100% { transform: scaleX(1); opacity: .20; }
  50% { transform: scaleX(.92); opacity: .14; }
}

@keyframes ccfwStarBurst {
  0%,65%,100% { opacity: 0; transform: scale(.2) rotate(0); }
  74% { opacity: 1; transform: scale(1.3) rotate(20deg); }
  87% { opacity: .7; transform: scale(.85) rotate(-12deg); }
}

@keyframes ccfwFunMark {
  0%,72%,100% { opacity: 0; transform: translateY(8px) scale(.5); }
  79% { opacity: 1; transform: translateY(0) scale(1.15); }
  90% { opacity: .5; transform: translateY(-10px) scale(.85); }
}



/* =========================================================
   RESPONSIVE SIZING - VERSION 1.2.0
   Scales the component to the user's viewport while keeping
   interactive controls at accessible touch-target sizes.
   ========================================================= */

#ccfw-widget {
  right: clamp(6px, 1.25vw, 18px);
  bottom: clamp(6px, 1.25vw, 18px);
  width: min(clamp(520px, 47vw, 675px), calc(100vw - 24px));
  min-height: clamp(235px, 25vw, 300px);
}

#ccfw-widget .ccfw-mascot-stage {
  width: clamp(210px, 20vw, 285px);
  height: clamp(240px, 22vw, 300px);
  flex-basis: clamp(210px, 20vw, 285px);
}

#ccfw-widget .ccfw-mascot {
  width: clamp(220px, 20vw, 285px);
}

#ccfw-widget .ccfw-ground-shadow {
  left: clamp(32px, 3.4vw, 48px);
  width: clamp(140px, 13vw, 185px);
  height: clamp(18px, 1.8vw, 25px);
}

#ccfw-widget .ccfw-card {
  margin-left: clamp(-34px, -2.4vw, -24px);
  margin-bottom: clamp(12px, 1.7vw, 24px);
  padding: clamp(56px, 4.4vw, 60px) clamp(20px, 2.1vw, 30px) clamp(16px, 1.6vw, 22px);
  border-radius: clamp(20px, 1.8vw, 26px);
}

#ccfw-widget .ccfw-howdy {
  font-size: clamp(24px, 2.65vw, 38px);
}

#ccfw-widget .ccfw-title {
  font-size: clamp(21px, 2.3vw, 33px);
}

#ccfw-widget .ccfw-location {
  font-size: clamp(10px, .85vw, 12px);
  letter-spacing: clamp(1px, .14vw, 2px);
}

#ccfw-widget .ccfw-date,
#ccfw-widget .ccfw-description {
  font-size: clamp(12px, .95vw, 13px);
}

#ccfw-widget .ccfw-info {
  font-size: clamp(13px, 1vw, 14px);
  padding-inline: clamp(13px, 1.25vw, 18px);
}

/* Medium laptops and smaller desktops. */
@media (max-width: 1200px) {
  #ccfw-widget {
    width: min(590px, calc(100vw - 20px));
  }

  #ccfw-widget .ccfw-mascot-stage {
    width: 240px;
    height: 270px;
    flex-basis: 240px;
  }

  #ccfw-widget .ccfw-mascot {
    width: 250px;
  }
}

/* Tablets and narrow browser windows. */
@media (max-width: 820px) {
  #ccfw-widget {
    right: 6px;
    bottom: 6px;
    width: calc(100vw - 12px);
    min-height: 245px;
  }

  #ccfw-widget .ccfw-mascot-stage {
    width: clamp(150px, 30vw, 205px);
    height: clamp(220px, 36vw, 260px);
    flex-basis: clamp(150px, 30vw, 205px);
  }

  #ccfw-widget .ccfw-mascot {
    width: clamp(195px, 34vw, 235px);
  }

  #ccfw-widget .ccfw-ground-shadow {
    left: 24px;
    width: 130px;
  }

  #ccfw-widget .ccfw-card {
    margin-left: -24px;
    margin-bottom: 10px;
    padding: 58px 20px 16px;
    border-width: 3px;
    border-radius: 21px;
  }

  #ccfw-widget .ccfw-howdy {
    font-size: clamp(24px, 4.5vw, 29px);
  }

  #ccfw-widget .ccfw-title {
    font-size: clamp(20px, 3.8vw, 24px);
  }

  #ccfw-widget .ccfw-description {
    font-size: 12px;
    line-height: 1.4;
  }

  #ccfw-widget .ccfw-motion-text {
    display: none;
  }

  #ccfw-widget .ccfw-motion {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
}

/* Phones: keep the mascot visible but prioritize readable content. */
@media (max-width: 520px) {
  #ccfw-widget {
    width: calc(100vw - 8px);
    right: 4px;
    bottom: 4px;
    min-height: 218px;
  }

  #ccfw-widget .ccfw-mascot-stage {
    width: clamp(96px, 27vw, 130px);
    height: 210px;
    flex-basis: clamp(96px, 27vw, 130px);
  }

  #ccfw-widget .ccfw-mascot {
    position: absolute;
    width: clamp(165px, 45vw, 195px);
    left: clamp(-62px, -12vw, -42px);
    bottom: 0;
  }

  #ccfw-widget .ccfw-ground-shadow {
    left: 5px;
    width: 105px;
    height: 17px;
  }

  #ccfw-widget .ccfw-card {
    margin-left: -14px;
    padding: 55px 14px 14px;
    border-radius: 18px;
  }

  #ccfw-widget .ccfw-card::before,
  #ccfw-widget .ccfw-card::after {
    display: none;
  }

  #ccfw-widget .ccfw-howdy {
    font-size: clamp(21px, 6.2vw, 25px);
  }

  #ccfw-widget .ccfw-location {
    font-size: 9.5px;
    letter-spacing: .7px;
  }

  #ccfw-widget .ccfw-title {
    font-size: clamp(18px, 5vw, 21px);
  }

  #ccfw-widget .ccfw-date {
    margin-bottom: 9px;
    padding: 5px 9px;
    font-size: 11.5px;
  }

  #ccfw-widget .ccfw-description {
    margin-bottom: 12px;
    font-size: 11.5px;
    line-height: 1.35;
  }

  #ccfw-widget .ccfw-info {
    min-height: 44px;
    padding: 8px 11px;
    font-size: 12px;
  }

  #ccfw-widget .ccfw-controls {
    top: 7px;
    right: 7px;
    gap: 5px;
  }
}

/* Very narrow phones. Keep all essential text and controls readable. */
@media (max-width: 380px) {
  #ccfw-widget .ccfw-mascot-stage {
    width: 82px;
    flex-basis: 82px;
  }

  #ccfw-widget .ccfw-mascot {
    width: 155px;
    left: -62px;
  }

  #ccfw-widget .ccfw-card {
    margin-left: -8px;
    padding-left: 12px;
    padding-right: 10px;
  }

  #ccfw-widget .ccfw-location {
    letter-spacing: .35px;
  }

  #ccfw-widget .ccfw-description {
    font-size: 11px;
  }
}

/* Short screens / landscape phones and smaller laptop viewports. */
@media (max-height: 680px) and (min-width: 521px) {
  #ccfw-widget {
    min-height: 215px;
    width: min(560px, calc(100vw - 16px));
  }

  #ccfw-widget .ccfw-mascot-stage {
    width: 205px;
    height: 225px;
    flex-basis: 205px;
  }

  #ccfw-widget .ccfw-mascot {
    width: 215px;
  }

  #ccfw-widget .ccfw-card {
    padding: 56px 18px 14px;
    margin-bottom: 6px;
  }

  #ccfw-widget .ccfw-description {
    margin-bottom: 10px;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  #ccfw-widget *,
  #ccfw-widget *::before,
  #ccfw-widget *::after {
    animation: none !important;
    transition: none !important;
  }

  #ccfw-widget .ccfw-mascot-stage,
  #ccfw-widget .ccfw-card {
    opacity: 1;
    transform: none;
  }

  #ccfw-widget .ccfw-motion {
    display: none;
  }
}

/* =========================================================
   v1.3.0 CLOSE-BUTTON / DISMISSAL HARDENING
   Keeps controls above the speech-bubble pointer and ensures
   a dismissed widget cannot intercept pointer or keyboard input.
   ========================================================= */
#ccfw-widget .ccfw-card {
  isolation: isolate;
}

#ccfw-widget .ccfw-card::before,
#ccfw-widget .ccfw-card::after {
  z-index: -1;
  pointer-events: none;
}

#ccfw-widget .ccfw-controls {
  z-index: 20;
  pointer-events: auto;
}

#ccfw-widget .ccfw-close,
#ccfw-widget .ccfw-motion {
  position: relative;
  z-index: 21;
  pointer-events: auto;
  touch-action: manipulation;
}

#ccfw-widget[hidden],
#ccfw-widget.ccfw-closed {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
