.yuma-guide,
.yuma-guide * {
  box-sizing: border-box;
}

.yuma-guide {
  --yuma-guide-red: #ed1b2f;
  --yuma-guide-deep-red: #a90025;
  --yuma-guide-navy: #071625;
  --yuma-guide-ink: #f6f2e9;
  --yuma-guide-gold: #d5ad66;
  position: fixed;
  right: 22px;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 9998;
  width: 82px;
  height: 76px;
  color: var(--yuma-guide-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  isolation: isolate;
}

.yuma-guide.is-arriving {
  animation: yuma-guide-arrive 1.35s cubic-bezier(.2,.75,.25,1) both;
}

.yuma-guide__bird-button {
  position: absolute;
  inset: 6px 0 0;
  width: 82px;
  height: 70px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,.34));
  -webkit-tap-highlight-color: transparent;
}

.yuma-guide__bird-button::after {
  content: "";
  position: absolute;
  left: 17px;
  right: 15px;
  bottom: 4px;
  height: 10px;
  border-radius: 50%;
  background: rgba(2, 11, 19, .23);
  filter: blur(7px);
  z-index: -1;
}

.yuma-guide__bird-button:focus-visible,
.yuma-guide__close:focus-visible,
.yuma-guide__menu a:focus-visible {
  outline: 3px solid var(--yuma-guide-gold);
  outline-offset: 3px;
}

.yuma-guide__bird-stage {
  display: block;
  width: 100%;
  height: 100%;
  animation: yuma-guide-bob 5.8s ease-in-out infinite;
  transform-origin: 50% 74%;
}

.yuma-guide__bird {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.yuma-guide__wing-left,
.yuma-guide__wing-right,
.yuma-guide__head {
  transform-box: fill-box;
}

.yuma-guide__wing-left {
  transform-origin: 92% 78%;
  animation: yuma-guide-wing-left 6.2s ease-in-out infinite;
}

.yuma-guide__wing-right {
  transform-origin: 8% 78%;
  animation: yuma-guide-wing-right 6.2s ease-in-out infinite;
}

.yuma-guide__head {
  transform-origin: 76% 82%;
  animation: yuma-guide-head 8.4s ease-in-out infinite;
}

.yuma-guide__welcome,
.yuma-guide__menu {
  position: absolute;
  right: 6px;
  bottom: 82px;
  width: min(272px, calc(100vw - 32px));
  border: 1px solid rgba(213,173,102,.38);
  border-radius: 18px 18px 5px 18px;
  background: rgba(7,22,37,.97);
  box-shadow: 0 18px 48px rgba(0,0,0,.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.yuma-guide__welcome {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(322px, calc(100vw - 32px));
  padding: 14px 42px 14px 14px;
  font-size: .92rem;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.97);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.yuma-guide__portrait {
  position: relative;
  width: 74px;
  height: 74px;
  overflow: hidden;
  border: 1px solid rgba(213,173,102,.42);
  border-radius: 22px 22px 8px 22px;
  background: #1a1a17;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
}

.yuma-guide__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 31% 24%;
}

/* Onaylı tek katmanlı görsel değiştirilmeden, küçük portre üzerinde iki
   kısa göz kapağı katmanı ile seyrek ve doğal bir göz kırpma oluşturulur. */
.yuma-guide__eyelid {
  --yuma-blink-angle: 0deg;
  position: absolute;
  z-index: 2;
  width: 9.5%;
  height: 5.2%;
  border-radius: 65% 65% 55% 55%;
  background: #e89578;
  box-shadow: inset 0 -1px 0 rgba(67, 25, 27, .8);
  opacity: 0;
  transform: rotate(var(--yuma-blink-angle)) scaleY(.08);
  transform-origin: 50% 100%;
  animation: yuma-guide-blink 7.2s 2.1s ease-in-out infinite;
  pointer-events: none;
}

.yuma-guide__eyelid--left {
  --yuma-blink-angle: -8deg;
  left: 39.7%;
  top: 22.8%;
}

.yuma-guide__eyelid--right {
  --yuma-blink-angle: -13deg;
  left: 53.8%;
  top: 18.9%;
  animation-delay: 2.13s;
}

.yuma-guide__welcome-copy {
  min-width: 0;
}

.yuma-guide__welcome.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.yuma-guide__welcome strong {
  display: block;
  color: var(--yuma-guide-gold);
  font-weight: 750;
  font-size: .98rem;
}

.yuma-guide__welcome span {
  display: block;
  color: #e7edef;
}

.yuma-guide__menu {
  padding: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.97);
  transform-origin: right bottom;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.yuma-guide__menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.yuma-guide__menu-title {
  display: block;
  margin: 0 32px 11px 2px;
  color: var(--yuma-guide-gold);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.yuma-guide__menu-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yuma-guide__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #eaf0f1;
  font-size: .9rem;
  line-height: 1.25;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.yuma-guide__menu a::after {
  content: "→";
  color: var(--yuma-guide-gold);
  font-size: 1rem;
}

.yuma-guide__menu a:hover {
  color: #fff;
  background: rgba(237,27,47,.13);
  transform: translateX(2px);
}

.yuma-guide__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(213,173,102,.26);
  border-radius: 50%;
  color: #dce6e8;
  background: rgba(255,255,255,.05);
  font: 500 1.05rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.yuma-guide__close:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}

@keyframes yuma-guide-arrive {
  0% { opacity: 0; transform: translate(42vw, -48vh) rotate(-13deg) scale(.64); }
  55% { opacity: 1; transform: translate(-8px, -12px) rotate(4deg) scale(1.04); }
  78% { transform: translate(4px, -4px) rotate(-2deg) scale(.98); }
  100% { opacity: 1; transform: none; }
}

@keyframes yuma-guide-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  45% { transform: translateY(-5px) rotate(-.8deg); }
  60% { transform: translateY(-3px) rotate(.5deg); }
}

@keyframes yuma-guide-wing-left {
  0%, 10%, 100% { transform: rotate(0); }
  2.5% { transform: rotate(14deg) translateY(2px); }
  5% { transform: rotate(-7deg) translateY(-1px); }
  7.5% { transform: rotate(10deg) translateY(1px); }
}

@keyframes yuma-guide-wing-right {
  0%, 10%, 100% { transform: rotate(0); }
  2.5% { transform: rotate(-14deg) translateY(2px); }
  5% { transform: rotate(7deg) translateY(-1px); }
  7.5% { transform: rotate(-10deg) translateY(1px); }
}

@keyframes yuma-guide-head {
  0%, 38%, 52%, 100% { transform: rotate(0); }
  42% { transform: rotate(-6deg) translate(-1px, 1px); }
  47% { transform: rotate(3deg); }
}

@keyframes yuma-guide-blink {
  0%, 43%, 47%, 100% {
    opacity: 0;
    transform: rotate(var(--yuma-blink-angle)) scaleY(.08);
  }
  44.4%, 45.7% {
    opacity: .96;
    transform: rotate(var(--yuma-blink-angle)) scaleY(1);
  }
}

@media (max-width: 640px) {
  .yuma-guide {
    right: 11px;
    bottom: max(18px, env(safe-area-inset-bottom));
    width: 68px;
    height: 64px;
  }

  .yuma-guide__bird-button {
    width: 68px;
    height: 60px;
  }

  .yuma-guide__welcome,
  .yuma-guide__menu {
    right: 2px;
    bottom: 70px;
    width: min(258px, calc(100vw - 24px));
  }

  .yuma-guide__welcome {
    font-size: .86rem;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    width: min(292px, calc(100vw - 24px));
    padding: 12px 38px 12px 12px;
  }

  .yuma-guide__portrait {
    width: 62px;
    height: 62px;
    border-radius: 18px 18px 7px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yuma-guide,
  .yuma-guide__bird-stage,
  .yuma-guide__wing-left,
  .yuma-guide__wing-right,
  .yuma-guide__head,
  .yuma-guide__eyelid {
    animation: none !important;
  }

  .yuma-guide__eyelid { display: none; }

  .yuma-guide__welcome,
  .yuma-guide__menu,
  .yuma-guide__menu a {
    transition: none !important;
  }
}

@media print {
  .yuma-guide { display: none !important; }
}
