.se-affi,
.se-affi * {
  box-sizing: border-box;
}

/* --------------------
   テキスト広告
-------------------- */
.se-affi--text-wrap {
  display: inline-block;
  max-width: 100%;
}

.se-affi-link--text {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  max-width: 100%;
  padding: 0.72em 1em;
  border: 1px solid #d7dde7;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(20, 30, 50, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.se-affi-link--text::after {
  content: "›";
  font-size: 1.1em;
  line-height: 1;
  flex: 0 0 auto;
}

.se-affi-link--text:hover,
.se-affi-link--text:focus-visible {
  color: #1f2937;
  text-decoration: none;
  background: #fcfcfd;
  border-color: #b8c3d4;
  box-shadow: 0 7px 18px rgba(20, 30, 50, 0.09);
  transform: translateY(-1px);
}

.se-affi-link--text:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* --------------------
   バナー広告
-------------------- */
.se-affi--banner {
  display: block;
  width: 100%;
  margin: 0;
}

.se-affi-link--banner {
  display: block;
  width: 100%;
  text-decoration: none;
}

.se-affi-link--banner img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(20, 30, 50, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.se-affi-link--banner:hover img,
.se-affi-link--banner:focus-visible img {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20, 30, 50, 0.12);
}

.se-affi-link--banner:focus-visible {
  outline: none;
}

.se-affi-caption {
  margin-top: 0.45rem;
  font-size: 0.86rem;
  color: #5b6472;
  line-height: 1.5;
}

/* サイズ */
.se-affi--sm {
  max-width: 320px;
}

.se-affi--md {
  max-width: 468px;
}

.se-affi--lg {
  max-width: 728px;
}

@media (max-width: 767px) {
  .se-affi--sm,
  .se-affi--md,
  .se-affi--lg {
    max-width: 100%;
  }
}