.elm-shonei-banner {
  position: fixed;
  z-index: 1200;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 36px));
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  background: #081317;
  box-shadow: 0 18px 50px rgba(4, 17, 22, 0.28);
  color: #fff;
  transition: opacity 180ms ease, transform 180ms ease;
}

.elm-shonei-banner[hidden] {
  display: none;
}

.elm-shonei-banner__link {
  display: block;
  overflow: hidden;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

.elm-shonei-banner__link:focus-visible {
  outline: 3px solid #f3c84b;
  outline-offset: 4px;
}

.elm-shonei-banner__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2000 / 853;
  object-fit: cover;
}

.elm-shonei-banner__copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 15px 11px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.elm-shonei-banner__copy span:last-child {
  flex: 0 0 auto;
  color: #f3c84b;
  font-size: 17px;
}

.elm-shonei-banner__close {
  position: absolute;
  top: -13px;
  right: -13px;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #0b3c39;
  box-shadow: 0 5px 18px rgba(4, 17, 22, 0.24);
  color: #fff;
  cursor: pointer;
  font: 700 22px/1 system-ui, sans-serif;
}

.elm-shonei-banner__close:focus-visible {
  outline: 3px solid #f3c84b;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .elm-shonei-banner {
    left: max(12px, env(safe-area-inset-left));
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: min(330px, calc(100vw - 24px));
    border-radius: 14px;
  }

  .elm-shonei-banner__copy {
    min-height: 44px;
    padding: 8px 12px 9px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .elm-shonei-banner {
    transition: none;
  }
}
