.ig-cover {
  --ig-paper: #faf7f0;
  --ig-hover: #f6efe3;
  --ig-edge: #e4dbca;
  --ig-ink: #241f18;
  --ig-muted: #685740;
}
.dark .ig-cover {
  --ig-paper: #211d18;
  --ig-hover: #2b251c;
  --ig-edge: #4a3e2f;
  --ig-ink: #f6eee0;
  --ig-muted: #d4ba94;
}
a.ig-cover, .mock a.ig-cover, .ed-page a.ig-cover {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 480px;
  margin: 20px 0 0;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--ig-edge);
  border-radius: 12px;
  background: var(--ig-paper);
  color: var(--ig-ink);
  text-decoration: none;
  text-align: left;
  word-break: keep-all;
}
a.ig-cover:hover { background: var(--ig-hover); }
a.ig-cover:focus-visible { outline: 2px solid var(--ig-muted); outline-offset: 3px; }
.ig-cover__image {
  flex: none;
  width: clamp(60px, 20vw, 80px);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  border-radius: 5px;
  background: var(--ig-edge);
}
.ig-cover__copy { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.ig-cover__byline, .ig-cover__cta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ig-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.ig-cover__byline svg { flex: none; }
.ig-cover__title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.ig-cover__cta { margin-top: 3px; }
.ig-cover:hover .ig-cover__cta { text-decoration: underline; text-underline-offset: 3px; }
.post .ig-cover { margin: 0 0 18px; }

.ig-float {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 45;
  width: min(258px, calc(100% - 28px));
  border-radius: 14px;
  box-shadow: 0 7px 24px rgba(28, 19, 12, .17);
}
.ig-float[hidden] { display: none; }
.ig-float a.ig-cover {
  min-height: 92px;
  gap: 9px;
  margin: 0;
  padding: 8px 40px 8px 8px;
  border-radius: inherit;
}
.ig-float .ig-cover__image { width: 56px; }
.ig-float .ig-cover__copy { gap: 3px; }
.ig-float .ig-cover__byline { font-size: 10px; }
.ig-float .ig-cover__title { font-size: 13px; }
.ig-float .ig-cover__cta { margin-top: 1px; font-size: 10.5px; }
.ig-float__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #514538;
  cursor: pointer;
}
.ig-float__close span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: auto;
  border-radius: 50%;
  background: #eee5d5;
  font-size: 18px;
  line-height: 1;
}
.ig-float__close:hover span { background: #e4d5bd; }
.dark .ig-float__close { color: #f6eee0; }
.dark .ig-float__close span { background: #413527; }
.dark .ig-float__close:hover span { background: #554533; }
.ig-float__close:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
body:has(#ig-float:not([hidden])) #yg-totop { bottom: calc(132px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) and (max-width: 900px) {
  body:has(.d-apply) .ig-float { bottom: calc(88px + env(safe-area-inset-bottom)); }
  body:has(.d-apply):has(#ig-float:not([hidden])) #yg-totop { bottom: calc(202px + env(safe-area-inset-bottom)); }
}
@media (max-width: 767px) {
  .ig-float { width: min(234px, calc(100% - 28px)); bottom: calc(68px + env(safe-area-inset-bottom)); }
  body:has(#ya-appbanner:not([hidden])) .ig-float { bottom: calc(120px + env(safe-area-inset-bottom)); }
  body:has(#ig-float:not([hidden])) #yg-totop { bottom: calc(182px + env(safe-area-inset-bottom)); }
  body:has(#ya-appbanner:not([hidden])):has(#ig-float:not([hidden])) #yg-totop { bottom: calc(234px + env(safe-area-inset-bottom)); }
}
