.ankimo-favorite-toggle {
  position: absolute;
  z-index: 4;
  top: 19px;
  left: 76px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d9e4dc;
  border-radius: 50%;
  background: #fff;
  color: #87938c;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 5px 16px #203d2c12;
  transition: transform .18s, color .18s, background .18s, border-color .18s;
}

.learn-view { position: relative; }

.ankimo-favorite-toggle:hover { transform: translateY(-1px); color: #c58a20; border-color: #e7c36f; }
.ankimo-favorite-toggle.active { color: #a96f08; background: #fff6d9; border-color: #eac66d; }

.ankimo-favorites-open {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid #e2cf91;
  border-radius: 19px;
  background: #fff8df;
  color: #86600f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.ankimo-favorites-open span { font-size: 15px; }
.ankimo-favorites-open small { font-size: 10px; font-weight: 750; }

.ankimo-favorites-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #15221b80;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ankimo-favorites-modal {
  width: min(640px, 100%);
  max-height: min(760px, 88svh);
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 25px 80px #12251a40;
}

.ankimo-favorites-modal header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ankimo-favorites-modal header p { margin: 0 0 5px; color: #728078; font-size: 12px; }
.ankimo-favorites-modal h2 { margin: 0; color: #17211d; font-size: 25px; }
.ankimo-favorites-modal header button {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef2ef;
  cursor: pointer;
  font-size: 22px;
}

.ankimo-favorites-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 12px;
  padding: 0 13px;
  border: 1px solid #dce4de;
  border-radius: 12px;
  background: #fafbfa;
  color: #728078;
}

.ankimo-favorites-search input { width: 100%; padding: 11px 0; outline: 0; background: transparent; color: #17211d; }
.ankimo-favorites-list { overflow: auto; overscroll-behavior: contain; }
.ankimo-favorites-empty { margin: 22px 0; padding: 26px; border-radius: 15px; background: #f4f7f5; color: #728078; text-align: center; }

.ankimo-favorite-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px 3px;
  border-bottom: 1px solid #e8ece9;
}

.ankimo-favorite-level { margin-top: 2px; padding: 5px 7px; border-radius: 7px; background: #e8f2ec; color: #216b4f; font-size: 9px; font-weight: 850; }
.ankimo-favorite-item h3 { margin: 0 0 3px; color: #17211d; font-size: 16px; }
.ankimo-favorite-item p { margin: 0; color: #315a49; font-size: 13px; line-height: 1.4; }
.ankimo-favorite-item small { display: block; margin-top: 5px; color: #7a847f; font-size: 11px; line-height: 1.4; }
.ankimo-favorite-item button { width: 34px; height: 34px; border-radius: 50%; background: #fff4cc; color: #a96f08; cursor: pointer; font-size: 18px; }

.ankimo-favorites-toast {
  position: fixed;
  z-index: 110;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 17px;
  border-radius: 22px;
  background: #17271f;
  color: #fff;
  box-shadow: 0 18px 55px #283f332b;
  font-size: 12px;
  font-weight: 700;
}

@media (width <= 560px) {
  .ankimo-favorites-open { width: 36px; padding: 0; justify-content: center; }
  .ankimo-favorites-open small { display: none; }
  .ankimo-favorites-open b { font-size: 9px; }
  .ankimo-favorite-toggle { width: 34px; height: 34px; }
  .ankimo-favorites-backdrop { align-items: end; padding: 0; }
  .ankimo-favorites-modal { max-height: 88svh; padding: 22px 17px max(22px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ankimo-favorite-toggle { transition: none; }
}
